Skip to content

Commit fed3758

Browse files
committed
Fix content digest not found for tmp reduced platform
Signed-off-by: apostasie <[email protected]>
1 parent 14c10b1 commit fed3758

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cmd/image/push.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ func Push(ctx context.Context, client *containerd.Client, rawRef string, options
119119
pushRef = ref + "-tmp-reduced-platform"
120120
// Push fails with "400 Bad Request" when the manifest is multi-platform but we do not locally have multi-platform blobs.
121121
// So we create a tmp reduced-platform image to avoid the error.
122+
// Ensure all the layers are here: https://github.com/containerd/nerdctl/issues/3425
123+
err = EnsureAllContent(ctx, client, ref, platMC, options.GOptions)
124+
if err != nil {
125+
return err
126+
}
122127
platImg, err := converter.Convert(ctx, client, pushRef, ref, converter.WithPlatform(platMC))
123128
if err != nil {
124129
if len(options.Platforms) == 0 {

0 commit comments

Comments
 (0)