mirror of
https://github.com/containers/podman.git
synced 2025-12-07 22:32:46 +08:00
Fix the heuristic for docker-archive: sources in (podman pull)
Instead of searching for "docker-archive" anywhere in the input, only accept it at the start, and require the colon separator as well. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
This commit is contained in:
committed by
Atomic Bot
parent
558a1bd776
commit
85cb582f86
@@ -111,7 +111,7 @@ func pullCmd(c *cli.Context) error {
|
||||
}
|
||||
|
||||
// Possible for docker-archive to have multiple tags, so use NewFromLoad instead
|
||||
if strings.Contains(image, libpod.DockerArchive) {
|
||||
if strings.HasPrefix(image, libpod.DockerArchive+":") {
|
||||
newImage, err := runtime.ImageRuntime().LoadFromArchive(getContext(), image, c.String("signature-policy"), writer)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error pulling image from %q", image)
|
||||
|
||||
Reference in New Issue
Block a user