mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 09:33:06 +00:00
Limit multiple platform manifests to one for size check
client.Pull will only pull one matching platform by default.
When checking the size of image we match that behavior so that
we don't look for multiple platforms that might not exist on disk.
Signed-off-by: Darren Shepherd <darren@rancher.com>
(cherry picked from commit 1161409779)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -119,7 +119,7 @@ func (image *Image) Size(ctx context.Context, provider content.Provider, platfor
|
||||
}
|
||||
size += desc.Size
|
||||
return nil, nil
|
||||
}), FilterPlatforms(ChildrenHandler(provider), platform)), image.Target)
|
||||
}), LimitManifests(FilterPlatforms(ChildrenHandler(provider), platform), platform, 1)), image.Target)
|
||||
}
|
||||
|
||||
type platformManifest struct {
|
||||
|
||||
Reference in New Issue
Block a user