From 4c64c740fb76e2d90f65cccacbf3539e72c34298 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Sat, 14 Dec 2024 13:51:58 -0800 Subject: [PATCH] fix: allow non-OCI layers https://github.com/opencontainers/image-spec/issues/1190 https://www.cyphar.com/blog/post/20190121-ociv2-images-i-tar As part of improving handling large images and also broadly considering building layers as full mountable filesystems, relax the layer type check. This allows containerd clients to pull and produce rootfs simply by mounting them. Signed-off-by: Ramkumar Chinchani --- client/image.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/image.go b/client/image.go index 355bcba73e6d..74bef6a82b51 100644 --- a/client/image.go +++ b/client/image.go @@ -391,9 +391,7 @@ func (i *image) getLayers(ctx context.Context, manifest ocispec.Manifest) ([]roo // parse out the image layers from oci artifact layers imageLayers := []ocispec.Descriptor{} for _, ociLayer := range manifest.Layers { - if images.IsLayerType(ociLayer.MediaType) { - imageLayers = append(imageLayers, ociLayer) - } + imageLayers = append(imageLayers, ociLayer) } if len(diffIDs) != len(imageLayers) { return nil, errors.New("mismatched image rootfs and manifest layers")