Преглед на файлове

Fix the generated manifest for compose artifacts so that the empty config is not added as a layer.

Signed-off-by: Jeff Carter <[email protected]>
Jeff Carter преди 7 месеца
родител
ревизия
0f9e6ab832
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      internal/ocipush/push.go

+ 3 - 1
internal/ocipush/push.go

@@ -105,7 +105,9 @@ func PushManifest(
 ) error {
 	// Check if we need an extra empty layer for the manifest config
 	if ociVersion == api.OCIVersion1_1 || ociVersion == "" {
-		layers = append(layers, Pushable{Descriptor: v1.DescriptorEmptyJSON, Data: []byte("{}")})
+		if err := resolver.Push(ctx, named, v1.DescriptorEmptyJSON, v1.DescriptorEmptyJSON.Data); err != nil {
+			return err
+		}
 	}
 	// prepare to push the manifest by pushing the layers
 	layerDescriptors := make([]v1.Descriptor, len(layers))