How to build a docker multiarch image with buildah

Let’s say we want to build a custom multiarch image named my-image. Very simple and minimalistic Dockerfile example: FROM debian:latest With buildah Login to docker hub or your private registry: buildah login docker.io Create a manifest, it is a kind of enveloppe who will contain your docker image with different architectures. buildah manifest create my-manifest Build images and store them in your manifest: for PLATFORM in linux/386 linux/amd64 linux/arm64/v8 linux/arm/v5 linux/arm/v6 linux/arm/v7 linux/arm/v8 linux/s390x linux/ppc64le do buildah bud --manifest my-manifest --platform ${PLATFORM} done $PLATFORM variable use $GOOS and $GOARCH variables, you can get a list by clicking here...

<span title='2022-02-09 10:00:00 +0000 UTC'>February 9, 2022</span>&nbsp;·&nbsp;2 min&nbsp;·&nbsp;JC