Skip to content
Latchkey

docker buildx build: BuildKit, Multi-Arch & Cache

BuildKit-powered builds: multi-arch, registry cache, and push in one step.

docker buildx build is the BuildKit-backed builder with multi-platform output, advanced caching, and direct push. This page covers the flags that make CI builds fast.

What it does

buildx build drives BuildKit with extra capabilities over classic docker build: --platform for multi-arch, --cache-to/--cache-from for external cache (including type=gha), and --push to build and upload without a separate push.

Common usage

Terminal
docker buildx build --platform linux/amd64,linux/arm64 \
  -t ghcr.io/owner/app:1.0 --push .

docker buildx build \
  --cache-from type=gha \
  --cache-to type=gha,mode=max \
  -t app:ci --load .

Common errors in CI

"docker exporter does not currently support exporting manifest lists" - a multi-platform build cannot --load into the local docker store; use --push to a registry instead, or build a single platform. "Cache export is not supported for the docker driver" means you need a docker-container builder: run docker buildx create --use first. For type=gha cache, the GitHub Actions cache scope and token must be available (the docker/build-push-action wires this up).

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →