diff options
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r-- | cmd/podman/create.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go index c246b7903..ae6713cb4 100644 --- a/cmd/podman/create.go +++ b/cmd/podman/create.go @@ -630,7 +630,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim command = append(command, data.ContainerConfig.Cmd...) } - if len(command) == 0 { + if data != nil && len(command) == 0 { return nil, errors.Errorf("No command specified on command line or as CMD or ENTRYPOINT in this image") } @@ -682,7 +682,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim } var systemd bool - if c.BoolT("systemd") && ((filepath.Base(command[0]) == "init") || (filepath.Base(command[0]) == "systemd")) { + if command != nil && c.BoolT("systemd") && ((filepath.Base(command[0]) == "init") || (filepath.Base(command[0]) == "systemd")) { systemd = true if signalString == "" { stopSignal, err = signal.ParseSignal("RTMIN+3") |