-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it easy to support estargz #866
Comments
I'd be okay with something like |
Fortunately the optimize code path in the stargz snapshotter sort of lays this out for us already (since they use ggcr). I think what we effectively want is a way to make this easy: https://github.com/containerd/stargz-snapshotter/blob/a85d05d70ed851a0f4cb0744ecd0153fe3acafcf/cmd/ctr-remote/commands/optimize.go#L400-L412 |
I think the simplest starting point would be to write a function that can convert images and image indices to estargz and harness that in I suspect that we may want to create an extended type AnnotatedLayer interface {
Layer
Annotations() map[string]string
} Then here we can check whether layers implement the type and augment the addendum passed to Append:
I suspect that just doing the conversion will force us to confront a number of the issues, and also sets things up so that downstream tooling that wants to consciously produce estargz images need not start by building those images from scratch. With the ability to convert images, we could then look at With the ability to convert the |
Looking at kaniko, if we were to allow the Here's one of a couple places that it appends a layer: https://github.com/GoogleContainerTools/kaniko/blob/c982956c15edcbc90ab9e05db781fb994cac3165/pkg/executor/build.go#L485-L493 Here's one of a couple places that it constructs a layer with |
I suspect that something similar would be true for buildpacks: https://github.com/buildpacks/imgutil/blob/339e186e495ae2c491e32cfd0c84aab77fc0e99e/remote/remote.go#L415-L423 |
Some thoughts:
|
We already allow for this via an optional Does estargz allow for a one-shot conversion? I'm guessing yes, as long as we don't need the optimize step. That was one of the niceties of stargz for |
Not 100% yet, but if you pull the second PR into
I'll fix the |
Alright, the latest looks right:
|
See the proposal here: opencontainers/image-spec#815
Given the following factors:
I propose that we make estargz either the new default we push for images, or trivially easy to consume.
The text was updated successfully, but these errors were encountered: