-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 782 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 782 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
FROM python:3.8-alpine
WORKDIR /app
ADD . /app/
# The enviroment variable ensures that the python output is set straight
# to the terminal with out buffering it first
ENV PYTHONUNBUFFERED 1
RUN addgroup -g 101 -S django && adduser -u 101 -D -S -G django django
RUN apk add --update --no-cache su-exec
RUN apk add gdal geos libpq
RUN set -x && apk add --no-cache --virtual .build-deps \
build-base \
gcc \
musl-dev \
python3-dev \
postgresql-dev \
zlib-dev \
jpeg-dev \
&& python -m pip install --upgrade pip \
&& pip install -U -r requirements.txt --no-cache-dir \
&& apk del .build-deps
EXPOSE 8000
ENV DEBUG=False
ENV DJANGO_SETTINGS_MODULE=main.settings.production
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT [ "/app/entrypoint.sh" ]