buildx icon indicating copy to clipboard operation
buildx copied to clipboard

Use controller option in bake

Open jedevc opened this issue 2 years ago • 1 comments

:spiral_notepad: Marking as draft until we merge https://github.com/docker/buildx/pull/1671.

This PR continues the move to attempt to merge the build.Options struct into the controllerapi.Options message.

To do this, we extract all the input parameters into a dedicated message (adding the missing ones, except for the InStream parameter which will require some additional fiddling around). We also rework the NamedContexts to allow containing States (by transmitting them as DefinitionOps), and adding a Linked field to the common options.

With these changes, we can have bake generate controllerapi.BuildOptions, and then convert those to build.Options using the controller/build package.

This is an intermediate patch, designed to allow us to clean up some shared logic between both build and bake. The next step will be to modify bake to use the controller API directly, and completely skip the build.Options generation step.

jedevc avatar Mar 15 '23 11:03 jedevc

Thanks, LGTM.

ktock avatar Mar 15 '23 13:03 ktock