Building images, topic 23 of 41
Multi-platform images
Optional
An image is built for one CPU architecture. A laptop with Apple silicon builds arm64 images, and a server is often amd64: an image built on one may not start on the other, with an exec format error.
docker buildx build --platform linux/amd64,linux/arm64 builds both and pushes them under one tag, and each machine pulls its own. Use --platform on a single build when you only need the server's.
On Opsfolk
Nothing of ours for this topic yet: an article is on its way.
Elsewhere
- Multi-platform buildsOfficial