-
-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Labels
Description
What feature do you want to see added?
Generate smaller java runtime without unneeded files like it's done in Linux images:
docker-agent/debian/Dockerfile
Lines 32 to 51 in e2560a9
# 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 if test "${TARGETPLATFORM}" != 'linux/arm/v7'; then \ | |
case "$(jlink --version 2>&1)" in \ | |
# jlink version 11 has less features than JDK17+ | |
"11."*) strip_java_debug_flags=("--strip-debug") ;; \ | |
*) strip_java_debug_flags=("--strip-java-debug-attributes") ;; \ | |
esac; \ | |
jlink \ | |
--add-modules ALL-MODULE-PATH \ | |
"${strip_java_debug_flags[@]}" \ | |
--no-man-pages \ | |
--no-header-files \ | |
--compress=2 \ | |
--output /javaruntime; \ | |
# It is acceptable to have a larger image in arm/v7 (arm 32 bits) environment. | |
# Because jlink fails with the error "jmods: Value too large for defined data type" error. | |
else cp -r /opt/java/openjdk /javaruntime; \ | |
fi |
Upstream changes
No response
Are you interested in contributing this feature?
Yes, I've already implemented it while working on #787
gounthar