-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (32 loc) · 1008 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
FROM python:3-stretch
LABEL maintainer "Muhammad Kaisar Arkhan <[email protected]>"
ENV USER=gitmate ROOT=/usr/src/app NUM_WORKERS=3 LOG_LEVEL=DEBUG TIMEOUT=30 MIN=3 MAX=10
EXPOSE 8000
WORKDIR $ROOT
RUN useradd -d $ROOT -r $USER
ADD . $ROOT
RUN set -ex && \
\
buildDeps=' \
gcc \
libpq-dev \
libffi-dev \
' && \
\
apt-get update && \
apt-get install -y --no-install-recommends apt-transport-https && \
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
echo \
"deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" \
>> /etc/apt/sources.list && \
\
apt-get update && \
apt-get install -y --no-install-recommends \
libpq5 git docker-ce $buildDeps && \
\
pip install --no-cache-dir -r $ROOT/requirements.txt && \
./install_deps.sh && \
\
apt-get purge -y --auto-remove $buildDeps && \
rm -rf /var/lib/apt/lists/*
CMD ["./docker/run.sh"]