summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/run.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index 0c174a729..e9eaf83d2 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -32,6 +32,7 @@ var runCommand = cli.Command{
}
func runCmd(c *cli.Context) error {
+ var imageName string
if err := validateFlags(c, createFlags); err != nil {
return err
}
@@ -64,8 +65,12 @@ func runCmd(c *cli.Context) error {
if err != nil {
return err
}
-
- createConfig, err := parseCreateOpts(c, runtime, newImage.Names()[0], data)
+ if len(newImage.Names()) < 1 {
+ imageName = newImage.ID()
+ } else {
+ imageName = newImage.Names()[0]
+ }
+ createConfig, err := parseCreateOpts(c, runtime, imageName, data)
if err != nil {
return err
}