Install Docker Buildx
Docker Buildx is included in Docker Desktop for Windows, macOS, and Linux.
Docker Linux packages also include Docker Buildx when installed using the DEB or RPM packages.
Here is how to install and use Buildx inside a Dockerfile through the
FROM docker COPY --from=docker/buildx-bin:latest /buildx /usr/libexec/docker/cli-plugins/docker-buildx RUN docker buildx version
This section is for unattended installation of the buildx component. These instructions are mostly suitable for testing purposes. We do not recommend installing buildx using manual download in production environments as they will not be updated automatically with security updates.
You can also download the latest binary from the releases page on GitHub.
Rename the relevant binary and copy it to the destination matching your OS:
|OS||Binary name||Destination folder|
Or copy it into one of these folders for installing it system-wide.
On Unix environments:
On Unix environments, it may also be necessary to make it executable with
$ chmod +x ~/.docker/cli-plugins/docker-buildx
Set buildx as the default builder
To remove this alias, run
docker buildx uninstall.