diff --git a/pkg/cmd/image/convert.go b/pkg/cmd/image/convert.go index d628c43158a..e320a421be2 100644 --- a/pkg/cmd/image/convert.go +++ b/pkg/cmd/image/convert.go @@ -75,6 +75,12 @@ func Convert(ctx context.Context, client *containerd.Client, srcRawRef, targetRa } convertOpts = append(convertOpts, converter.WithPlatform(platMC)) + // Ensure all the layers are here: https://github.com/containerd/nerdctl/issues/3425 + err = EnsureAllContent(ctx, client, srcRawRef, options.GOptions) + if err != nil { + return err + } + estargz := options.Estargz zstd := options.Zstd zstdchunked := options.ZstdChunked