copacetic icon indicating copy to clipboard operation
copacetic copied to clipboard

[REQ] copa as a buildkit frontend

Open sozercan opened this issue 1 year ago • 1 comments

What kind of request is this?

None

What is your request or suggestion?

use copa as a buildkit frontend to generate build context and pass to buildkit

example: copa generate -i foo/bar -t patched | docker build -

sozercan avatar Sep 08 '23 18:09 sozercan

I've been thinking a lot about this as well. Copa could be a very simple buildkit frontend. We could ship the existing cli (for users who want to use it / already built workflows around it), but also publish an image for a frontend that can be controlled via the usual docker build flow.

Benefits of doing this:

  • Copa doesn't need to implement functionality such as export formats (docker buildx build already handles this).
  • No need to install copa cli if you already have docker & access to our frontend image.

Challenges:

  • Docker doesn't have a way to export multiple artifacts (only images), so there's no way to output the Vex document directly. However, it could be added to the image metadata, which is probably ideal. It's not too large and it will always live with the image and thus can't be separated from it.
  • It would require a substantial refactor. That said, copa could use a refactor anyway, to tidy some things up and use buildkit to its fullest potential.

pmengelbert avatar Nov 27 '23 18:11 pmengelbert