You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- expand a bit on what's happening
- clarify start of deprecation of the classic builder
- show examples of error and warning
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@@ -100,20 +101,82 @@ Removed | [`--api-enable-cors` flag on `dockerd`](#--api-enable-cors-flag-on-
100
101
Removed | [`--run` flag on `docker commit`](#--run-flag-on-docker-commit) | v0.10 | v1.13
101
102
Removed | [Three arguments form in `docker import`](#three-arguments-form-in-docker-import) | v0.6.7 | v1.12
102
103
104
+
### Legacy builder for Linux images
105
+
106
+
**Deprecated in Release: v21.xx**
107
+
108
+
Docker v21.xx now uses BuildKit by default to build Linux images, and uses the
109
+
[Buildx](https://docs.docker.com/buildx/working-with-buildx/) CLI component for
110
+
`docker build`. With this change, `docker build` now exposes all advanced features
111
+
that BuildKit provides and which were previously only available through the
112
+
`docker buildx` subcommands.
113
+
114
+
The Buildx component is installed automatically when installing the `docker` CLI
115
+
using our `.deb` or `.rpm` packages, and statically linked binaries are provided
116
+
both on `download.docker.com`, and through the [`docker/buildx-bin` image](https://hub.docker.com/r/docker/buildx-bin)
117
+
on Docker Hub. Refer the [Buildx section](http://docs.docker.com/go/buildx/) for
118
+
detailed instructions on installing the Buildx component.
119
+
120
+
This release marks the beginning of the deprecation cycle of the classic ("legacy")
121
+
builder for Linux images. No active development will happen on the classic builder
122
+
(except for bugfixes). BuildKit development started five Years ago, left the
123
+
"experimental" phase since Docker 18.09, and is already the default builder for
While we're comfortable that BuildKit is stable for general use, there may be
126
+
some changes in behavior. If you encounter issues with BuildKit, we encourage
127
+
you to report issues in the [BuildKit issue tracker on GitHub](https://github.com/moby/buildkit/){:target="_blank" rel="noopener" class="_"}
128
+
129
+
> Classic builder for building Windows images
130
+
>
131
+
> BuildKit does not (yet) provide support for building Windows images, and
132
+
> `docker build` continues to use the classic builder to build native Windows
133
+
> images on Windows daemons.
134
+
103
135
### Legacy builder fallback
104
136
105
137
**Deprecated in Release: v21.xx**
106
138
107
-
BuildKit implementation code and linked build flags have been removed in the CLI
108
-
and are now forwarded to [Buildx](https://docs.docker.com/buildx/working-with-buildx/)
109
-
builder component.
139
+
[Docker v21.xx now uses BuildKit by default to build Linux images](#legacy-builder-for-linux-images),
140
+
which requires the Buildx component to build images with BuildKit. There may be
141
+
situations where the Buildx component is not available, and BuildKit cannot be
142
+
used.
143
+
144
+
To provide a smooth transition to BuildKit as the default builder, Docker v21.xx
145
+
has an automatic fallback for some situations, or produces an error to assist
146
+
users to resolve the problem.
147
+
148
+
In situations where the user did not explicitly opt-in to use BuildKit (i.e.,
149
+
`DOCKER_BUILDKIT=1` is not set), the CLI automatically falls back to the classic
150
+
builder, but prints a deprecation warning:
151
+
152
+
```
153
+
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
154
+
Install the buildx component to build images with BuildKit:
This situation may occur if the `docker` CLI is installed using the static binaries,
159
+
and the Buildx component is not installed or not installed correctly. This fallback
160
+
will be removed in a future release, therefore we recommend to [install the Buildx component](https://docs.docker.com/go/buildx/)
161
+
and use BuildKit for your builds, or opt-out of using BuildKit with `DOCKER_BUILDKIT=0`.
162
+
163
+
If you opted-in to use BuildKit (`DOCKER_BUILDKIT=1`), but the Buildx component
164
+
is missing, an error is printed instead, and the `docker build` command fails:
165
+
166
+
```
167
+
ERROR: BuildKit is enabled but the buildx component is missing or broken.
168
+
Install the buildx component to build images with BuildKit:
0 commit comments