mirror of
https://github.com/containers/podman.git
synced 2025-09-27 00:34:32 +08:00
support tag@digest notation
Vendor in the latest HEAd of containers/common to implicitly support the tag@digest notation for images. To remain compatible with Docker, the tag will be stripped off the image reference and is entirely ignored. Fixes: #6721 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
9
vendor/github.com/containers/common/libimage/runtime.go
generated
vendored
9
vendor/github.com/containers/common/libimage/runtime.go
generated
vendored
@ -180,6 +180,15 @@ func (r *Runtime) LookupImage(name string, options *LookupImageOptions) (*Image,
|
||||
}
|
||||
logrus.Debugf("Found image %q in local containers storage (%s)", name, storageRef.StringWithinTransport())
|
||||
return r.storageToImage(img, storageRef), "", nil
|
||||
} else {
|
||||
// Docker compat: strip off the tag iff name is tagged and digested
|
||||
// (e.g., fedora:latest@sha256...). In that case, the tag is stripped
|
||||
// off and entirely ignored. The digest is the sole source of truth.
|
||||
normalizedName, err := normalizeTaggedDigestedString(name)
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
name = normalizedName
|
||||
}
|
||||
|
||||
originalName := name
|
||||
|
Reference in New Issue
Block a user