Skip to content

Commit 31b9b85

Browse files
authored
Merge pull request #276 from lsst-sqre/tickets/DM-52929
DM-52929: Update Docker build instructions
2 parents 3e5ed27 + e06e0d4 commit 31b9b85

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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
1818
COPY scripts/install-base-packages.sh .
@@ -45,15 +45,15 @@ RUN --mount=type=cache,target=/root/.cache/uv \
4545
# Install the application itself.
4646
ADD . /app
4747
RUN --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

5050
FROM base-image AS runtime-image
5151

5252
# Create a non-root user
5353
RUN 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.
5959
USER appuser

scripts/update-uv-version.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ uv_version=$(uv export -q --no-hashes --only-group lint \
1717
for 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

0 commit comments

Comments
 (0)