summaryrefslogtreecommitdiff
path: root/cmd/podman/run.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/run.go')
-rw-r--r--cmd/podman/run.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index d9bc00b78..eecfe87b3 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -41,8 +41,12 @@ func runCmd(c *cli.Context) error {
return errors.Wrapf(err, "error creating libpod runtime")
}
defer runtime.Shutdown(false)
+ if len(c.Args()) < 1 {
+ return errors.Errorf("image name or ID is required")
+ }
- createConfig, err := parseCreateOpts(c, runtime)
+ imageName, _, data, err := imageData(c, runtime, c.Args()[0])
+ createConfig, err := parseCreateOpts(c, runtime, imageName, data)
if err != nil {
return err
}