diff --git a/libimage/pull.go b/libimage/pull.go index 4a0f5970d..b83570d74 100644 --- a/libimage/pull.go +++ b/libimage/pull.go @@ -442,8 +442,13 @@ func (r *Runtime) imagesIDsForManifest(manifestBytes []byte, sys *types.SystemCo if err != nil { return nil, fmt.Errorf("listing images by manifest digest: %w", err) } - results := make([]string, 0, len(images)) + results := []string{} + imageMap := map[string]bool{} for _, image := range images { + if imageMap[image.ID] { + continue + } + imageMap[image.ID] = true results = append(results, image.ID) } if len(results) == 0 {