aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-09-14 13:22:39 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-09-14 13:22:55 +0200
commit1c26d81394101adbf1e947b4bbf36e44e14e1f99 (patch)
tree74914571b485918ab2227e44a2d8a6615574573c /cmd
parent61eda671eca96b6fa32369572d9b49850895d37b (diff)
downloadpodman-1c26d81394101adbf1e947b4bbf36e44e14e1f99.tar.gz
podman-1c26d81394101adbf1e947b4bbf36e44e14e1f99.tar.bz2
podman-1c26d81394101adbf1e947b4bbf36e44e14e1f99.zip
rootless: do not raise an error if the entrypoint is specified
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: https://github.com/containers/libpod/issues/1452 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd')
-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 bc010d047..5a1b74251 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -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")
}
@@ -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")