vendor containers/common@main

Pull in fixes for local image lookups.

Fixes: #10835
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2021-07-02 11:37:41 +02:00
parent 955c1d2bfe
commit 7eb9ed9758
90 changed files with 5909 additions and 1795 deletions

View File

@ -74,7 +74,7 @@ func (r *Runtime) Save(ctx context.Context, names []string, format, path string,
// saveSingleImage saves the specified image name to the specified path.
// Supported formats are "oci-archive", "oci-dir" and "docker-dir".
func (r *Runtime) saveSingleImage(ctx context.Context, name, format, path string, options *SaveOptions) error {
image, imageName, err := r.LookupImage(name, nil)
image, imageName, err := r.LookupImage(name, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return err
}
@ -155,7 +155,7 @@ func (r *Runtime) saveDockerArchive(ctx context.Context, names []string, path st
visitedNames := make(map[string]bool) // filters duplicate names
for _, name := range names {
// Look up local images.
image, imageName, err := r.LookupImage(name, nil)
image, imageName, err := r.LookupImage(name, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return err
}