summaryrefslogtreecommitdiff
path: root/cmd/podman/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/pull.go')
-rw-r--r--cmd/podman/pull.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/podman/pull.go b/cmd/podman/pull.go
index c19e6715b..886f82dd5 100644
--- a/cmd/podman/pull.go
+++ b/cmd/podman/pull.go
@@ -4,6 +4,7 @@ import (
"io"
"os"
+ "fmt"
"github.com/containers/image/types"
"github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod"
@@ -106,5 +107,13 @@ func pullCmd(c *cli.Context) error {
if _, err := runtime.PullImage(image, options); err != nil {
return errors.Wrapf(err, "error pulling image %q", image)
}
+
+ newImage := runtime.NewImage(image)
+ iid, err := newImage.GetImageID()
+ // Intentially choosing to ignore if there is an error because
+ // outputting the image ID is a NTH and not integral to the pull
+ if err == nil {
+ fmt.Println(iid)
+ }
return nil
}