38 lines
711 B
Docker
38 lines
711 B
Docker
FROM git.pyrocufflink.net/containerimages/dch-base AS build
|
|
|
|
RUN --mount=type=cache,target=/var/cache \
|
|
microdnf install -y \
|
|
--setopt persistdir=/var/cache/dnf \
|
|
--setopt install_weak_deps=0 \
|
|
git-core \
|
|
python3 \
|
|
uv \
|
|
&& :
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
|
|
|
ENV UV_PROJECT_ENVIRONMENT=/app
|
|
|
|
RUN uv sync --no-dev --no-editable
|
|
|
|
RUN cp index.html /app/lib/python*/site-packages/
|
|
|
|
|
|
FROM git.pyrocufflink.net/containerimages/dch-base
|
|
|
|
RUN --mount=type=cache,target=/var/cache \
|
|
microdnf install -y \
|
|
--setopt persistdir=/var/cache/dnf \
|
|
--setopt install_weak_deps=0 \
|
|
python3 \
|
|
tini \
|
|
&& :
|
|
|
|
COPY --from=build /app /app
|
|
|
|
ENV PATH=/app/bin:/usr/bin
|
|
|
|
ENTRYPOINT ["tini", "uvicorn", "--", "receipts:app"]
|