1
0
Files
dch-webhooks/Containerfile
Dustin C. Hatch 870d484f4b
Some checks failed
infra/dch-webhooks/pipeline/head There was a failure building this commit
build: Install git in build stage
This is how _setuptools_scm_ creates the dynamic version string.  Not
sure how it worked once without it 🤔
2025-08-13 07:59:43 -05:00

39 lines
739 B
Docker

FROM git.pyrocufflink.net/containerimages/dch-base AS build
RUN --mount=type=cache,target=/var/cache \
microdnf install -y \
--setopt install_weak_deps=0 \
git-core \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
&& :
COPY . /tmp/build
WORKDIR /tmp/build
RUN python3 -m pip wheel -w dist .
FROM git.pyrocufflink.net/containerimages/dch-base
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"]