docker buildx versionUseful to confirm feature availability.
Modern BuildKit and Buildx reference for multi-platform builds, cache, secrets, and remote outputs.
Modern BuildKit-powered multi-platform build workflows.
docker buildx versionUseful to confirm feature availability.
docker buildx lsHelpful for checking which builder is active and what it can build.
docker buildx create --name multiarch --useCommon first step for multi-platform builds.
docker buildx inspect --bootstrapShows driver, nodes, and platform support.
docker buildx use multiarchUseful when you maintain separate local and CI builders.
docker buildx rm multiarchCleanup after experiments or when rotating build nodes.
Multi-platform builds, outputs, caching, and provenance.
docker buildx build -t ghcr.io/acme/myapp:dev .This is the modern build command for advanced workflows.
Build and load the result into the local Docker image store.
docker buildx build --load -t myapp:dev .Useful for single-platform local testing.
docker buildx build --push -t ghcr.io/acme/myapp:1.0.0 .Common in CI where the local daemon store is not needed.
docker buildx build --platform linux/amd64,linux/arm64 --push -t ghcr.io/acme/myapp:1.0.0 .Clients pull the matching platform automatically.
docker buildx build --target build --load -t myapp:build .Useful with multi-stage Dockerfiles and advanced builders.
docker buildx build --cache-from type=registry,ref=ghcr.io/acme/myapp:cache --cache-to type=registry,ref=ghcr.io/acme/myapp:cache,mode=max --push -t ghcr.io/acme/myapp:1.0.0 .Very effective for repeat builds across runners.
Pass a secret into the build without baking it into layers.
docker buildx build --secret id=npmrc,src=$HOME/.npmrc -t myapp:dev .A best practice for private package registries.
Forward SSH credentials into the build for private Git access.
docker buildx build --ssh default -t myapp:dev .Useful when a build clones private repositories.
docker buildx bakeUseful for orchestrating multiple targets and shared settings.
Inspect remote image index details and available platforms.
docker buildx imagetools inspect ghcr.io/acme/myapp:1.0.0Excellent for verifying multi-platform publishing.