diff --git a/pkg/overlay/pack.go b/pkg/overlay/pack.go index 3a6cc7d7..41cabd03 100644 --- a/pkg/overlay/pack.go +++ b/pkg/overlay/pack.go @@ -301,7 +301,11 @@ func generateBlob(layerType types.LayerType, contents string, ociDir string) (io if layerType.Type == "tar" { packOptions := layer.RepackOptions{TranslateOverlayWhiteouts: true} blob = layer.GenerateInsertLayer(contents, "/", false, &packOptions) - mediaType = ispec.MediaTypeImageLayer + blob, err = mutate.GzipCompressor.WithOpt(gzipBlockSize).Compress(blob) + if err != nil { + return nil, "", "", err + } + mediaType = ispec.MediaTypeImageLayerGzip } else { blob, mediaType, rootHash, err = squashfs.MakeSquashfs(ociDir, contents, nil, layerType.Verity) if err != nil {