optimize Dockerfile

This commit is contained in:
Jörn-Michael Miehe 2023-09-02 19:20:19 +00:00
parent 24cafebaf3
commit 9500ec1da9

View file

@ -3,18 +3,22 @@ FROM python:3.11-alpine
ENV \
PYTHONUNBUFFERED=1
# copy app source
COPY . /usr/src/app
RUN set -ex; \
# buildtime deps
# install buildtime deps
apk add --no-cache \
--virtual .build-deps \
build-base \
gcc \
linux-headers \
; \
# install app
pip3 --no-cache-dir install /usr/src/app; \
# remove buildtime deps
apk del --no-cache \
.build-deps \
;
RUN set -ex; \
pip3 --no-cache-dir install /usr/src/app
ENTRYPOINT ["kiwi-simple-metrics"]