forked from vsoch/django-nginx-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (30 loc) · 963 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM python:3.5.1
ENV PYTHONUNBUFFERED 1
################################################################################
# CORE
RUN apt-get update && apt-get install -y \
pkg-config \
cmake \
openssl \
wget \
git \
vim
ADD requirements.txt /tmp/requirements.txt
RUN pip install --upgrade pip
RUN pip install -r /tmp/requirements.txt
ADD . /code/
################################################################################
# Storage Locations
RUN mkdir -p /code/images && \
mkdir -p /var/www/images && \
chmod -R 0755 /code/images/ && \
# Create hashed temporary upload locations
mkdir -p /var/www/images/_upload/{0..9} && chmod 777 -R /var/www/images/_upload
WORKDIR /code
################################################################################
# Clean Up
RUN apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
CMD /code/run_uwsgi.sh
EXPOSE 3031