A reference example on how to build multi-arch Linux images using Azure Pipelines
APACHE-2.0 License
This is a shim/template repo for an Azure DevOps pipeline to build multi-architecture images:
At the Azure Pipelines level, this creates:
Because I needed a simple, re-usable example of how to build multi-architecture images (in, this case, Linux for several different CPU architectures) that I could both re-use and share with customers.
Images are created atop a local base (in this case Ubuntu) with a corresponding qemu-user-static
binary embedded, which allows most CI systems to build ARM images atop an amd64
CPU.
The sample src/Dockerfile
only installs zsh
into that image, but the intent is that you can build this up from there.
Most of the image generation logic (including embedding QEMU and building the final manifest that allows for automatic discovery of architecture-specific tags) lives inside the Makefile
.
This is done because:
Makefile
allows for easy local testingMakefile
DOCKER_USERNAME
and DOCKER_PASSWORD
to be set as private global variables for the pipeline--I recommend using linked variables at the organization level).