← All notes

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

  1. 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.
  2. Multiple native nodes: better support for more complicated cases that QEMU can't handle, and better performance.
  3. Cross-compilation with multi-stage builds: the build stage runs on the native platform and compiles for the target, using the TARGETPLATFORM build 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

Sources

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

Permanent ID: iil:note:gv3avsjb

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

Markdown

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.