From cfcec6daf61ef000d95338350b87c5a70988d460 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Wed, 29 May 2024 17:03:10 +0000 Subject: [PATCH] Add support for erofs and squashfs layer media types OCI artifacts support has landed in various OCI specs v1.1.0 which allows for arbitrary artifact types, small and large. Large artifacts (even existing container images) pose a particular challenge that: 1. it takes too long to download 2. it takes too long to unpack This PR **begins** to address 2. above. squashfs (an older read-only) and erofs (newer) filesystems are already compressed full filesystems, and overlayfs compatible. The downsides are this change becomes very Linux-specific? Signed-off-by: Ramkumar Chinchani --- specs-go/v1/mediatype.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/specs-go/v1/mediatype.go b/specs-go/v1/mediatype.go index ce8313e79..4c7f201ec 100644 --- a/specs-go/v1/mediatype.go +++ b/specs-go/v1/mediatype.go @@ -45,6 +45,13 @@ const ( // MediaTypeImageLayerZstd is the media type used for zstd compressed // layers referenced by the manifest. MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd" + + // MediaTypeErofs specifies the media type as erofs filesystem layer + // https://www.iana.org/assignments/media-types/application/vnd.erofs + MediaTypeErofs = "application/vnd.erofs" + + // MediaTypeSquashfs specifies the media type as squashfs filesystem layer + MediaTypeSquashfs = "application/vnd.squashfs" ) // Non-distributable layer media-types.