Renovate Bot
d146f52b5d
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
44 lines
1.2 KiB
Docker
44 lines
1.2 KiB
Docker
# SPDX-FileCopyrightText: WTF Kooperative eG <https://wtf-eg.de/>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
FROM python:3.12.6-alpine@sha256:eb37f58646a901dc7727cf448cae36daaefaba79de33b5058dab79aa4c04aefb AS builder
|
|
|
|
ENV PYROOT=/pyroot
|
|
ENV PYTHONUSERBASE=$PYROOT
|
|
|
|
RUN apk add --no-cache \
|
|
gcc \
|
|
g++ \
|
|
musl-dev \
|
|
python3-dev && \
|
|
pip3 install pipenv
|
|
|
|
COPY Pipfile* ./
|
|
|
|
RUN PIP_USER=1 PIP_IGNORE_INSTALLED=1 pipenv install --system --deploy --ignore-pipfile
|
|
RUN pip3 uninstall --yes pipenv
|
|
|
|
|
|
FROM python:3.12.6-alpine@sha256:eb37f58646a901dc7727cf448cae36daaefaba79de33b5058dab79aa4c04aefb AS ki-backend
|
|
|
|
ENV PYROOT=/pyroot
|
|
ENV PYTHONUSERBASE=$PYROOT
|
|
|
|
# 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 . .
|
|
|
|
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"
|
|
|
|
CMD ["python3", "run_prod.py"]
|