Konubinix' opinionated web of thoughts

Buildx

Fleeting

Docker Buildx | Docker Documentation

Docker Buildx is a CLI plugin that extends the docker command with the full support of the features provided by Moby BuildKit builder toolkit.

https://docs.docker.com/buildx/working-with-buildx/

The docker buildx build command supports features available for docker build, including the new features in Docker 19.03

https://docs.docker.com/buildx/working-with-buildx/

By default, Buildx uses the “docker” driver if it is supported, providing a user experience very similar to the native docker build.

https://docs.docker.com/buildx/working-with-buildx/

Buildx allows you to create new instances of isolated builders.

https://docs.docker.com/buildx/working-with-buildx/

BuildKit is designed to work well for building for multiple platforms and not only for the architecture and operating system that the user invoking the build happens to run.

https://docs.docker.com/buildx/working-with-buildx/

When the current builder instance is backed by the “docker-container” driver, you can specify multiple platforms together. In this case, it builds a manifest list which contains images for all of the specified architectures.

https://docs.docker.com/buildx/working-with-buildx/

You can build multi-platform images using three different strategies that are supported by Buildx and Dockerfiles:

Using the QEMU emulation support in the kernel Building on multiple native nodes using the same builder instance Using a stage in Dockerfile to cross-compile to different architectures

https://docs.docker.com/buildx/working-with-buildx/

When BuildKit needs to run a binary for a different architecture, it automatically loads it through a binary registered in the binfmt_misc handler.

https://docs.docker.com/buildx/working-with-buildx/

multiple native nodes provide better support for more complicated cases that are not handled by QEMU and generally have better performance

https://docs.docker.com/buildx/working-with-buildx/