-
Notifications
You must be signed in to change notification settings - Fork 9
/
app-dev.Dockerfile
55 lines (49 loc) · 1.34 KB
/
app-dev.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
FROM debian:bullseye-slim AS builder
LABEL maintainer="Jan Dittberner <[email protected]>"
LABEL vendor="Deutsche Telekom MMS GmbH"
COPY pyproject.toml poetry.lock /python-code/
WORKDIR /python-code/
RUN \
set -eu ; \
export DEBIAN_FRONTEND=noninteractive ; \
export PYTHONBUFFERED=1 ; \
export PYTHONFAULTHANDLER=1 ; \
export PIP_NO_CACHE_DIR=off ; \
export PIP_DISABLE_VERSION_CHECK=on ; \
export PIP_DEFAULT_TIMEOUT=100 ; \
apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
curl \
dumb-init \
gettext \
httpie \
iproute2 \
libffi-dev \
libjpeg-dev \
libjpeg62-turbo \
libmagic1 \
libpng-dev \
libpq-dev \
libxml2-dev \
libxslt-dev \
linux-headers-$(dpkg --print-architecture) \
openssl \
procps \
python3-dev \
python3-pip \
zlib1g-dev \
&& python3 -m pip install -U wheel poetry \
&& poetry config virtualenvs.in-project true \
&& poetry install \
&& rm -rf /root/.cache /root/.local /tmp/*.json \
&& python3 -m pip uninstall --yes poetry \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 8000
VOLUME /app
WORKDIR /app
ENV PATH="/python-code/.venv/bin:$PATH"
ENTRYPOINT ["dumb-init", "python3", "manage.py", "runserver", "0.0.0.0:8000"]