-
-
Save jniltinho/bcb28a99aef33dcb5f35c297bf71e4ae to your computer and use it in GitHub Desktop.
#!/bin/bash | |
# | |
# https://docs.docker.com/build/buildkit/ | |
# https://github.com/docker/buildx/releases/ | |
# https://github.com/docker/buildx | |
## 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 | |
good! tested working in ubuntu 22.04 with apt installed docker.
@yinrong Thanks !! 💯
Works in WSL, thank you
$ uname -a
Linux DESKTOP 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Thanks
thankyou, this worked
nice, thanks
Thank you!
Thank you! 🙏
apt-get install docker-buildx
apt-get install docker-buildx
@StefanBauerTT
I think it's interesting that you learn how to install something manually, it helps a lot in future projects and you become a better professional.
@jniltinho No offense :) Your gist was the second google result when searching for "docker buildkit ubuntu", so I just wanted to document that buildx is already present in the official package repository.
No offense :) Your gist was the second google result when searching for "docker buildkit ubuntu", so I just wanted to document that buildx is already present in the official package repository.
Nice !!
I will add the command to the gist for Ubuntu 24.04.
Thanks,
works in Ubuntu 20.04.6 LTS. You really save my life. Thanks
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
good! tested working in ubuntu 22.04 with apt installed docker.