-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (44 loc) · 1.38 KB
/
Dockerfile
File metadata and controls
49 lines (44 loc) · 1.38 KB
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
FROM quay.io/drycc/base:v0.3.6
RUN adduser --system \
--shell /bin/bash \
--disabled-password \
--home /app \
--group \
drycc
COPY requirements.txt /app/requirements.txt
RUN buildDeps='gcc libffi-dev libpq-dev libldap2-dev libsasl2-dev python3-dev python3-pip python3-wheel python3-setuptools'; \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
$buildDeps \
sudo \
libpq5 \
libldap-2.4 \
python3-minimal \
# cryptography package needs pkg_resources
python3-pkg-resources && \
ln -s /usr/bin/python3 /usr/bin/python && \
mkdir -p /configs && chown -R drycc:drycc /configs && \
pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt && \
# cleanup
apt-get purge -y --auto-remove $buildDeps && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
bash -c "mkdir -p /usr/share/man/man{1..8}"
COPY . /app
# define execution environment
WORKDIR /app
CMD ["/app/bin/boot"]
EXPOSE 8000