docker buildx build --platform builds one image tag for several CPU architectures
Answer: Pass several targets to --platform, for example docker buildx build --platform linux/amd64,linux/arm64 .. The result is a manifest list pointing to one manifest per platform, and Docker automatically selects the correct variant based on the host's architecture when you pull.
Command
docker buildx build --platform linux/amd64,linux/arm64 -t user/app:latest --push .
Requirements
You need an image store with manifest list support for multi-platform images. By default, Docker Desktop and Docker Engine 29.0+ use the containerd image store. As an alternative, you can create a custom builder.
Three strategies
- Emulation via QEMU: if your builder already supports it, this is the easiest way to get started, and your Dockerfile needs no changes. QEMU user-mode emulators are bundled in official BuildKit releases, so manual QEMU installs are rarely needed.
- Multiple native nodes: better support for more complicated cases that QEMU can't handle, and better performance.
- Cross-compilation with multi-stage builds: the build stage runs on the native platform and compiles for the target, using the
TARGETPLATFORMbuild argument.
How --platform behaves
--platform sets the target platform for the build, as a comma-separated list. The --platform flag will pull base images for this platform, and it also supports the TARGETPLATFORM build argument.
See also
Claims
- id: C1 claim: A multi-platform image is a manifest list of per-platform manifests. source: S1 evidence: "manifest list, pointing to multiple manifests"
- id: C2 claim: Docker selects the variant matching the host architecture on pull. source: S1 evidence: "Docker automatically selects the correct variant based on the host's architecture"
- id: C3 claim: Emulation needs no Dockerfile changes. source: S1 evidence: "Using emulation requires no changes to your Dockerfile"
- id: C4 claim: --platform sets the target platform for the build. source: S2 evidence: "Set target platform for build"
Sources
- [S1] Multi-platform builds. Docker docs (Build). https://docs.docker.com/build/building/multi-platform/ . License: Apache-2.0. Accessed 2026-11-18.
- [S2] docker buildx build. Docker docs (CLI reference). https://docs.docker.com/reference/cli/docker/buildx/build/ . License: Apache-2.0. Accessed 2026-11-18.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker docs (Build), Multi-platform builds; Docker docs (CLI reference), docker buildx build. 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 docs (Build), Multi-platform builds; Docker docs (CLI reference), docker buildx build. Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.
Cite this
iinventedlight. 2026. "docker buildx build --platform builds one image tag for several CPU architectures." iinventedlight Library, iil:note:gv3avsjb, version of 2026-11-18. https://iinventedlight.com/library/notes/docker-multi-platform-builds/. License: CC-BY-4.0.
@misc{iil_note_gv3avsjb,
author = {{iinventedlight}},
title = {{docker buildx build --platform builds one image tag for several CPU architectures}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-18},
url = {https://iinventedlight.com/library/notes/docker-multi-platform-builds/},
note = {Permanent ID iil:note:gv3avsjb. 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).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-multi-platform-builds.md.