2021-07-05 19:37:05 +02:00
|
|
|
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2024-10-19 05:36:05 +02:00
|
|
|
FROM python:3.11.10-alpine@sha256:b5bab720ce164cf4ee1fcdc733b87a39cc7a9555d02ba0c7ec25c8f3759f9a3e AS builder
|
2024-08-21 20:46:49 +02:00
|
|
|
|
2024-08-21 21:08:52 +02:00
|
|
|
ENV PYROOT=/pyroot
|
|
|
|
ENV PYTHONUSERBASE=$PYROOT
|
2024-08-21 20:46:49 +02:00
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
musl-dev \
|
|
|
|
python3-dev && \
|
|
|
|
pip3 install pipenv
|
2021-06-14 21:55:27 +02:00
|
|
|
|
|
|
|
COPY Pipfile* ./
|
|
|
|
|
|
|
|
RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile
|
|
|
|
RUN pip3 uninstall --yes pipenv
|
|
|
|
|
|
|
|
|
2024-10-19 05:36:05 +02:00
|
|
|
FROM python:3.11.10-alpine@sha256:b5bab720ce164cf4ee1fcdc733b87a39cc7a9555d02ba0c7ec25c8f3759f9a3e AS ki-backend
|
2024-08-21 20:46:49 +02:00
|
|
|
|
2024-08-21 21:08:52 +02:00
|
|
|
ENV PYROOT=/pyroot
|
|
|
|
ENV PYTHONUSERBASE=$PYROOT
|
2021-06-14 21:55:27 +02:00
|
|
|
|
|
|
|
# Install six explicitly. Otherwise Python complains about it missing.
|
|
|
|
RUN pip3 install six
|
|
|
|
|
|
|
|
COPY --from=builder $PYROOT/bin/ $PYROOT/bin/
|
|
|
|
COPY --from=builder $PYROOT/lib/ $PYROOT/lib/
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-11-07 14:36:41 +01:00
|
|
|
LABEL org.opencontainers.image.source=https://git.wtf-eg.de/kompetenzinventar/ki-backend.git
|
|
|
|
LABEL org.opencontainers.image.url=https://git.wtf-eg.de/kompetenzinventar/ki-backend
|
|
|
|
LABEL org.opencontainers.image.documentation=https://git.wtf-eg.de/kompetenzinventar/ki-backend#docker
|
|
|
|
LABEL org.opencontainers.image.vendor="WTF Kooperative eG"
|
|
|
|
|
2021-06-14 21:55:27 +02:00
|
|
|
CMD ["python3", "run_prod.py"]
|