CTFd / ctfcli

ctfcli is a tool to manage Capture The Flag events and challenges
https://ctfd.io/
Apache License 2.0
165 stars 67 forks source link

Support alternate Buildkit drivers #148

Closed pl4nty closed 4 months ago

pl4nty commented 6 months ago

Add --load to explicitly output Docker builds to local images, allowing drivers that don't have a default output type (ie everything except docker). Fixes #147

Is it worth adding some way to pass custom arguments too? --cache-from and --cache-to can significantly improve performance in CI scenarios.

ColdHeat commented 4 months ago

Pardon my ignorance here but I don't see what the point is of the --load switch? Do you want to have the image output as a tar file?

Additional arguments could be good but I think it would need to be generic. Perhaps something like --extra-args="--switch1=123"

pl4nty commented 4 months ago

--load loads the image into local storage. same as current behaviour, because the docker driver implicitly uses --load if no output is specified (for backwards compat). but other drivers require an explicit output argument, and will fail at the moment.

generic arguments sound great, I'm happy to send another PR if you'd like.

ColdHeat commented 4 months ago

I think something could be done with extra build arguments I am just not sure about the interface to support (whether it's purely cli or if it should also be in the config file)