Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# - Runs a non-root user.
# - Sets up the entrypoint and port.

FROM python:3.13.7-slim-bookworm AS base-image
FROM python:3.13.7-slim-trixie AS base-image

# Update system packages
COPY scripts/install-base-packages.sh .
Expand Down Expand Up @@ -45,15 +45,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
# Install the application itself.
ADD . /app
RUN --mount=type=cache,target=/root/.cache/uv \
uv pip install --no-deps --compile-bytecode .
uv sync --frozen --no-default-groups --compile-bytecode --no-editable

FROM base-image AS runtime-image

# Create a non-root user
RUN useradd --create-home appuser

# Copy the virtualenv
COPY --from=install-image /app /app
COPY --from=install-image /app/.venv /app/.venv

# Switch to the non-root user.
USER appuser
Expand Down
6 changes: 3 additions & 3 deletions scripts/update-uv-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ uv_version=$(uv export -q --no-hashes --only-group lint \
for f in .github/workflows/*.yaml; do
sed "s/UV_VERSION: .*/UV_VERSION: \"$uv_version\"/" "$f" >"$f.n"
if ! cmp -s "$f" "${f}.n"; then
echo "Updating UV_VERSION to $uv_version in $f"
mv "${f}.n" "$f"
echo "Updating UV_VERSION to $uv_version in $f"
mv "${f}.n" "$f"
else
rm "${f}.n"
fi
Expand All @@ -29,7 +29,7 @@ for f in Dockerfile*; do
sed "s/uv:[0-9][0-9.]*/uv:$uv_version/" "$f" >"${f}.n"
if ! cmp -s "$f" "${f}.n"; then
echo "Updating uv container version to $uv_version in $f"
mv "${f}.n" "$f"
mv "${f}.n" "$f"
else
rm "${f}.n"
fi
Expand Down