For a while now, I've been building various #Docker images using a tool called #Kaniko, which runs in securely in userspace and can safely build images in #Kubernetes using #Gitlab CI.

I experimented today with using #BuildKit, which does the same basic thing as Kaniko but is faster, handles more complex build systems, and can build multi-arch images. It wasn't too hard to switch my Gitlab CI over to using it, just a few relatively simple tweaks and it was able to build even relatively sophisticated images (including one that choked newer versions of Kaniko) with ease.

Check the .gitlab-ci.yml file of the project below for a straightforward example.

https://gitlab.koehn.com/docker/postgres-wal-g

1