Skip to content

Instantly share code, notes, and snippets.

@jniltinho
Last active July 19, 2024 00:09
Show Gist options
  • Save jniltinho/bcb28a99aef33dcb5f35c297bf71e4ae to your computer and use it in GitHub Desktop.
Save jniltinho/bcb28a99aef33dcb5f35c297bf71e4ae to your computer and use it in GitHub Desktop.
Enable BuildKit Docker Ubuntu 22.04|24.04
#!/bin/bash
#
# https://docs.docker.com/build/buildkit/
# https://github.com/docker/buildx/releases/
# https://github.com/docker/buildx
#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
export COMPOSE_DOCKER_CLI_BUILD=1' >> $HOME/.profile
@infinityonlinesolutions
Copy link

Thank you!

@jasonacox
Copy link

Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment