diff options
author | baude <bbaude@redhat.com> | 2018-04-14 15:34:48 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-04-14 23:55:24 +0000 |
commit | fa8442e4a063b9a074cd2d17effdf5de138f90cb (patch) | |
tree | 9bf00bed67a58ad35c9eb7ac6f176e3bb48fa4fd /cmd/podman/load.go | |
parent | 62b59df053357f040d85c26727734815046e2bc3 (diff) | |
download | podman-fa8442e4a063b9a074cd2d17effdf5de138f90cb.tar.gz podman-fa8442e4a063b9a074cd2d17effdf5de138f90cb.tar.bz2 podman-fa8442e4a063b9a074cd2d17effdf5de138f90cb.zip |
podman pull should always try to pull
In the case where you have an image local, if the the user runs
podman pull, we should always attempt to pull an updated image.
Added a forceRemote bool to New (image) so we can differentiate
between "pull" or run because the actions differ. Run does not
need to pull the latest -- only run.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #618
Approved by: baude
Diffstat (limited to 'cmd/podman/load.go')
-rw-r--r-- | cmd/podman/load.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/load.go b/cmd/podman/load.go index 8146f4c5d..941dd68d9 100644 --- a/cmd/podman/load.go +++ b/cmd/podman/load.go @@ -99,17 +99,17 @@ func loadCmd(c *cli.Context) error { } src := libpod.DockerArchive + ":" + input - newImage, err := runtime.ImageRuntime().New(src, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}) + newImage, err := runtime.ImageRuntime().New(src, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}, false) if err != nil { // generate full src name with specified image:tag fullSrc := libpod.OCIArchive + ":" + input if image != "" { fullSrc = fullSrc + ":" + image } - newImage, err = runtime.ImageRuntime().New(fullSrc, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}) + newImage, err = runtime.ImageRuntime().New(fullSrc, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}, false) if err != nil { src = libpod.DirTransport + ":" + input - newImage, err = runtime.ImageRuntime().New(src, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}) + newImage, err = runtime.ImageRuntime().New(src, c.String("signature-policy"), "", writer, &libpodImage.DockerRegistryOptions{}, libpodImage.SigningOptions{}, false) if err != nil { return errors.Wrapf(err, "error pulling %q", src) } |