-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (30 loc) · 853 Bytes
/
Dockerfile
File metadata and controls
35 lines (30 loc) · 853 Bytes
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
FROM python:3.7-slim
ARG APP_USER=appuser
ENV DJANGO_SETTINGS_MODULE=core.settings.docker
COPY . /app
WORKDIR /app
RUN set -ex \
&& groupadd -r ${APP_USER} && useradd --no-log-init -r -g ${APP_USER} ${APP_USER} \
&& buildDeps=' \
gcc \
libbz2-dev \
libc6-dev \
libgdbm-dev \
liblzma-dev \
libncurses-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libpcre3-dev \
make \
tcl-dev \
tk-dev \
wget \
xz-utils \
zlib1g-dev \
' \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
&& pip install pipenv && pip install uwsgi && pipenv install --system \
&& apt-get purge -y --auto-remove $buildDeps
RUN python manage.py collectstatic --no-input
CMD ["uwsgi", "uwsgi.ini"]