Support foreign and encrypted layers in the unpacker.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2019-09-03 18:42:41 -07:00
parent c7c7955757
commit d6a6e0b8bc

View File

@ -229,8 +229,11 @@ func (u *unpacker) handlerWrapper(uctx context.Context, unpacks *int32) (func(im
return u.unpack(uctx, desc, l)
})
}
case images.MediaTypeDockerSchema2LayerGzip, images.MediaTypeDockerSchema2Layer,
ocispec.MediaTypeImageLayerGzip, ocispec.MediaTypeImageLayer:
case images.MediaTypeDockerSchema2Layer, images.MediaTypeDockerSchema2LayerGzip,
images.MediaTypeDockerSchema2LayerForeign, images.MediaTypeDockerSchema2LayerForeignGzip,
ocispec.MediaTypeImageLayer, ocispec.MediaTypeImageLayerGzip,
ocispec.MediaTypeImageLayerNonDistributable, ocispec.MediaTypeImageLayerNonDistributableGzip,
images.MediaTypeDockerSchema2LayerEnc, images.MediaTypeDockerSchema2LayerGzipEnc:
lock.Lock()
update := !schema1
lock.Unlock()