copacetic
copacetic copied to clipboard
[REQ] copa as a buildkit frontend
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 -
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.