This commit is contained in:
Hans Karlinius
2024-11-23 23:47:18 +01:00
parent 24f6cedd3e
commit 38bea746b3
2 changed files with 4 additions and 16 deletions

View File

@@ -11,22 +11,10 @@ COPY requirements.txt /tmp/
# Setup base
# hadolint ignore=DL3042
RUN \
apk add --no-cache --virtual .build-dependencies \
py3-pip=24.0-r2 \
apk add --no-cache \
py3-pip-pyc \
\
&& apk add --no-cache \
python3=3.12.7-r0 \
\
&& pip3 install -r /tmp/requirements.txt \
\
&& find /usr/local \
\( -type d -a -name test -o -name tests -o -name '__pycache__' \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
\
&& apk del --no-cache --purge .build-dependencies \
&& rm -f -r \
/tmp/*
&& pip3 install -r /tmp/requirements.txt
# Copy root filesystem
COPY rootfs /