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 @@
# Pinned to the multi-arch index digest of the tag, so a republished tag cannot
# change what the image is built from without a reviewed change here.
FROM python:3.11.16-slim-bookworm@sha256:a36c24f9cbdf4fd0f52d67f0823eeac19c2028c637cecc392d97f980d4fec56b AS builder
FROM python:3.11.17-slim-bookworm@sha256:2333bd330d12de02514770b3585cad313644316047cdee24a7acfdece6de6efb AS builder

WORKDIR /build

Expand All @@ -14,7 +14,7 @@ COPY src/ src/
RUN python -m pip wheel --disable-pip-version-check --no-deps --wheel-dir /wheels .


FROM python:3.11.16-slim-bookworm@sha256:a36c24f9cbdf4fd0f52d67f0823eeac19c2028c637cecc392d97f980d4fec56b AS runtime
FROM python:3.11.17-slim-bookworm@sha256:2333bd330d12de02514770b3585cad313644316047cdee24a7acfdece6de6efb AS runtime

ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_container_hardening.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_runtime_image_pins_python_patch_and_distribution() -> None:
assert len(stages) == 2
for stage, name in zip(stages, ("builder", "runtime"), strict=True):
assert re.fullmatch(
rf"FROM python:3\.11\.16-slim-bookworm@sha256:[0-9a-f]{{64}} AS {name}", stage
rf"FROM python:3\.11\.\d+-slim-bookworm@sha256:[0-9a-f]{{64}} AS {name}", stage
), stage


Expand Down
Loading