1
0
Fork 0
dch-webhooks/Containerfile

38 lines
724 B
Docker

FROM registry.fedoraproject.org/fedora-minimal:39 AS build
RUN --mount=type=cache,target=/var/cache \
microdnf install -y \
--setopt install_weak_deps=0 \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
&& :
COPY . /tmp/build
WORKDIR /tmp/build
RUN python3 -m pip wheel -w dist .
FROM registry.fedoraproject.org/fedora-minimal:39
RUN --mount=type=cache,target=/var/cache \
microdnf install -y \
--setopt install_weak_deps=0 \
python3 \
python3-pip \
tini \
&& :
RUN --mount=from=build,source=/tmp/build/dist,target=/tmp/wheels \
python3 -m pip install -f /tmp/wheels \
dch_webhooks \
uvicorn \
&& :
USER 1000:1000
CMD ["tini", "/usr/local/bin/uvicorn", "dch_webhooks:app"]