forked from safe-global/safe-config-service
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (27 loc) · 870 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
FROM python:3.10-slim
# python
ENV PYTHONUNBUFFERED=1
ENV PYTHONUSERBASE=/python-deps
ENV PATH="${PATH}:${PYTHONUSERBASE}/bin"
WORKDIR /app
COPY requirements.txt ./
RUN set ex \
&& buildDeps=" \
automake \
build-essential \
gcc \
libc-dev \
libssl-dev \
libtool \
pkg-config \
" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps tini \
&& pip3 install -U --no-cache-dir wheel setuptools pip \
&& pip3 install --no-cache-dir --user -r requirements.txt \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& chmod +x /usr/bin/tini
COPY . .
RUN DEFAULT_FILE_STORAGE=django.core.files.storage.FileSystemStorage python src/manage.py collectstatic --noinput
ENTRYPOINT ["/usr/bin/tini", "--", "./docker-entrypoint.sh"]