mirror of https://github.com/docker/docs.git
Update buildx install section
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
857e2316c9
commit
1f1188958e
|
@ -14,24 +14,66 @@ multiple nodes concurrently.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Docker Buildx is included in Docker Desktop and Docker Linux packages when
|
### Windows and macOS
|
||||||
installed using the [DEB or RPM packages](../engine/install/index.md).
|
|
||||||
|
|
||||||
You can also download the latest `buildx` binary from the
|
Docker Buildx is included in [Docker Desktop](../desktop/index.md) for Windows
|
||||||
[Docker buildx](https://github.com/docker/buildx/releases/latest){:target="_blank" rel="noopener" class="_"} releases page
|
and macOS.
|
||||||
on GitHub, copy it to `~/.docker/cli-plugins` folder with name
|
|
||||||
`docker-buildx` and change the permission to execute:
|
|
||||||
|
|
||||||
```console
|
### Linux packages
|
||||||
$ chmod a+x ~/.docker/cli-plugins/docker-buildx
|
|
||||||
```
|
|
||||||
|
|
||||||
Here is how to use buildx inside a Dockerfile through the
|
Docker Linux packages also include Docker Buildx when installed using the
|
||||||
|
[DEB or RPM packages](../engine/install/index.md).
|
||||||
|
|
||||||
|
### Manual download
|
||||||
|
|
||||||
|
> **Important**
|
||||||
|
>
|
||||||
|
> 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.
|
||||||
|
>
|
||||||
|
> On Windows and macOS, we recommend that you install [Docker Desktop](../desktop/index.md)
|
||||||
|
> instead. For Linux, we recommend that you follow the [instructions specific for your distribution](#linux-packages).
|
||||||
|
{: .important}
|
||||||
|
|
||||||
|
You can also download the latest binary from the [releases page on GitHub](https://github.com/docker/buildx/releases/latest){:target="_blank" rel="noopener" class="_"}.
|
||||||
|
|
||||||
|
Rename the relevant binary and copy it to the destination matching your OS:
|
||||||
|
|
||||||
|
| OS | Binary name | Destination folder |
|
||||||
|
| -------- | -------------------- | -----------------------------------------|
|
||||||
|
| Linux | `docker-buildx` | `$HOME/.docker/cli-plugins` |
|
||||||
|
| macOS | `docker-buildx` | `$HOME/.docker/cli-plugins` |
|
||||||
|
| Windows | `docker-buildx.exe` | `%USERPROFILE%\.docker\cli-plugin` |
|
||||||
|
|
||||||
|
Or copy it into one of these folders for installing it system-wide.
|
||||||
|
|
||||||
|
On Unix environments:
|
||||||
|
|
||||||
|
* `/usr/local/lib/docker/cli-plugins` OR `/usr/local/libexec/docker/cli-plugins`
|
||||||
|
* `/usr/lib/docker/cli-plugins` OR `/usr/libexec/docker/cli-plugins`
|
||||||
|
|
||||||
|
On Windows:
|
||||||
|
|
||||||
|
* `C:\ProgramData\Docker\cli-plugins`
|
||||||
|
* `C:\Program Files\Docker\cli-plugins`
|
||||||
|
|
||||||
|
> **Note**
|
||||||
|
>
|
||||||
|
> On Unix environments, it may also be necessary to make it executable with `chmod +x`:
|
||||||
|
> ```shell
|
||||||
|
> $ chmod +x ~/.docker/cli-plugins/docker-buildx
|
||||||
|
> ```
|
||||||
|
|
||||||
|
### Dockerfile
|
||||||
|
|
||||||
|
Here is how to install and use Buildx inside a Dockerfile through the
|
||||||
[`docker/buildx-bin`](https://hub.docker.com/r/docker/buildx-bin) image:
|
[`docker/buildx-bin`](https://hub.docker.com/r/docker/buildx-bin) image:
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM docker
|
FROM docker
|
||||||
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
COPY --from=docker/buildx-bin:latest /buildx /usr/libexec/docker/cli-plugins/docker-buildx
|
||||||
RUN docker buildx version
|
RUN docker buildx version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue