File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212# - Runs a non-root user.
1313# - Sets up the entrypoint and port.
1414
15- FROM python:3.13.7-slim-bookworm AS base-image
15+ FROM python:3.13.7-slim-trixie AS base-image
1616
1717# Update system packages
1818COPY scripts/install-base-packages.sh .
@@ -45,15 +45,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
4545# Install the application itself.
4646ADD . /app
4747RUN --mount=type=cache,target=/root/.cache/uv \
48- uv pip install --no-deps --compile-bytecode .
48+ uv sync --frozen --no-default-groups --compile-bytecode --no-editable
4949
5050FROM base-image AS runtime-image
5151
5252# Create a non-root user
5353RUN useradd --create-home appuser
5454
5555# Copy the virtualenv
56- COPY --from=install-image /app /app
56+ COPY --from=install-image /app/.venv /app/.venv
5757
5858# Switch to the non-root user.
5959USER appuser
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ uv_version=$(uv export -q --no-hashes --only-group lint \
1717for f in .github/workflows/* .yaml; do
1818 sed " s/UV_VERSION: .*/UV_VERSION: \" $uv_version \" /" " $f " > " $f .n"
1919 if ! cmp -s " $f " " ${f} .n" ; then
20- echo " Updating UV_VERSION to $uv_version in $f "
21- mv " ${f} .n" " $f "
20+ echo " Updating UV_VERSION to $uv_version in $f "
21+ mv " ${f} .n" " $f "
2222 else
2323 rm " ${f} .n"
2424 fi
@@ -29,7 +29,7 @@ for f in Dockerfile*; do
2929 sed " s/uv:[0-9][0-9.]*/uv:$uv_version /" " $f " > " ${f} .n"
3030 if ! cmp -s " $f " " ${f} .n" ; then
3131 echo " Updating uv container version to $uv_version in $f "
32- mv " ${f} .n" " $f "
32+ mv " ${f} .n" " $f "
3333 else
3434 rm " ${f} .n"
3535 fi
You can’t perform that action at this time.
0 commit comments