mirror of
https://github.com/containers/podman.git
synced 2025-06-28 06:18:57 +08:00
fix pull image that includes a sha
when pulling an image that includes a sha such as: centos/nginx-112-centos7@sha256:42330f7f29ba1ad67819f4ff3ae2472f62de13a827a74736a5098728462212e7 the final image name in libpod should not contain portions of the sha itself nor the sha identifier. and like docker, we provide a 'none' tag as well. this should fix #877 Signed-off-by: baude <bbaude@redhat.com> Closes: #1085 Approved by: mheon
This commit is contained in:
@ -1055,3 +1055,9 @@ func (i *Image) Comment(ctx context.Context, manifestType string) (string, error
|
||||
}
|
||||
return ociv1Img.History[0].Comment, nil
|
||||
}
|
||||
|
||||
// HasShaInInputName returns a bool as to whether the user provide an image name that includes
|
||||
// a reference to a specific sha
|
||||
func (i *Image) HasShaInInputName() bool {
|
||||
return strings.Contains(i.InputName, "@sha256:")
|
||||
}
|
||||
|
Reference in New Issue
Block a user