-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
68 lines (56 loc) · 1.29 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM python:3.6-alpine3.9
MAINTAINER Chris Ridenour <[email protected]>
# update pip
RUN pip3 install --no-cache-dir --upgrade pip
# set python
ENV PYTHONUNBUFFERED 1
# create needed folder
RUN mkdir /app
WORKDIR /app
ADD ./requirements.txt /app/
# Include libraries for our packages
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
freetype-dev \
gcc \
g++ \
git \
musl-dev \
make \
jpeg-dev \
lcms2-dev \
libffi-dev \
libpng-dev \
libpq \
libwebp-dev \
openjpeg-dev \
openssl-dev \
postgresql-dev \
tiff-dev \
zlib-dev \
linux-headers && \
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
libressl2.7-libcrypto \
gdal-dev \
geos && \
CFLAGS="$CFLAGS -L/lib" pip3 install --no-cache-dir -r /app/requirements.txt && \
apk del --no-cache \
gcc \
g++ \
make \
musl-dev \
postgresql-dev
# add ca-certs
RUN apk add --no-cache ca-certificates
ADD . /app/
# Build the project
#RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main \
# yarn && \
# yarn && \
# yarn run build && \
# apk del --no-cache \
# yarn && \
# rm -rf node_modules
# Collect static files
RUN python3 manage.py collectstatic --noinput
EXPOSE 8000
CMD ["uwsgi", "--ini", "/app/uwsgi.ini"]