Repository navigation
Upgrade local Docker registry from registry:2 to registry:3 in CI - #628
Merged
Merged
Conversation
…kflow Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenDJ/sessions/567deee2-889c-4394-86ab-0d7fa4dac317 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Upgrade local Docker registry from registry:2 to registry:3
Upgrade local Docker registry from Apr 8, 2026
registry:2 to registry:3 in CI
vharseko
marked this pull request as ready for review
April 9, 2026 07:34
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.
registry:2(v2.8.3) cannot reliably handle concurrent multi-platform blob uploads from BuildKit, causing widespread"blob unknown to registry"errors during multi-arch builds and a corrupted image that never passes the health check (exit 124).Changes
.github/workflows/build.yml: Upgrade the local registry service container fromregistry:2toregistry:3in bothbuild-dockerandbuild-docker-alpinejobsregistry:3(CNCF Distribution v3.0.0+) ships with improved blob storage concurrency and OCI spec compliance directly addressing the multi-platform push failures.Original prompt
Upgrade local Docker registry from
registry:2toregistry:3in CI workflowProblem
The
build-dockerandbuild-docker-alpinejobs in.github/workflows/build.ymlare failing because the localregistry:2(v2.8.3) service container cannot reliably handle concurrent multi-platform blob uploads from BuildKit during multi-architecture Docker image builds.The logs show widespread "blob unknown to registry" errors during the push phase:
This results in corrupted/incomplete images being pushed to the local registry. The subsequent
docker run+ health check then times out (exit code124) because the container never becomes healthy:Failing job: https://github.com/OpenIdentityPlatform/OpenDJ/actions/runs/24140290532/job/70467743979
Solution
Upgrade the local registry service container from
registry:2toregistry:3in both thebuild-dockerandbuild-docker-alpinejobs. Theregistry:3image (CNCF Distribution v3.0.0+) includes improved blob storage handling, better concurrency support, and OCI spec compliance that resolves the multi-platform push issues.Changes Required
In
.github/workflows/build.yml, update two lines:build-dockerjob): Changeimage: registry:2toimage: registry:3build-docker-alpinejob): Changeimage: registry:2toimage: registry:3No other changes are needed.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant:
I'll start by fetching the job logs and the workflow definition to understand the failure.
Assistant: Let me get more details from the workflow file and the full job logs to understand the build process better.
Assistant: ## Failing Job Analysis
Both the
build-dockerandbuild-docker-alpinejobs are failing. The root cause is the same for both:Problem
The multi-platform Docker builds (using
docker/build-push-actionwith QEMU) are pushing to a localregistry:2service container, but the "blob unknown to registry" errors during the push indicate that blobs from different platform builds are being lost or not properly stored in the local registry before the manifest list is assembled. This is a known issue when pushing multi-arch images to a local registry with BuildKit's default parallelism settings combined with the ephemeral nature of the registry service container.After the push "succeeds" (despite the blob errors), the Docker test step pulls the image and tries to run it, but the container never becomes healthy within the 3-minute timeout:
Exit code
124is thetimeoutcommand's exit code, meaning the container health check never passed — because the image was pushed with missing blobs/layers, resulting in a corrupted or incomplete image.Solution
The workflow already sets
max-parallelism = 1in the BuildKit config, which is good. However, the issue is that the localregistry:2service container doesn't handle concurrent cross-platform blob uploads reliably. Here are the recommended fixes:1. Use
type=registryprovenance and disable provenance/SBOM attestationsAttestation manifests can cause issues with registry v2. In both
docker/build-push-actionsteps, add:Do the same for the alpine build step.
2. Upgrade the local registry to a newer version
The
registry:2image (v2.8.3 per the logs) has known issues with concurrent blob uploads. Use a newer distribution registry:3. (Alternative) Use
--loadfor single-platform test, push multi-arch separatelyIf the goal is just to test the Docker image in CI, you can build only
linux/amd64for the test step and avoid the lo...This pull request was created from Copilot chat.