Uh oh!
There was an error while loading. Please reload this page.
builder: preserve selected builder for docker bake - #7154
Open
wpan36 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Weijun Pan <wpan3636@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Fixed top-level
docker bakeso it preserves the builder selected withdocker buildx use, instead of overriding it with the active Dockercontext's implicit
docker-driver builder.The existing compatibility behavior for
docker buildremains unchanged.Fixes#7125
- How I did it
Top-level
docker bakeis forwarded todocker buildx bake, but it wasalso passing through the generic forwarded-command compatibility block
that injects:
That override is intended for traditional
docker buildcommands so theycontinue using the current context builder and load results into the local
image store.
This change skips that environment-variable injection for top-level
docker bake, allowing Buildx to perform its normal selected-builderresolution.
I also extended the existing table-driven test to cover different forwarded
commands and added a regression case for Bake with a custom Docker context.
- How to verify it
Automated validation performed:
TestForwardedCommandWithBuildercmd/dockerpackage testsgolangci-lint: 0 issuesManual verification used a non-default Docker context and a selected
docker-containerbuilder.Before the fix:
After the fix:
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)
Not included.