summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-04 06:41:07 -0800
committerGitHub <noreply@github.com>2019-01-04 06:41:07 -0800
commit6868b5aa1444404113bc6a4582203fbbf89490c2 (patch)
tree2be4469136fd0f7c179352d6a721d2e9f0a61f47 /cmd/podman/create.go
parent9ffd4806163e410d51d0f0cbece45b7405ff9fee (diff)
parent75578aad61c1e9fae021223ece70cb83e3e2bcf2 (diff)
downloadpodman-6868b5aa1444404113bc6a4582203fbbf89490c2.tar.gz
podman-6868b5aa1444404113bc6a4582203fbbf89490c2.tar.bz2
podman-6868b5aa1444404113bc6a4582203fbbf89490c2.zip
Merge pull request #2045 from vrothberg/init
add init support
Diffstat (limited to 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index dae429047..395a64b3b 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -809,6 +809,16 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
Syslog: c.GlobalBool("syslog"),
}
+ if c.Bool("init") {
+ initPath := c.String("init-path")
+ if initPath == "" {
+ initPath = runtime.GetConfig().InitPath
+ }
+ if err := config.AddContainerInitBinary(initPath); err != nil {
+ return nil, err
+ }
+ }
+
if config.Privileged {
config.LabelOpts = label.DisableSecOpt()
} else {