From 510369170afd3c43d6a5fbb203372f701dfea29e Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Thu, 22 Jan 2026 14:54:12 -0800 Subject: [PATCH] imagetools: fix excessive copies on create command Currently needed manifests were filtered out and then copied in a loop, but for each copy still the full unfiltered descriptor was copied instead of single manifest, resulting multiple push attempts for same descriptor. Signed-off-by: Tonis Tiigi --- commands/imagetools/create.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/imagetools/create.go b/commands/imagetools/create.go index 6f7903eea..b8c9d97a0 100644 --- a/commands/imagetools/create.go +++ b/commands/imagetools/create.go @@ -208,7 +208,10 @@ func runCreate(ctx context.Context, dockerCli command.Cli, in createOptions, arg for _, desc := range manifests { eg2.Go(func() error { sub.Log(1, fmt.Appendf(nil, "copying %s from %s to %s\n", desc.Digest.String(), desc.Source.Ref.String(), t.String())) - return r.Copy(ctx, desc.Source, t) + return r.Copy(ctx, &imagetools.Source{ + Ref: desc.Source.Ref, + Desc: desc.Descriptor, + }, t) }) } if err := eg2.Wait(); err != nil {