refactor: use .python-version for docker build

This commit is contained in:
ducklet 2024-05-10 17:01:18 +02:00
parent d385860ca9
commit 06e60fb212
4 changed files with 45 additions and 10 deletions

View file

@ -1,4 +1,6 @@
FROM docker.io/library/python:3.12-alpine
ARG PYTHON_VERSION
FROM docker.io/library/python:${PYTHON_VERSION}-alpine
RUN apk update --no-cache \
&& apk upgrade --no-cache \
@ -9,14 +11,16 @@ RUN addgroup -g 10001 py \
WORKDIR /var/app
COPY requirements.txt ./
COPY build/requirements.txt ./
RUN pip install --no-cache-dir --upgrade \
--requirement requirements.txt
USER 10000:10001
COPY . ./
COPY run ./
COPY scripts ./scripts
COPY unwind ./unwind
ENV UNWIND_DATA="/data"
VOLUME $UNWIND_DATA