Closed
Description
#261 added support for OCI Image Layout, but only supports Image Layers of two media types:
- application/vnd.oci.image.layer.v1.tar+gzip
- application/vnd.docker.image.rootfs.diff.tar.gzip
For any other value of media type it returns an error (see the TODO
's):
go-containerregistry/pkg/v1/layout/image.go
Lines 96 to 106 in 34b7f00
Issue 1. Supporting non-compressed layers
The OCI Image Manifest specification requires support for at least 4 types, including 2 non-compressed layer types (.tar
):
- application/vnd.oci.image.layer.v1.tar
- application/vnd.oci.image.layer.v1.tar+gzip
- application/vnd.oci.image.layer.nondistributable.v1.tar
- application/vnd.oci.image.layer.nondistributable.v1.tar+gzip
Issue 2. Supporting foreign {compressed, non-compressed} layers
The OCI Artifacts project defines additional media types like Helm Charts and custom media types. Examples include:
- application/vnd.cncf.helm.chart.layer.v1.tar+gzip
- application/tar+gzip
- etc.
Possible work-arounds
- Allow any media type: I verified removing the explicit check for
types.OCILayer, types.DockerLayer
allows us to push layers of arbitrary media types, but wasn't sure how this might conflict withcompressedBlob
. - Allow any media type ending in
+gzip
: (Image Manifest specification mentions "Entries in this field will frequently use the+gzip
types.") - Something else?
Happy to open a PR to support this, but wanted to check how we might want to handle it.
Metadata
Assignees
Labels
No labels