Install fontconfig in Corretto 8 native AL2 images#286
Merged
Conversation
mmm-choi
force-pushed
the
fix-corretto8-al2-fontconfig
branch
from
July 22, 2026 04:14
77cf819 to
0879cde
Compare
Rudometov
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fontconfigexplicitly in the Corretto 8 native AL2 JDK and JRE imagesUIManagerfont-initialization regression testBackground
On x86_64, the Corretto 8u492 AL2 runtime RPM contained JavaFX libraries including
libjavafx_font_pango.soandlibglassgtk2.so. Those libraries requiredlibfontconfig.so.1, so the native Dockerfiles pulled infontconfigtransitively throughyum deplist.Those JavaFX libraries were removed from the x86_64 8u502 runtime RPM, which also removed the transitive
libfontconfig.so.1requirement. The native AL2 Dockerfiles therefore stopped installingfontconfig. This causes Swing font initialization to fail with aFontConfigurationNullPointerExceptionin the Docker Official Imagesjava-uimanager-fonttest. The AL2 generic image is unaffected because it already installsfontconfigexplicitly.This change makes the existing font-support expectation explicit instead of relying on an optional component to provide it transitively.
Related failure: docker-library/official-images#21894
Architecture
The aarch64 runtime and devel RPMs contain no JavaFX in either 8u492 or 8u502, and neither version declares
libfontconfig.so.1; there is no corresponding JavaFX-related dependency transition on aarch64. The Dockerfile fix is architecture-neutral: the arm64 base image resolvesfontconfigfor aarch64, while the existingARCHdetection downloads the aarch64 Corretto RPMs. This makes font support explicit on both supported architectures.Runtime tests below were executed on x64 because the current CI and local builder are x64. The published aarch64 8u492 and 8u502 runtime/devel RPM metadata and payloads were checked separately.
Scope
The Java 11 and 17 native AL2 Dockerfiles also resolve system packages through
yum deplist, so they remain susceptible to future changes in transitive RPM requirements. They pass today; this PR is scoped to Java 8 because 8u502 is the release with the observed x86_64 regression.Testing
8/jdk/al2/Dockerfileand8/jre/al2/Dockerfileon x64java-uimanager-fonttest on both imagesNullPointerExceptionlibfontconfig.so.1