Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c6924e3
chore: Add support for JDK 25 in Docker configurations
gounthar Sep 17, 2025
b042763
chore: Update JDK 25 module list in Dockerfile for jlink configuration
gounthar Sep 17, 2025
2215a9c
chore: Update JDK 25 module list in Dockerfile for additional modules
gounthar Sep 17, 2025
735df02
chore: Define default JLINK modules for JDK 25 in Dockerfile
gounthar Sep 18, 2025
8068078
chore: Simplify JLINK module assignment for JDK 25 in Dockerfile
gounthar Sep 18, 2025
a03a210
Merge branch 'master' into refactor/deduplicate-jlink-modules-default
gounthar Sep 22, 2025
df134dd
chore: Add support for slim JDK 25 and expand platform support in doc…
gounthar Sep 23, 2025
ad1dadf
Merge remote-tracking branch 'upstream/master' into refactor/deduplic…
gounthar Sep 23, 2025
9167247
Merge branch 'refactor/deduplicate-jlink-modules-default' of https://…
gounthar Sep 23, 2025
5328f9b
chore: Update JENKINS_SHA to WAR_SHA and add WAR_URL in docker-bake.hcl
gounthar Sep 23, 2025
e047079
refactor: declare JLINK_MODULES_DEFAULT ARG just above its first use
gounthar Sep 23, 2025
e259f04
Merge remote-tracking branch 'upstream/master' into refactor/deduplic…
gounthar Sep 29, 2025
5fca1b4
fix: update Dockerfile references from Bookworm to Trixie
gounthar Sep 29, 2025
a79bd69
fix: standardize TRIXIE_TAG variable naming to uppercase
gounthar Sep 29, 2025
3f160a8
fix: update title to reflect Trixie Linux version in debian.yaml
gounthar Sep 29, 2025
146242f
Merge branch 'master' into refactor/deduplicate-jlink-modules-default
gounthar Sep 30, 2025
8441f07
Merge branch 'master' into refactor/deduplicate-jlink-modules-default
gounthar Oct 5, 2025
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
12 changes: 8 additions & 4 deletions alpine/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,23 @@ RUN apk add --no-cache \

ENV PATH="/opt/jdk-${JAVA_VERSION}/bin:${PATH}"

ARG JLINK_MODULES_DEFAULT=java.base,java.logging,java.xml,java.management,java.net.http,jdk.crypto.ec,jdk.zipfs,jdk.unsupported,jdk.charsets

# Generate smaller java runtime without unneeded files
# for now we include the full module path to maintain compatibility
# while still saving space (approx 200mb from the full distribution)
RUN case "$(jlink --version 2>&1)" in \
"17."*) set -- "--compress=2" ;; \
"17."*) set -- "--compress=2" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK21
"21."*) set -- "--compress=zip-6" ;; \
"21."*) set -- "--compress=zip-6" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK25 (early access)
"25"*) mod_list="${JLINK_MODULES:-$JLINK_MODULES_DEFAULT}"; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: what's the purpose of having two variables for jlink modules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal was to have JLINK_MODULES configurable via the command line if needed, but it may be unneeded complexity. 🤔

set -- "--compress=zip-6" --add-modules "$mod_list" ;; \
*) echo "ERROR: unmanaged jlink version pattern" && exit 1 ;; \
esac; \
jlink \
--strip-java-debug-attributes \
"$1" \
--add-modules ALL-MODULE-PATH \
"$@" \
--no-man-pages \
--no-header-files \
--output /javaruntime
Expand Down
12 changes: 8 additions & 4 deletions debian/trixie-slim/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ RUN apt-get update \

ENV PATH="/opt/jdk-${JAVA_VERSION}/bin:${PATH}"

ARG JLINK_MODULES_DEFAULT=java.base,java.logging,java.xml,java.management,java.net.http,jdk.crypto.ec,jdk.zipfs,jdk.unsupported,jdk.charsets

# Generate smaller java runtime without unneeded files
# for now we include the full module path to maintain compatibility
# while still saving space (approx 200mb from the full distribution)
RUN case "$(jlink --version 2>&1)" in \
"17."*) set -- "--compress=2" ;; \
"17."*) set -- "--compress=2" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK21
"21."*) set -- "--compress=zip-6" ;; \
"21."*) set -- "--compress=zip-6" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK25 (early access)
"25"*) mod_list="${JLINK_MODULES:-$JLINK_MODULES_DEFAULT}"; \
set -- "--compress=zip-6" --add-modules "$mod_list" ;; \
*) echo "ERROR: unmanaged jlink version pattern" && exit 1 ;; \
esac; \
jlink \
--strip-java-debug-attributes \
"$1" \
--add-modules ALL-MODULE-PATH \
"$@" \
--no-man-pages \
--no-header-files \
--output /javaruntime
Expand Down
12 changes: 8 additions & 4 deletions debian/trixie/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ RUN apt-get update \

ENV PATH="/opt/jdk-${JAVA_VERSION}/bin:${PATH}"

ARG JLINK_MODULES_DEFAULT=java.base,java.logging,java.xml,java.management,java.net.http,jdk.crypto.ec,jdk.zipfs,jdk.unsupported,jdk.charsets

# Generate smaller java runtime without unneeded files
# for now we include the full module path to maintain compatibility
# while still saving space (approx 200mb from the full distribution)
RUN case "$(jlink --version 2>&1)" in \
"17."*) set -- "--compress=2" ;; \
"17."*) set -- "--compress=2" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK21
"21."*) set -- "--compress=zip-6" ;; \
"21."*) set -- "--compress=zip-6" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK25 (early access)
"25"*) mod_list="${JLINK_MODULES:-$JLINK_MODULES_DEFAULT}"; \
set -- "--compress=zip-6" --add-modules "$mod_list" ;; \
*) echo "ERROR: unmanaged jlink version pattern" && exit 1 ;; \
esac; \
jlink \
--strip-java-debug-attributes \
"$1" \
--add-modules ALL-MODULE-PATH \
"$@" \
--no-man-pages \
--no-header-files \
--output /javaruntime
Expand Down
100 changes: 100 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,52 @@ group "linux" {
targets = [
"alpine_jdk17",
"alpine_jdk21",
"alpine_jdk25",
"debian_jdk17",
"debian_jdk21",
"debian_jdk25",
"debian_slim_jdk17",
"debian_slim_jdk21",
"debian_slim_jdk25",
"rhel_ubi9_jdk17",
"rhel_ubi9_jdk21",
"rhel_ubi9_jdk25",
]
}

group "linux-arm64" {
targets = [
"alpine_jdk21",
"alpine_jdk25",
"debian_jdk17",
"debian_jdk21",
"debian_jdk25",
"debian_slim_jdk21",
"debian_slim_jdk25",
"rhel_ubi9_jdk17",
"rhel_ubi9_jdk21",
"rhel_ubi9_jdk25",
]
}

group "linux-s390x" {
targets = [
"debian_jdk17",
"debian_jdk21",
"debian_jdk25",
"debian_slim_jdk25",
]
}

group "linux-ppc64le" {
targets = [
"debian_jdk17",
"debian_jdk21",
"debian_jdk25",
"debian_slim_jdk25",
"rhel_ubi9_jdk17",
"rhel_ubi9_jdk21",
"rhel_ubi9_jdk25",
]
}

Expand Down Expand Up @@ -94,6 +107,10 @@ variable "JAVA21_VERSION" {
default = "21.0.8_9"
}

variable "JAVA25_VERSION" {
default = "25+9-ea-beta"
}

variable "TRIXIE_TAG" {
default = "20250929"
}
Expand Down Expand Up @@ -316,3 +333,86 @@ target "rhel_ubi9_jdk21" {
]
platforms = ["linux/amd64", "linux/arm64", "linux/ppc64le"]
}

target "alpine_jdk25" {
dockerfile = "alpine/hotspot/Dockerfile"
context = "."
args = {
JENKINS_VERSION = JENKINS_VERSION
WAR_SHA = WAR_SHA
WAR_URL = war_url()
COMMIT_SHA = COMMIT_SHA
PLUGIN_CLI_VERSION = PLUGIN_CLI_VERSION
ALPINE_TAG = ALPINE_FULL_TAG
JAVA_VERSION = JAVA25_VERSION
}
tags = [
tag(true, "alpine-jdk25"),
tag_weekly(false, "alpine-jdk25"),
tag_weekly(false, "alpine${ALPINE_SHORT_TAG}-jdk25"),
tag_lts(false, "lts-alpine-jdk25"),
]
platforms = ["linux/amd64", "linux/arm64"]
}

target "debian_jdk25" {
dockerfile = "debian/trixie/hotspot/Dockerfile"
context = "."
args = {
JENKINS_VERSION = JENKINS_VERSION
WAR_SHA = WAR_SHA
WAR_URL = war_url()
COMMIT_SHA = COMMIT_SHA
PLUGIN_CLI_VERSION = PLUGIN_CLI_VERSION
TRIXIE_TAG = TRIXIE_TAG
JAVA_VERSION = JAVA25_VERSION
}
tags = [
tag(true, "jdk25"),
tag_weekly(false, "latest-jdk25"),
tag_weekly(false, "jdk25"),
tag_lts(false, "lts-jdk25"),
tag_lts(true, "lts-jdk25")
]
platforms = ["linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le"]
}

target "debian_slim_jdk25" {
dockerfile = "debian/trixie-slim/hotspot/Dockerfile"
context = "."
args = {
JENKINS_VERSION = JENKINS_VERSION
WAR_SHA = WAR_SHA
WAR_URL = war_url()
COMMIT_SHA = COMMIT_SHA
PLUGIN_CLI_VERSION = PLUGIN_CLI_VERSION
TRIXIE_TAG = TRIXIE_TAG
JAVA_VERSION = JAVA25_VERSION
}
tags = [
tag(true, "slim-jdk25"),
tag_weekly(false, "slim-jdk25"),
tag_lts(false, "lts-slim-jdk25"),
]
platforms = ["linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le"]
}

target "rhel_ubi9_jdk25" {
dockerfile = "rhel/ubi9/hotspot/Dockerfile"
context = "."
args = {
JENKINS_VERSION = JENKINS_VERSION
WAR_SHA = WAR_SHA
WAR_URL = war_url()
COMMIT_SHA = COMMIT_SHA
PLUGIN_CLI_VERSION = PLUGIN_CLI_VERSION
JAVA_VERSION = JAVA25_VERSION
}
tags = [
tag(true, "rhel-ubi9-jdk25"),
tag_weekly(false, "rhel-ubi9-jdk25"),
tag_lts(false, "lts-rhel-ubi9-jdk25"),
tag_lts(true, "lts-rhel-ubi9-jdk25")
]
platforms = ["linux/amd64", "linux/arm64", "linux/ppc64le"]
}
12 changes: 8 additions & 4 deletions rhel/ubi9/hotspot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,23 @@ RUN dnf install --disableplugin=subscription-manager --setopt=install_weak_deps=

ENV PATH="/opt/jdk-${JAVA_VERSION}/bin:${PATH}"

ARG JLINK_MODULES_DEFAULT=java.base,java.logging,java.xml,java.management,java.net.http,jdk.crypto.ec,jdk.zipfs,jdk.unsupported,jdk.charsets

# Generate smaller java runtime without unneeded files
# for now we include the full module path to maintain compatibility
# while still saving space (approx 200mb from the full distribution)
RUN case "$(jlink --version 2>&1)" in \
"17."*) set -- "--compress=2" ;; \
"17."*) set -- "--compress=2" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK21
"21."*) set -- "--compress=zip-6" ;; \
"21."*) set -- "--compress=zip-6" "--add-modules" "ALL-MODULE-PATH" ;; \
# the compression argument is different for JDK25 (early access)
"25"*) mod_list="${JLINK_MODULES:-$JLINK_MODULES_DEFAULT}"; \
set -- "--compress=zip-6" --add-modules "$mod_list" ;; \
*) echo "ERROR: unmanaged jlink version pattern" && exit 1 ;; \
esac; \
jlink \
--strip-java-debug-attributes \
"$1" \
--add-modules ALL-MODULE-PATH \
"$@" \
--no-man-pages \
--no-header-files \
--output /javaruntime
Expand Down