Skip to content

Commit 0f9e6ab

Browse files
jcarter3ndeloof
authored andcommitted
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]>
1 parent 15c9651 commit 0f9e6ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/ocipush/push.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ func PushManifest(
105105
) error {
106106
// Check if we need an extra empty layer for the manifest config
107107
if ociVersion == api.OCIVersion1_1 || ociVersion == "" {
108-
layers = append(layers, Pushable{Descriptor: v1.DescriptorEmptyJSON, Data: []byte("{}")})
108+
if err := resolver.Push(ctx, named, v1.DescriptorEmptyJSON, v1.DescriptorEmptyJSON.Data); err != nil {
109+
return err
110+
}
109111
}
110112
// prepare to push the manifest by pushing the layers
111113
layerDescriptors := make([]v1.Descriptor, len(layers))

0 commit comments

Comments
 (0)