image-spec
image-spec copied to clipboard
Add eStargz specification to OCI v1 (support lazy pulling)
Resolves #815
This PR adds support of lazy pulling to OCI Image Spec v1 by standardizing eStargz image format as an optional extension.
No need to introduce a new layer media type, because eStargz is fully compatible with application/vnd.oci.image.layer.v1.tar+gz.
eStargz has been adopted by tools in the community, including containerd(stargz-snapshotter), Podman, k3s, BuildKit, Kaniko, ko, buildpacks.io, Harbor(acceleration-service). Please refer to https://github.com/containerd/stargz-snapshotter/issues/258 for the complete list.
The following is the summary of this PR:
- Moves eStargz specification document (
estargz.md) from stargz-snapshotter repo to this repo. - Adds the link to
estargz.mdin the existing documents. - Adds the annotation
org.opencontainers.image.toc.digestdefined inestargz.mdtospecs-go.
cc @AkihiroSuda @mattmoor @imjasonh @jonjohnsonjr
LGTM on the idea of adding this, but I haven't given this a detailed read.
I think we need to have the maintainers read this one in detail. We may also need a description of how to fetch these in the distribution-spec.
Thank you for the comments.
distribution-spec
Lazy pulling depends on HTTP range request which is already described in the distribution-spec so we don't need changes on the distribution-spec but can add notes that the range request is used by lazy pulling.
Needs rebase to make CI green
Rebased.
Thank you for your comments.
there are now multiple (somewhat incompatible) implementations of similar ideas.
Yes, there are several lazy pulling implementations in the community. So it would be great if OCI spec officially describes the format for lazy pulling so that runtimes and builders can adopt it and maintain the implementation while keeping interoperability among them.