How to build an alpine distroless docker image with buildah

TL;DR If you don’t care about distroless bla-bla and just want to know how to create distroless alpine images, click here Distroless ? In a distroless docker image, you won’t find any shell, package manager or utilities such as grep, sed, awk, … It runs only your application and nothing else. Don’t expect to launch commands like docker run -it my-distroless-image something, it will fail with a message like this one:...

<span title='2022-02-13 00:00:00 +0000 UTC'>February 13, 2022</span>&nbsp;·&nbsp;4 min&nbsp;·&nbsp;JC

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