handle foreign mediatypes on push
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>v0.8
parent
0af7b1b9c6
commit
aabdec1778
|
@ -99,17 +99,21 @@ func detectCompressionType(cr io.Reader) (Type, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var toDockerLayerType = map[string]string{
|
var toDockerLayerType = map[string]string{
|
||||||
ocispec.MediaTypeImageLayer: images.MediaTypeDockerSchema2Layer,
|
ocispec.MediaTypeImageLayer: images.MediaTypeDockerSchema2Layer,
|
||||||
images.MediaTypeDockerSchema2Layer: images.MediaTypeDockerSchema2Layer,
|
images.MediaTypeDockerSchema2Layer: images.MediaTypeDockerSchema2Layer,
|
||||||
ocispec.MediaTypeImageLayerGzip: images.MediaTypeDockerSchema2LayerGzip,
|
ocispec.MediaTypeImageLayerGzip: images.MediaTypeDockerSchema2LayerGzip,
|
||||||
images.MediaTypeDockerSchema2LayerGzip: images.MediaTypeDockerSchema2LayerGzip,
|
images.MediaTypeDockerSchema2LayerGzip: images.MediaTypeDockerSchema2LayerGzip,
|
||||||
|
images.MediaTypeDockerSchema2LayerForeign: images.MediaTypeDockerSchema2Layer,
|
||||||
|
images.MediaTypeDockerSchema2LayerForeignGzip: images.MediaTypeDockerSchema2LayerGzip,
|
||||||
}
|
}
|
||||||
|
|
||||||
var toOCILayerType = map[string]string{
|
var toOCILayerType = map[string]string{
|
||||||
ocispec.MediaTypeImageLayer: ocispec.MediaTypeImageLayer,
|
ocispec.MediaTypeImageLayer: ocispec.MediaTypeImageLayer,
|
||||||
images.MediaTypeDockerSchema2Layer: ocispec.MediaTypeImageLayer,
|
images.MediaTypeDockerSchema2Layer: ocispec.MediaTypeImageLayer,
|
||||||
ocispec.MediaTypeImageLayerGzip: ocispec.MediaTypeImageLayerGzip,
|
ocispec.MediaTypeImageLayerGzip: ocispec.MediaTypeImageLayerGzip,
|
||||||
images.MediaTypeDockerSchema2LayerGzip: ocispec.MediaTypeImageLayerGzip,
|
images.MediaTypeDockerSchema2LayerGzip: ocispec.MediaTypeImageLayerGzip,
|
||||||
|
images.MediaTypeDockerSchema2LayerForeign: ocispec.MediaTypeImageLayer,
|
||||||
|
images.MediaTypeDockerSchema2LayerForeignGzip: ocispec.MediaTypeImageLayerGzip,
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertLayerMediaType(mediaType string, oci bool) string {
|
func convertLayerMediaType(mediaType string, oci bool) string {
|
||||||
|
|
Loading…
Reference in New Issue