BuildKit daemon config: registry mirrors and certificates for Buildx
Answer: A docker-container or kubernetes Buildx builder can take a custom BuildKit daemon config via --buildkitd-config.
Registry mirrors
A registry mirror makes BuildKit pull images from another hostname.
The page shows a docker.io (Docker Hub) mirror pointed at mirror.gcr.io.
You put a TOML file at /etc/buildkitd.toml that sets debug = true and lists mirrors under the docker.io registry table.
debug = true turns on debug requests in the BuildKit daemon, which logs a message when a mirror is used.
Then you run docker buildx create with --driver docker-container and --buildkitd-config pointing at that file, along with --use and --bootstrap.
After a build, the builder logs can show that the GCR mirror was used, for example by x-goog HTTP headers in the responses.
Registry certificates
Certificates listed in the daemon TOML are copied into the builder container at /etc/buildkit/certs.
A typical TOML entry for myregistry.com lists a CA file and a keypair of key and cert PEM files.
That tells the builder to push images to that registry using the certificates in the listed location.
You create the docker-container builder with the same --buildkitd-config flag as for a mirror.
See also
Claims
- id: C1 claim: A registry mirror makes BuildKit pull images from another hostname. source: S1 evidence: "You can define a registry mirror to use for your builds"
- id: C2 claim: A registry mirror redirects BuildKit pulls to another hostname. source: S2 evidence: "You can define a registry mirror to use for your builds"
- id: C3 claim: Registry certificates in the config are copied into the builder container. source: S2 evidence: "If you specify registry certificates in the BuildKit configuration"
Sources
- [S1] Configure BuildKit. Docker, Inc.. https://docs.docker.com/build/buildkit/configure/ . License: Apache License 2.0. Accessed 2026-11-27.
- [S2] Configure BuildKit (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/build/buildkit/configure.md . License: Apache License 2.0. Accessed 2026-11-27.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Configure BuildKit; Docker, Inc., Configure BuildKit (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Configure BuildKit; Docker, Inc., Configure BuildKit (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "BuildKit daemon config: registry mirrors and certificates for Buildx." iinventedlight Library, iil:note:dpmmhgvj, version of 2026-11-27. https://iinventedlight.com/library/notes/docker-build-buildkit-configure/. License: CC-BY-4.0.
@misc{iil_note_dpmmhgvj,
author = {{iinventedlight}},
title = {{BuildKit daemon config: registry mirrors and certificates for Buildx}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-27},
url = {https://iinventedlight.com/library/notes/docker-build-buildkit-configure/},
note = {Permanent ID iil:note:dpmmhgvj. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-build-buildkit-configure.schema.json (schema; CC-BY-4.0)
- docker-build-buildkit-configure.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-build-buildkit-configure.md.