Skip to content

Install fontconfig in Corretto 8 native AL2 images#286

Merged
mmm-choi merged 1 commit into
corretto:mainfrom
mmm-choi:fix-corretto8-al2-fontconfig
Jul 22, 2026
Merged

Install fontconfig in Corretto 8 native AL2 images#286
mmm-choi merged 1 commit into
corretto:mainfrom
mmm-choi:fix-corretto8-al2-fontconfig

Conversation

@mmm-choi

@mmm-choi mmm-choi commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • install fontconfig explicitly in the Corretto 8 native AL2 JDK and JRE images
  • add an AL2-scoped Swing UIManager font-initialization regression test

Background

On x86_64, the Corretto 8u492 AL2 runtime RPM contained JavaFX libraries including libjavafx_font_pango.so and libglassgtk2.so. Those libraries required libfontconfig.so.1, so the native Dockerfiles pulled in fontconfig transitively through yum deplist.

Those JavaFX libraries were removed from the x86_64 8u502 runtime RPM, which also removed the transitive libfontconfig.so.1 requirement. The native AL2 Dockerfiles therefore stopped installing fontconfig. This causes Swing font initialization to fail with a FontConfiguration NullPointerException in the Docker Official Images java-uimanager-font test. The AL2 generic image is unaffected because it already installs fontconfig explicitly.

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 resolves fontconfig for aarch64, while the existing ARCH detection 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

  • built 8/jdk/al2/Dockerfile and 8/jre/al2/Dockerfile on x64
  • passed the exact Docker Official Images java-uimanager-font test on both images
  • passed the upstream container-structure-test suites on both images
  • confirmed the AL2 regression test fails on the unpatched 8u502 JRE image with the original NullPointerException
  • confirmed the aarch64 8u492 and 8u502 runtime/devel RPMs do not declare libfontconfig.so.1

@mmm-choi
mmm-choi force-pushed the fix-corretto8-al2-fontconfig branch from 77cf819 to 0879cde Compare July 22, 2026 04:14
@mmm-choi
mmm-choi merged commit a4a86ad into corretto:main Jul 22, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants