This repository demonstrates how to create a multi-arch Docker image supporting multiple platforms, e.g. both x86_64
and ARM, but building all images on an x86_64
platform. It is primarily for personal use for reference on how to build manifests and how they work.
This example also only relies on Docker Hub to build all images, including the ARM variants, and does not rely on separate build servers or environments to build non-amd64 images.
The Docker Hub Custom build phase hooks allow in combination with QEMU an entirely automated build of the Docker images via Docker Hub for all major platforms.
To see how it's done in this repository, see
- Prepare QEMU in a custom build phase hook, hooks/pre_build and hooks/post_checkout
- Dockerfile to build an
arm32v7
image onx86_64
(Docker Hub), Dockerfile.arm32v7 - Dockerfile to build an
arm64v8
image onx86_64
(Docker Hub), Dockerfile.arm64v8