compose icon indicating copy to clipboard operation
compose copied to clipboard

delegate build to buildx bake

Open ndeloof opened this issue 1 year ago • 4 comments

What I did Use buildx raw json output (https://github.com/moby/buildkit/pull/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 https://github.com/docker/buildx/pull/2252, json parsing error must be ignored :'(

(not mandatory) A picture of a cute animal, if possible in relation to what you did image

ndeloof avatar Feb 09 '24 10:02 ndeloof

would compose send to bake x-bakes too? https://docs.docker.com/build/bake/compose-file/ (if yes, I think this should have an "--opt-out" or an "--opt-in")

luciangabor avatar Mar 13 '24 08:03 luciangabor

It could (this PR is 100% experimental) but AFAICT x-bake are not required, as all build features are now part of the compose-spec

ndeloof avatar Mar 13 '24 09:03 ndeloof

It could be quite welcomed, but, when it comes to x-bakes, it's nice to be able to simply build and run with compose and bake with an output that extracts binaries, or set tags for pushes, or ... anything that's not about local dev (albeit it's possible to do that using distinct files)

luciangabor avatar Mar 13 '24 09:03 luciangabor

docker compose build only would support a subset of bake features, typically is REQUIRE an image to be built, as the primary goal is to later run the app (also consider docker compose up --build), so "output that extracts binaries" would make no sense, and should only be used with docker buildx bake.

or set tags for pushes

Already supported if you run docker compose build --push

ndeloof avatar Mar 13 '24 09:03 ndeloof

Did the stale timer expire?

thompson-shaun avatar Jul 17 '24 15:07 thompson-shaun