New gateway exporter
Fixes #3037.
Follow-ups:
- Secret passing. This PR is already going to be large, and adding support for secrets also intersects with secrets for cache exporter backends, so it's not super trivial to just add on.
Getting really close now, the only things I need to get done are:
- Tests :tada:
- Some refactorings of code that got that little bit more complicated
- Authoring a real commit history :eyes:
Edit: done! This PR is now ready for review.
Will it be a breaking change? How can I figure out if a buildkit demon support BuildFromEnvironment or ExportFromEnvironment supported As a gateway frontend?
This will not be a breaking change.
ExportFromEnvironment will only be callable when invoked from --output type=gateway,source=<image>. We should probably add a sanity check that it's running in the right environment though - so that if you try and put a frontend image instead of a exporter image, you get a sane error.