Last active
November 12, 2025 01:00
-
-
Save jniltinho/bcb28a99aef33dcb5f35c297bf71e4ae to your computer and use it in GitHub Desktop.
Enable BuildKit Docker on Linux Dist, Debian, Ubuntu, Fedora
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # https://docs.docker.com/build/buildkit/ | |
| # https://github.com/docker/buildx/releases/ | |
| # https://github.com/docker/buildx | |
| ## docker builder prune --all | |
| ## docker buildx du --verbose | |
| ## For Ubuntu 24.04 try: sudo apt install docker-buildx | |
| ## Or run the commands below. | |
| #VERSION=v0.14.1 | |
| VERSION=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/docker/buildx/releases/latest) | |
| VERSION=${VERSION##*/} | |
| mkdir -p $HOME/.docker/cli-plugins | |
| wget https://github.com/docker/buildx/releases/download/$VERSION/buildx-$VERSION.linux-amd64 -O $HOME/.docker/cli-plugins/docker-buildx | |
| chmod +x $HOME/.docker/cli-plugins/docker-buildx | |
| export DOCKER_BUILDKIT=1 | |
| export COMPOSE_DOCKER_CLI_BUILD=1 | |
| echo 'export DOCKER_BUILDKIT=1' >> $HOME/.profile | |
| echo 'export COMPOSE_DOCKER_CLI_BUILD=1' >> $HOME/.profile | |
Works on Arch Linux!!
Awesome, thx!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works for:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" NAME="Debian GNU/Linux" VERSION_ID="12" VERSION="12 (bookworm)" VERSION_CODENAME=bookworm ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"Thanks1