Uh oh!
There was an error while loading. Please reload this page.
delegate build to buildx bake - #11484
Conversation
08f256f to
a92f4eeCompare| ID: "==> ==>", | ||
| Status: progress.Done, | ||
| Text: fmt.Sprintf(`naming to %s`, options.Tags[0]), | ||
| cmd := exec.CommandContext(ctx, "docker", "buildx", "bake", "--file", "-", "--progress", "rawjson", "--metadata-file", metadata.Name()) |
There was a problem hiding this comment.
I wonder if we should call buildx in standalone mode to reduce overhead implied by docker command (and in particular docker proxy in DD).
There was a problem hiding this comment.
This also has implications wrt signal handling, CLI plugin management, etc. In this case we'd have CLI binary -> Compose plugin binary -> CLI binary -> Buildx plugin binary AND between the CLI and Compose and then between the 2nd CLI process and Buildx the CLI would be setting up a socket for plugin communication, etc. Need to think about what the tradeoffs are there/whether we should and what we can do on the CLI side to make this as painless as possible.
There was a problem hiding this comment.
yes this I already identified, marked this as a Draft to avoid any confusion: there's a bunch of things missing here :)
8793d51 to
0c01a6fCompare| if err != nil { | ||
| return "", err | ||
| } | ||
| cmd := exec.CommandContext(ctx, buildx.Path, "buildx", "bake", "--file", "-", "--progress", "rawjson", "--metadata-file", metadata.Name()) |
There was a problem hiding this comment.
👀
| cmd:=exec.CommandContext(ctx, buildx.Path, "buildx", "bake", "--file", "-", "--progress", "rawjson", "--metadata-file", metadata.Name()) | |
| cmd:=exec.CommandContext(ctx, buildx.Path, "bake", "--file", "-", "--progress", "rawjson", "--metadata-file", metadata.Name()) |
There was a problem hiding this comment.
as we propagate os.Env, DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND is set and buildx get confused it's not actually running standalone. Need to exclude this variable to get buildx run standalone
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
luciangabor
commented
Mar 13, 2024
would compose send to bake |
ndeloof
commented
Mar 13, 2024
It could (this PR is 100% experimental) but AFAICT |
luciangabor
commented
Mar 13, 2024
It could be quite welcomed, but, when it comes to |
ndeloof
commented
Mar 13, 2024
Already supported if you run |
thompson-shaun
commented
Jul 17, 2024
Did the stale timer expire? |
ndeloof
commented
Nov 18, 2024
revisited as #12300 |
What I did
Use buildx raw json output (moby/buildkit#4113) so we can implement build as an external command.
Allows user to upgrade buildx and benefits new features/bug fixes without having to wait for compose to bump dependencies
Still relies on buildkit's progress UI, but we technically could redesign the build progress display by processing solver status on our own. If we do, we could fully remove dependency on buildx/buildkit
note: due to docker/buildx#2252, json parsing error must be ignored :'(
(not mandatory) A picture of a cute animal, if possible in relation to what you did
