summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-09-14 17:53:34 -0400
committerGitHub <noreply@github.com>2018-09-14 17:53:34 -0400
commitb4719041750348cc83d52ffaab944d38fa9c3189 (patch)
treee744379b2e76106eaa95af94de5389d08d0531f9 /cmd/podman
parent5622de9c617f3324e915fdb950dee9bf0d268d47 (diff)
parent1c26d81394101adbf1e947b4bbf36e44e14e1f99 (diff)
downloadpodman-b4719041750348cc83d52ffaab944d38fa9c3189.tar.gz
podman-b4719041750348cc83d52ffaab944d38fa9c3189.tar.bz2
podman-b4719041750348cc83d52ffaab944d38fa9c3189.zip
Merge pull request #1472 from giuseppe/rootless-fix-entrypoint
rootless: do not raise an error if the entrypoint is specified
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/create.go4
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")