Merge pull request #1472 from giuseppe/rootless-fix-entrypoint

rootless: do not raise an error if the entrypoint is specified
This commit is contained in:
Matthew Heon 2018-09-14 17:53:34 -04:00 committed by GitHub
commit b471904175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -630,7 +630,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
command = append(command, data.ContainerConfig.Cmd...) 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") 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 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 systemd = true
if signalString == "" { if signalString == "" {
stopSignal, err = signal.ParseSignal("RTMIN+3") stopSignal, err = signal.ParseSignal("RTMIN+3")