Among the main points that Buildkit brings are the following:
- parallel resolution of dependencies
- better cache management (import/export, resolution)
- ability to distribute workloads
- run without root privileges
And so, as mentioned above, buildkit is now included in docker CLI. Problem, the available and pre-packaged version is not up to date with the latest developments.
If you want to take advantage of the latest evolutions, you will need to update.
This tutorial uses buildx version 0.4.1.
Remember to check the latest version number before copying and pasting the instructions.
Check the existence of the
If it doesn’t exist, create the
Download the latest buildx version from the Buildx release page on Github or directly from your terminal.
wget -O ~/.docker/cli-plugins/docker-buildx https://github.com/docker/buildx/releases/download/v0.4.1/buildx-v0.4.1.linux-amd64
Set execution rights on the binary:
chmod +x ~/.docker/cli-plugins/docker-buildx.
We just have to check if the buildx version is now the expected one.
docker buildx version
If you want buildx to become the default builder of Docker CLI
docker builx install