Skip to content

Commit

Permalink
rootless: do not raise an error if the entrypoint is specified
Browse files Browse the repository at this point in the history
do not error out when the storage is not initialized and the
entrypoint command is not available for the specified image.  Check it
when we re-exec in an user namespace and can access the storage.

Closes: containers#1452

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Sep 14, 2018
1 parent 61eda67 commit 1c26d81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/podman/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,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")
}

Expand Down Expand Up @@ -681,7 +681,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")
Expand Down

0 comments on commit 1c26d81

Please sign in to comment.