Skip to content

Commit b4b8bbb

Browse files
ravisingalclaude
andcommitted
fix: move base images to distroless cc-debian13
Debian 12 (bookworm) is approaching the end of its full-support window, so move the runtime base for both Java images to gcr.io/distroless/cc-debian13. The helper stages move to trixie alongside it so the JRE and jemalloc are built against the same glibc (2.41) as the runtime base, and the SSL stage moves to java-base-debian13 so the Java cacerts come from a matching release. cc-debian13 already ships zlib (libz.so.1 -> libz.so.1.3.1), unlike cc-debian12, so copying libz in from the build stage is no longer needed. Replace it with an assertion that the base still provides the library, left unversioned so a routine zlib patch bump does not break the weekly update-docker-args PR. Verified by building both images on amd64 and arm64: java 11.0.33 and 21.0.13 start, jemalloc preloads, cacerts are present, and the eMudhra blocked.certs entry survives jlink. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent f7c32c1 commit b4b8bbb

5 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎.github/workflows/update-docker-args.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
shell: bash
1818
id: args
1919
run: |
20-
BASE_IMAGE="gcr.io/distroless/cc-debian12"
20+
BASE_IMAGE="gcr.io/distroless/cc-debian13"
2121
BASE_IMAGE_TAG="debug"
2222
BASE_IMAGE_DIGEST=$(gcloud container images list-tags $BASE_IMAGE --format json | jq --arg tag "$BASE_IMAGE_TAG" -r '.[] | {digest: .digest, tag: .tags[]} | select(.tag == $tag) | .digest')
2323
if [ -n "$BASE_IMAGE_DIGEST" ]; then

‎java-11/Dockerfile‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG BASE_IMAGE
55
# Zulu CA build straight from Azul's CDN. The SHA-256 pins the download. jlink copies blocked.certs
66
# from the JDK it runs, so it must be the fixed one.
77
# TEMP: go back to azul/zulu-openjdk-debian once it publishes a tag with the fix.
8-
FROM debian:bookworm-slim AS jre
8+
FROM debian:trixie-slim AS jre
99
ARG JAVA_VERSION
1010
ARG TARGETARCH
1111
# Update these together with java.version.
@@ -73,9 +73,9 @@ jdk.zipfs\
7373
RUN grep -q 7BA62FEC54E9D040556FCA70A6A88F03761C178FA1F7CB8390A73076849F55A2 /jre/lib/security/blocked.certs
7474

7575
# Extract java SSL certs
76-
FROM gcr.io/distroless/java-base-debian12:debug AS ssl
76+
FROM gcr.io/distroless/java-base-debian13:debug AS ssl
7777

78-
FROM debian:bookworm-slim As builder
78+
FROM debian:trixie-slim AS builder
7979
RUN apt update && apt install -y libjemalloc-dev
8080

8181
# stage for amd64
@@ -84,8 +84,8 @@ FROM ${BASE_IMAGE} AS base-amd64
8484
SHELL ["/busybox/sh", "-c"]
8585
RUN ln -s /busybox/sh /bin/sh
8686

87-
COPY --from=jre /lib/x86_64-linux-gnu/libz.so.1.2.13 /lib/x86_64-linux-gnu/libz.so.1.2.13
88-
RUN ln -s /lib/x86_64-linux-gnu/libz.so.1.2.13 /lib/x86_64-linux-gnu/libz.so.1
87+
# libz.so.1 is already present in the base image
88+
RUN test -e /lib/x86_64-linux-gnu/libz.so.1
8989

9090
# change default memory allocator to jemalloc
9191
COPY --from=builder /usr/lib/x86_64-linux-gnu/libjemalloc* /usr/lib/x86_64-linux-gnu/
@@ -97,8 +97,8 @@ FROM ${BASE_IMAGE} AS base-arm64
9797
SHELL ["/busybox/sh", "-c"]
9898
RUN ln -s /busybox/sh /bin/sh
9999

100-
COPY --from=jre /lib/aarch64-linux-gnu/libz.so.1.2.13 /lib/aarch64-linux-gnu/libz.so.1.2.13
101-
RUN ln -s /lib/aarch64-linux-gnu/libz.so.1.2.13 /lib/aarch64-linux-gnu/libz.so.1
100+
# libz.so.1 is already present in the base image
101+
RUN test -e /lib/aarch64-linux-gnu/libz.so.1
102102

103103
# change default memory allocator to jemalloc
104104
COPY --from=builder /usr/lib/aarch64-linux-gnu/libjemalloc* /usr/lib/aarch64-linux-gnu/

‎java-11/base.image‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gcr.io/distroless/cc-debian12:debug@sha256:bc3546a529388660b583cc85ca6559927652d54391dc8059419d7b4bf3921154
1+
gcr.io/distroless/cc-debian13:debug@sha256:8eb229dfe1ec97410a495e312dfba214afd86bfc72010973e08796ac5e94e234

‎java-21/Dockerfile‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG BASE_IMAGE
55
# Zulu CA build straight from Azul's CDN. The SHA-256 pins the download. jlink copies blocked.certs
66
# from the JDK it runs, so it must be the fixed one.
77
# TEMP: go back to azul/zulu-openjdk-debian once it publishes a tag with the fix.
8-
FROM debian:bookworm-slim AS jre
8+
FROM debian:trixie-slim AS jre
99
ARG JAVA_VERSION
1010
ARG TARGETARCH
1111
# Update these together with java.version.
@@ -73,9 +73,9 @@ jdk.zipfs\
7373
RUN grep -q 7BA62FEC54E9D040556FCA70A6A88F03761C178FA1F7CB8390A73076849F55A2 /jre/lib/security/blocked.certs
7474

7575
# Extract java SSL certs
76-
FROM gcr.io/distroless/java-base-debian12:debug AS ssl
76+
FROM gcr.io/distroless/java-base-debian13:debug AS ssl
7777

78-
FROM debian:bookworm-slim AS builder
78+
FROM debian:trixie-slim AS builder
7979
RUN apt update && apt install -y libjemalloc-dev
8080

8181
# stage for amd64
@@ -84,8 +84,8 @@ FROM ${BASE_IMAGE} AS base-amd64
8484
SHELL ["/busybox/sh", "-c"]
8585
RUN ln -s /busybox/sh /bin/sh
8686

87-
COPY --from=jre /lib/x86_64-linux-gnu/libz.so.1.2.13 /lib/x86_64-linux-gnu/libz.so.1.2.13
88-
RUN ln -s /lib/x86_64-linux-gnu/libz.so.1.2.13 /lib/x86_64-linux-gnu/libz.so.1
87+
# libz.so.1 is already present in the base image
88+
RUN test -e /lib/x86_64-linux-gnu/libz.so.1
8989

9090
# change default memory allocator to jemalloc
9191
COPY --from=builder /usr/lib/x86_64-linux-gnu/libjemalloc* /usr/lib/x86_64-linux-gnu/
@@ -97,8 +97,8 @@ FROM ${BASE_IMAGE} AS base-arm64
9797
SHELL ["/busybox/sh", "-c"]
9898
RUN ln -s /busybox/sh /bin/sh
9999

100-
COPY --from=jre /lib/aarch64-linux-gnu/libz.so.1.2.13 /lib/aarch64-linux-gnu/libz.so.1.2.13
101-
RUN ln -s /lib/aarch64-linux-gnu/libz.so.1.2.13 /lib/aarch64-linux-gnu/libz.so.1
100+
# libz.so.1 is already present in the base image
101+
RUN test -e /lib/aarch64-linux-gnu/libz.so.1
102102

103103
# change default memory allocator to jemalloc
104104
COPY --from=builder /usr/lib/aarch64-linux-gnu/libjemalloc* /usr/lib/aarch64-linux-gnu/

‎java-21/base.image‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gcr.io/distroless/cc-debian12:debug@sha256:bc3546a529388660b583cc85ca6559927652d54391dc8059419d7b4bf3921154
1+
gcr.io/distroless/cc-debian13:debug@sha256:8eb229dfe1ec97410a495e312dfba214afd86bfc72010973e08796ac5e94e234

0 commit comments

Comments
 (0)