39 lines
739 B
Docker
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"]
|