GeezerVison is showing github.com — Use prebuilt CI Docker images from GHCR by hyperxpro · Pull Request #256 · hyperxpro/Brotli4j
Conversation
hyperxpro
commented
May 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Replace inline Dockerfile builds with prebuilt images from GHCR.
- 18 images covering x86_64 / aarch64 / armv7 / s390x / ppc64le / riscv64 × JDK 8/11/17/21
- Dockerfiles in
docker-ci/; built by .github/workflows/build-ci-images.yml (manual trigger)
- Eliminates the >1h apt-get-under-QEMU phase on emulated arches; preserves the original glibc/gcc ABI floor
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Building Dockerfiles inline on every CI run was costing >1h on emulated
architectures (s390x, ppc64le, riscv64) — the bulk of which was
apt-get install running under QEMU. Replaces inline builds with images
pre-baked by hyperxpro/Brotli4j-CI-Docker and pulled from
ghcr.io/hyperxpro/brotli4j-ci.
x86_64 (4 jobs): docker compose -f docker/docker-compose*.yml replaced
with docker pull + docker run against x86_64-centos6-jdk{8,11,17,21}.
The CentOS 6 base is preserved for glibc 2.12 ABI compat.
run-on-arch jobs (14 jobs): switch to arch: none, distro: none with
base_image: --platform=linux/<plat> ghcr.io/...:<arch>-<os>-jdk<n>.
Each job adds a docker/setup-qemu-action@v3 step. The inline install:
blocks are removed; githubToken: is dropped (the action's GHCR caching
is unnecessary now and conflicts with custom base_image). Action
bumped from @v3.0.1 to @V3. MAVEN_OPTS=-Djdk.lang.Process.launchMechanism=vfork
preserved verbatim where it was used.
The 18 Docker-based jobs pull from ghcr.io/hyperxpro/brotli4j-ci.
Add a docker login step (using GITHUB_TOKEN) so the workflow works
whether the GHCR packages are public or private. Also grants the
job-level packages: read permission needed when the workflow
declares a permissions block.
Bring the 18 (arch x JDK) Dockerfiles and a manual-trigger build
workflow into the main repo so the CI image pipeline lives alongside
the consumer pipeline.
docker-ci/x86_64/centos6-jdk{8,11,17,21}/Dockerfile
docker-ci/aarch64/centos7-jdk{8,11,17,21}/Dockerfile
docker-ci/armv7/debian11-jdk{8,11,17}/Dockerfile
docker-ci/s390x/ubuntu2004-jdk{8,11}/Dockerfile
docker-ci/ppc64le/ubuntu2004-jdk{8,11}/Dockerfile
docker-ci/riscv64/ubuntu{2004-jdk{11,17},2204-jdk21}/Dockerfile
.github/workflows/build-ci-images.yml is workflow_dispatch only — these
images are heavy to build under QEMU emulation and should never run on
push or PR. The workflow publishes both <arch>-<os>-jdk<n> floating tags
and immutable -sha-<short> tags to ghcr.io/<owner>/brotli4j-ci, with
org.opencontainers.image.source set so GHCR attributes the package to
this repo.
GitHub's REST API only lets workflow_dispatch target workflows that
exist on the default branch or have run at least once. To register the
workflow without merging it to main, add a push trigger scoped to the
dedicated docker-ci-images branch — pushing there is itself the
explicit "rebuild images" signal.
The brotli4j-ci package on GHCR was originally created by the
Brotli4j-CI-Docker repo, so GITHUB_TOKEN from this repo cannot push
to it (write_package denied). Use a fresh package name owned by this
repo from first publish so no manual GHCR linkage is required.
Updates both the image-build workflow and the 18 cicd-pipeline.yml
references in lockstep so the consumer pulls from the same name.
The CentOS 7 base for aarch64 ships gcc 4.8.5 which defaults to gnu90
and rejects brotli's C99 'for (int i = 0; ...)' declarations. The
Debian 11 base for armv7 was also a gratuitous deviation from the
original CI environment.
Switch back to the exact bases the original install: blocks ran on:
- aarch64 jdk{8,11,17}: arm64v8/ubuntu:18.04 (jabba+Corretto tarball)
- aarch64 jdk21: arm64v8/ubuntu:20.04 (jabba+Corretto tarball)
- armv7 jdk{8,11}: arm32v7/ubuntu:18.04 (jabba+Zulu armhf tarball)
- armv7 jdk17: arm32v7/ubuntu:18.04 (Adoptium apt temurin-17)
Preserves the original glibc/gcc ABI floor for the produced .so so it
loads on systems with older toolchains. Renames the matrix entries and
all corresponding cicd-pipeline.yml image references.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
1 more reviewer
Reviewers whose approvals may not affect merge requirements
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|