Uh oh!
There was an error while loading. Please reload this page.
Set buildx as default builder - #3314
Conversation
Uh oh!
There was an error while loading. Please reload this page.
1aa0c06 to
fd9759aCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
4ecdc42 to
1d5ae62CompareCodecov Report
@@ Coverage Diff @@## master #3314 +/- ##
==========================================
+ Coverage 56.36% 57.33% +0.97%
==========================================
Files 304 304 Lines 26816 26379 -437 ==========================================
+ Hits 15114 15124 +10 + Misses 10782 10329 -453 - Partials 920 926 +6 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
c89759f to
d86e8c9Compare18cdcf8 to
13fb7d3CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d2ae311 to
fc290eeComparetonistiigi
commented
Oct 14, 2021
@crazy-max Looks like the stderr change broke a test. Just issue with the test assert iiuc |
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM (left two minor suggestions)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
88840a6 to
a47c645Comparea47c645 to
f57a76bCompareSigned-off-by: CrazyMax <crazy-max@users.noreply.github.com>
afcd4d6 to
16edf8bComparethaJeztah
commented
Feb 3, 2022
Bringing this one in (discussed in the maintainers meeting, and @cpuguy83 will complain after release 😂) |
| // BuildKitEnabled returns whether buildkit is enabled either through a daemon setting | ||
| // or otherwise the client-side DOCKER_BUILDKIT environment variable | ||
| func BuildKitEnabled(si ServerInfo) (bool, error) { |
There was a problem hiding this comment.
docker/compose relies on this to select the builder to be used.
Maybe restore this function as a dumb return true would make more sense?
There was a problem hiding this comment.
Looks like the logic was moved inside processBuilder(). Perhaps it makes sense to move that logic back into this function. The default would now be (true) if DOCKER_BUILDKIT is not set?
Wondering if the function also needs to take windows daemon into account 🤔
How exactly is it used in Compose (as in; what does it do if it's "disabled"? or is that only for the Windows case?)
sudo-bmitch
commented
Feb 22, 2022
Related: moby/moby#42350 |
This is a first part to the effort to migrate users to buildx as the default builder.
tldr;
The default experience will be the same as the current
DOCKER_BUILDKIT=1experience. This was the default experience for Docker Desktop and we are unifying the experience to be the same for Linux distributions as well.All Docker packages will contain buildx by default. The user does not need to install anything else. If a third-party package distributes CLI today without buildx, it may be necessary to update its release pipeline.
Context
There are currently four different ways that one can build locally with Docker:
DOCKER_BUILDKIT=0 docker build .DOCKER_BUILDKIT=1 docker build .docker buildx build .docker buildx create && docker buildx build .The current state not only confuses users who do not understand the differences between our build experiences, it also contradicts with where we are investing our build engineering effort: in Buildx and BuildKit.
What is buildx?
Buildx is a CLI tool that, combined with the server-side component BuildKit, provides Docker's next generation container build system. Buildx is architected so that it can work with different container runtimes through drivers. Some of the drivers (container and kubernetes) use a containerized version of BuildKit which means that the build tool chain can be updated independently of other container tooling.
Key features of buildx include:
What I did
Forward CLI build command
Docker branded build commands will by default be invoked by buildx client and go to a BuildKit based backend:
docker buildforwarded todocker buildx builddocker image buildforwarded todocker buildx builddocker builderforwarded todocker buildxRemove BuildKit implementation
DOCKER_BUILDKIT=0fallbackDefault behavior for WCOW
Missing plugin
DOCKER_BUILDKIT=1and plugin is missing or broken, cmd will fail:$ DOCKER_BUILDKIT=1 docker build . ERROR: BuildKit is enabled but the buildx component is missing or broken. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/Documentation
Update documentation:
How to verify it
$ docker buildx bake binary $ ./build/docker build .cc @tonistiigi@thaJeztah@justincormack@mikeparker@chris-crone
closes#3237
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com