Skip to content

Commit 4c64c74

Browse files
committed
fix: allow non-OCI layers
opencontainers/image-spec#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 <[email protected]>
1 parent 2207955 commit 4c64c74

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

client/image.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,7 @@ func (i *image) getLayers(ctx context.Context, manifest ocispec.Manifest) ([]roo
391391
// parse out the image layers from oci artifact layers
392392
imageLayers := []ocispec.Descriptor{}
393393
for _, ociLayer := range manifest.Layers {
394-
if images.IsLayerType(ociLayer.MediaType) {
395-
imageLayers = append(imageLayers, ociLayer)
396-
}
394+
imageLayers = append(imageLayers, ociLayer)
397395
}
398396
if len(diffIDs) != len(imageLayers) {
399397
return nil, errors.New("mismatched image rootfs and manifest layers")

0 commit comments

Comments
 (0)