Skip to content

Commit 2e31089

Browse files
authored
Merge pull request #3186 from crazy-max/fix-readme
update readme
2 parents 2149f03 + cd48c51 commit 2e31089

File tree

1 file changed

+39
-40
lines changed

1 file changed

+39
-40
lines changed

README.md

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Go Report Card](https://goreportcard.com/badge/github.com/docker/buildx?style=flat-square)](https://goreportcard.com/report/github.com/docker/buildx)
77
[![codecov](https://img.shields.io/codecov/c/github/docker/buildx?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/buildx)
88

9-
`buildx` is a Docker CLI plugin for extended build capabilities with
9+
Buildx is a Docker CLI plugin for extended build capabilities with
1010
[BuildKit](https://github.com/moby/buildkit).
1111

1212
Key features:
@@ -16,7 +16,7 @@ Key features:
1616
- Multiple builder instance support
1717
- Multi-node builds for cross-platform images
1818
- Compose build support
19-
- High-level build constructs (`bake`)
19+
- High-level build options (`bake`)
2020
- In-container driver support (both Docker and Kubernetes)
2121

2222
# Table of Contents
@@ -26,10 +26,9 @@ Key features:
2626
- [Linux packages](#linux-packages)
2727
- [Manual download](#manual-download)
2828
- [Dockerfile](#dockerfile)
29-
- [Set buildx as the default builder](#set-buildx-as-the-default-builder)
3029
- [Building](#building)
3130
- [Getting started](#getting-started)
32-
- [Building with buildx](#building-with-buildx)
31+
- [Building with Buildx](#building-with-buildx)
3332
- [Working with builder instances](#working-with-builder-instances)
3433
- [Building multi-platform images](#building-multi-platform-images)
3534
- [Reference](docs/reference/buildx.md)
@@ -49,12 +48,9 @@ Key features:
4948
- [`buildx version`](docs/reference/buildx_version.md)
5049
- [Contributing](#contributing)
5150

52-
For more information on how to use Buildx, see
53-
[Docker Build docs](https://docs.docker.com/build/).
54-
5551
# Installing
5652

57-
Using `buildx` with Docker requires Docker engine 19.03 or newer.
53+
Using Buildx with Docker requires Docker engine 19.03 or newer.
5854

5955
> [!WARNING]
6056
> Using an incompatible version of Docker may result in unexpected behavior,
@@ -75,9 +71,9 @@ Docker Engine package repositories contain Docker Buildx packages when installed
7571
## Manual download
7672

7773
> [!IMPORTANT]
78-
> This section is for unattended installation of the buildx component. These
74+
> This section is for unattended installation of the Buildx component. These
7975
> instructions are mostly suitable for testing purposes. We do not recommend
80-
> installing buildx using manual download in production environments as they
76+
> installing Buildx using manual download in production environments as they
8177
> will not be updated automatically with security updates.
8278
>
8379
> On Windows and macOS, we recommend that you install [Docker Desktop](https://docs.docker.com/desktop/)
@@ -87,11 +83,11 @@ You can also download the latest binary from the [GitHub releases page](https://
8783

8884
Rename the relevant binary and copy it to the destination matching your OS:
8985

90-
| OS | Binary name | Destination folder |
91-
| -------- | -------------------- | -----------------------------------------|
92-
| Linux | `docker-buildx` | `$HOME/.docker/cli-plugins` |
93-
| macOS | `docker-buildx` | `$HOME/.docker/cli-plugins` |
94-
| Windows | `docker-buildx.exe` | `%USERPROFILE%\.docker\cli-plugins` |
86+
| OS | Binary name | Destination folder |
87+
|---------|---------------------|-------------------------------------|
88+
| Linux | `docker-buildx` | `$HOME/.docker/cli-plugins` |
89+
| macOS | `docker-buildx` | `$HOME/.docker/cli-plugins` |
90+
| Windows | `docker-buildx.exe` | `%USERPROFILE%\.docker\cli-plugins` |
9591

9692
Or copy it into one of these folders for installing it system-wide.
9793

@@ -123,14 +119,6 @@ COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-bui
123119
RUN docker buildx version
124120
```
125121
126-
# Set buildx as the default builder
127-
128-
Running the command [`docker buildx install`](docs/reference/buildx_install.md)
129-
sets up docker builder command as an alias to `docker buildx build`. This
130-
results in the ability to have `docker build` use the current buildx builder.
131-
132-
To remove this alias, run [`docker buildx uninstall`](docs/reference/buildx_uninstall.md).
133-
134122
# Building
135123

136124
```console
@@ -151,17 +139,17 @@ $ make install
151139

152140
# Getting started
153141

154-
## Building with buildx
142+
## Building with Buildx
155143

156144
Buildx is a Docker CLI plugin that extends the `docker build` command with the
157-
full support of the features provided by [Moby BuildKit](https://github.com/moby/buildkit)
145+
full support of the features provided by [Moby BuildKit](https://docs.docker.com/build/buildkit/)
158146
builder toolkit. It provides the same user experience as `docker build` with
159147
many new features like creating scoped builder instances and building against
160148
multiple nodes concurrently.
161149

162-
After installation, buildx can be accessed through the `docker buildx` command
163-
with Docker 19.03. `docker buildx build` is the command for starting a new
164-
build. With Docker versions older than 19.03 buildx binary can be called
150+
After installation, Buildx can be accessed through the `docker buildx` command
151+
with Docker 19.03. `docker buildx build` is the command for starting a new
152+
build. With Docker versions older than 19.03 Buildx binary can be called
165153
directly to access the `docker buildx` subcommands.
166154

167155
```console
@@ -180,20 +168,25 @@ are not yet available for regular `docker build` like building manifest lists,
180168
distributed caching, and exporting build results to OCI image tarballs.
181169

182170
Buildx is flexible and can be run in different configurations that are exposed
183-
through various "drivers". Each driver defines how and where a build should
184-
run, and have different feature sets.
171+
through various [drivers](https://docs.docker.com/build/builders/drivers/).
172+
Each driver defines how and where a build should run, and have different
173+
feature sets.
185174

186175
We currently support the following drivers:
187-
- The `docker` driver ([guide](https://docs.docker.com/build/drivers/docker/), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver))
188-
- The `docker-container` driver ([guide](https://docs.docker.com/build/drivers/docker-container/), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver))
189-
- The `kubernetes` driver ([guide](https://docs.docker.com/build/drivers/kubernetes/), [reference](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver))
190-
- The `remote` driver ([guide](https://docs.docker.com/build/drivers/remote/))
176+
- The `docker` driver ([manual](https://docs.docker.com/build/builders/drivers/docker/))
177+
- The `docker-container` driver ([manual](https://docs.docker.com/build/builders/drivers/docker-container/))
178+
- The `kubernetes` driver ([manual](https://docs.docker.com/build/drivers/kubernetes/))
179+
- The `remote` driver ([manual](https://docs.docker.com/build/builders/drivers/remote/))
180+
181+
For more information, see the [builders](https://docs.docker.com/build/builders/)
182+
and [drivers](https://docs.docker.com/build/builders/drivers/) guide.
191183

192-
For more information on drivers, see the [drivers guide](https://docs.docker.com/build/drivers/).
184+
> [!NOTE]
185+
> For more information, see [Docker Build docs](https://docs.docker.com/build/concepts/overview/).
193186
194187
## Working with builder instances
195188

196-
By default, buildx will initially use the `docker` driver if it is supported,
189+
By default, Buildx will initially use the `docker` driver if it is supported,
197190
providing a very similar user experience to the native `docker build`. Note that
198191
you must use a local shared daemon to build your applications.
199192

@@ -212,7 +205,7 @@ while creating the new builder. After creating a new instance, you can manage it
212205
lifecycle using the [`docker buildx inspect`](docs/reference/buildx_inspect.md),
213206
[`docker buildx stop`](docs/reference/buildx_stop.md), and
214207
[`docker buildx rm`](docs/reference/buildx_rm.md) commands. To list all
215-
available builders, use [`buildx ls`](docs/reference/buildx_ls.md). After
208+
available builders, use [`docker buildx ls`](docs/reference/buildx_ls.md). After
216209
creating a new builder you can also append new nodes to it.
217210

218211
To switch between different builders, use [`docker buildx use <name>`](docs/reference/buildx_use.md).
@@ -223,9 +216,12 @@ Docker also features a [`docker context`](https://docs.docker.com/engine/referen
223216
command that can be used for giving names for remote Docker API endpoints.
224217
Buildx integrates with `docker context` so that all of your contexts
225218
automatically get a default builder instance. While creating a new builder
226-
instance or when adding a node to it you can also set the context name as the
219+
instance or when adding a node to it, you can also set the context name as the
227220
target.
228221

222+
> [!NOTE]
223+
> For more information, see [Builders docs](https://docs.docker.com/build/builders/).
224+
229225
## Building multi-platform images
230226

231227
BuildKit is designed to work well for building for multiple platforms and not
@@ -239,8 +235,8 @@ platform for the build output, (for example, `linux/amd64`, `linux/arm64`, or
239235
When the current builder instance is backed by the `docker-container` or
240236
`kubernetes` driver, you can specify multiple platforms together. In this case,
241237
it builds a manifest list which contains images for all specified architectures.
242-
When you use this image in [`docker run`](https://docs.docker.com/engine/reference/commandline/run/)
243-
or [`docker service`](https://docs.docker.com/engine/reference/commandline/service/),
238+
When you use this image in [`docker run`](https://docs.docker.com/reference/cli/docker/container/run/)
239+
or [`docker service`](https://docs.docker.com/reference/cli/docker/service/),
244240
Docker picks the correct image based on the node's platform.
245241

246242
You can build multi-platform images using three different strategies that are
@@ -304,6 +300,9 @@ COPY --from=build /log /log
304300
You can also use [`tonistiigi/xx`](https://github.com/tonistiigi/xx) Dockerfile
305301
cross-compilation helpers for more advanced use-cases.
306302

303+
> [!NOTE]
304+
> For more information, see [Multi-platform builds docs](https://docs.docker.com/build/building/multi-platform/).
305+
307306
## High-level build options
308307

309308
See [High-level builds with Bake](https://docs.docker.com/build/bake/) for more details.

0 commit comments

Comments
 (0)