feat(builds): configure local registry as Docker Hub mirror in BuildKit#88
Closed
hiroTamada wants to merge 1 commit intomainfrom
Closed
feat(builds): configure local registry as Docker Hub mirror in BuildKit#88hiroTamada wants to merge 1 commit intomainfrom
hiroTamada wants to merge 1 commit intomainfrom
Conversation
Add docker.io mirror configuration to the generated buildkitd.toml so BuildKit tries the local registry first when pulling base images (e.g., FROM node:20-alpine). Falls back to Docker Hub if not found locally. This avoids redundant Docker Hub pulls when base images have already been mirrored to the local registry, without needing Dockerfile rewriting or other application-level workarounds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
[registry."docker.io"] mirrors = ["{local-registry}"]to the generatedbuildkitd.tomlin the builder agentFROM node:20-alpine(or any docker.io image), it tries the local registry first, falling back to Docker Hub if not foundPrerequisites for production testing
Base images need to be available in the local registry for the mirror to provide a hit. This can be done by pulling them into hypeman's registry ahead of time (e.g., via the images API).
Test plan
global_cache_key=nodeto populate the global cachenode:20-alpineinto the local registry (if not already there)FROM node:20-alpineand check builder VM logs — BuildKit should try the local registry first🤖 Generated with Claude Code