11# Use secure Wolfi base image (without Python installed)
2- FROM cgr.dev/chainguard/wolfi-base@sha256:e1d402d624011d0f4439bfb0d46a3ddc692465103c7234a326e0194953c3cfe0 AS builder
2+ FROM cgr.dev/chainguard/wolfi-base@sha256:1c56f3ceb1c9929611a1cc7ab7a5fde1ec5df87add282029cd1596b8eae5af67 AS builder
33# Do not cache the Python bytecode (aka don't create__pycache__ folders)
44ENV PYTHONDONTWRITEBYTECODE=1
55# Do not buffer stdout/stderr
@@ -8,11 +8,11 @@ ENV PYTHONUNBUFFERED=1
88WORKDIR /middleware
99# Install python and needed build tools
1010RUN apk add --no-cache \
11- python-3.12=3.12.10-r0 \
12- py3.12-pip=25 .1-r0 \
13- python-3.12-dev=3.12.10-r0 \
14- jq=1.8.1-r2 \
15- build-base=1-r8
11+ python-3.12=3.12.12-r4 \
12+ py3.12-pip=26.0 .1-r0 \
13+ python-3.12-dev=3.12.12-r4 \
14+ jq=1.8.1-r3 \
15+ build-base=1-r9
1616# Set the user to nonroot. It's defined in the Wolfi base image with the user id 65532
1717USER nonroot
1818# Copy the requirements.txt file to the container
@@ -23,7 +23,7 @@ RUN pip install --no-cache-dir -r requirements.txt --user
2323# Actually we would like to use the Wolfi python image for the runtime as it contains even less software (e.g. no shell)
2424# and thus a smaller attack surface. Unfortunately the Wolfi project only features the current development versions of
2525# images for free. The older but stable python 3.11 is not available.
26- FROM cgr.dev/chainguard/wolfi-base@sha256:e1d402d624011d0f4439bfb0d46a3ddc692465103c7234a326e0194953c3cfe0
26+ FROM cgr.dev/chainguard/wolfi-base@sha256:1c56f3ceb1c9929611a1cc7ab7a5fde1ec5df87add282029cd1596b8eae5af67
2727# Set the working directory in the container
2828# copy python packages from builder stage
2929COPY --from=builder /home/nonroot/.local /home/nonroot/.local
@@ -38,11 +38,11 @@ COPY entrypoint.sh /entrypoint.sh
3838# Create output directory (mountpoint)
3939# and set permissions of the middleware folder
4040RUN apk add --no-cache \
41- python-3.12=3.12.10-r0 \
42- py3.12-setuptools=80 .0.0-r0 \
43- git=2.49 .0-r1 \
44- jq=1.8.1-r2 \
45- openssh-client=10.0_p1-r0 && \
41+ python-3.12=3.12.12-r4 \
42+ py3.12-setuptools=82 .0.0-r0 \
43+ git=2.53 .0-r0 \
44+ jq=1.8.1-r3 \
45+ openssh-client=10.2_p1-r3 && \
4646 chown -R nonroot:nonroot /middleware /test && \
4747 chmod +x /entrypoint.sh
4848WORKDIR /
0 commit comments