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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Base image pinned by its multi-arch index digest, so a re-pushed tag cannot
# change what is built. Refresh the digest and the tag together.
FROM python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 AS builder
FROM python:3.11.16-slim-bookworm@sha256:a36c24f9cbdf4fd0f52d67f0823eeac19c2028c637cecc392d97f980d4fec56b AS builder

ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1
Expand All @@ -14,7 +14,7 @@ COPY pyproject.toml README.md LICENSE NOTICE ./
COPY src ./src
RUN python -m pip wheel --no-deps --no-build-isolation --wheel-dir /wheels .

FROM python:3.11.15-slim-bookworm@sha256:d29f48a31a8b408ed19272ca1e7b10ebae13b240a27e862d3d4217c528e2e0c3 AS runtime
FROM python:3.11.16-slim-bookworm@sha256:a36c24f9cbdf4fd0f52d67f0823eeac19c2028c637cecc392d97f980d4fec56b AS runtime

ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_NO_CACHE_DIR=1 \
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_container_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def test_runtime_image_is_multistage_non_root_and_offline_installed() -> None:
dockerfile = Path("Dockerfile").read_text(encoding="utf-8")
# Both stages pin the base image by digest, not by tag alone.
assert dockerfile.count("FROM python:3.11.15-slim-bookworm@sha256:") == 2
assert dockerfile.count("FROM python:3.11.16-slim-bookworm@sha256:") == 2
assert "AS builder" in dockerfile
assert "pip install --require-hashes -r requirements/build.txt" in dockerfile
assert "pip wheel --no-deps --no-build-isolation --wheel-dir /wheels ." in dockerfile
Expand Down
Loading