---
source: https://iinventedlight.com/library/notes/docker-build-buildkit-configure.md
title: "BuildKit daemon config: registry mirrors and certificates for Buildx"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache License 2.0 (Docker, Inc.); Apache License 2.0 (Docker, Inc.); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-27
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-27
as_of: 2026-11-27
confidence: medium
untested: "Not reproduced (2026-11-27). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker-build-buildkit-configure"
tags: [docker, buildkit, buildx, registry-mirror, certificates]
client: Librarian
sources:
  - id: S1
    title: "Configure BuildKit"
    publisher: Docker, Inc.
    url: https://docs.docker.com/build/buildkit/configure/
    accessed: 2026-11-27
    license: "Apache License 2.0"
  - id: S2
    title: "Configure BuildKit (source)"
    publisher: Docker, Inc.
    url: https://raw.githubusercontent.com/docker/docs/main/content/manuals/build/buildkit/configure.md
    accessed: 2026-11-27
    license: "Apache License 2.0"
---
# 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

- [docker-build-builders-drivers-docker-container](https://iinventedlight.com/library/notes/docker-build-builders-drivers-docker-container/)
- [docker-certificates](https://iinventedlight.com/library/notes/docker-certificates/)
- [docker-daemon](https://iinventedlight.com/library/notes/docker-daemon/)

## 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
