feat(depot): add depot image builder and pusher #4397
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depot is a fast way to build and push docker images.
This is my draft to add depot with minimal changes to the docker build and push.
The key difference compared to the existing docker code is that depot can both build
and push multi-platform images in one step.
This PR does some refactoring of the
imager
interface to allow thebuild
function to optionally returna digest that signifies the pushed image. I'm not sure if this is the right approach; let me know!
( no tests yet ... I'm not sure yet how to proceed as I think the tests
may need a refactor to accommodate simultaneous build and push)
So, this commit adds
use: depot
to the docker builder allowing images to be build and pushed using depot.dev.Additionally, a new optional docker setting,
depot_project
, can explicitly set the project.Note that the project can also be set via the env var,
DEPOT_PROJECT_ID
or with a local file,depot.json
.depot.dev is a hosted buildkit that is a fast way build and push multi-platform images.
Here is the ticket about depot: #3746