summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 2012aa6de..5e2ea3969 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -587,6 +587,10 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string,
command = append(command, data.ContainerConfig.Cmd...)
}
+ if len(command) == 0 {
+ return nil, errors.Errorf("No command specified on command line or as CMD or ENTRYPOINT in this image")
+ }
+
// EXPOSED PORTS
portBindings, err := exposedPorts(c, data.ContainerConfig.ExposedPorts)
if err != nil {