← All notes

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

Sources

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

Permanent ID: iil:note:dpmmhgvj

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.},
}

Markdown

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.

All artifact files (JSON index)

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.