From de8fbb4812a9ab4e6195606574458e29225d3048 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Mon, 10 Apr 2017 13:11:58 +0200 Subject: [PATCH] remove --init-path from client Signed-off-by: Antonio Murdaca (cherry picked from commit a18d103b5ed4ed6ef95b2e4b582872a82022cceb) Signed-off-by: Victor Vieux --- api/types/container/host_config.go | 3 --- cli/command/container/opts.go | 3 --- daemon/oci_linux.go | 5 +---- docs/reference/commandline/create.md | 1 - docs/reference/commandline/run.md | 1 - man/docker-run.1.md | 4 ---- 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/api/types/container/host_config.go b/api/types/container/host_config.go index c8f72f8c89..9fea9eb04b 100644 --- a/api/types/container/host_config.go +++ b/api/types/container/host_config.go @@ -377,7 +377,4 @@ type HostConfig struct { // Run a custom init inside the container, if null, use the daemon's configured settings Init *bool `json:",omitempty"` - - // Custom init path - InitPath string `json:",omitempty"` } diff --git a/cli/command/container/opts.go b/cli/command/container/opts.go index 7480bfaced..2c717431e0 100644 --- a/cli/command/container/opts.go +++ b/cli/command/container/opts.go @@ -118,7 +118,6 @@ type containerOptions struct { runtime string autoRemove bool init bool - initPath string Image string Args []string @@ -284,8 +283,6 @@ func addFlags(flags *pflag.FlagSet) *containerOptions { flags.BoolVar(&copts.init, "init", false, "Run an init inside the container that forwards signals and reaps processes") flags.SetAnnotation("init", "version", []string{"1.25"}) - flags.StringVar(&copts.initPath, "init-path", "", "Path to the docker-init binary") - flags.SetAnnotation("init-path", "version", []string{"1.25"}) return copts } diff --git a/daemon/oci_linux.go b/daemon/oci_linux.go index 49e08a6eb7..73a9590c81 100644 --- a/daemon/oci_linux.go +++ b/daemon/oci_linux.go @@ -624,7 +624,7 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container) (c.HostConfig.Init == nil && daemon.configStore.Init) { s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...) var path string - if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" { + if daemon.configStore.InitPath == "" { path, err = exec.LookPath(daemonconfig.DefaultInitBinary) if err != nil { return err @@ -633,9 +633,6 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container) if daemon.configStore.InitPath != "" { path = daemon.configStore.InitPath } - if c.HostConfig.InitPath != "" { - path = c.HostConfig.InitPath - } s.Mounts = append(s.Mounts, specs.Mount{ Destination: "/dev/init", Type: "bind", diff --git a/docs/reference/commandline/create.md b/docs/reference/commandline/create.md index 02aa22963c..8a57f2ffe9 100644 --- a/docs/reference/commandline/create.md +++ b/docs/reference/commandline/create.md @@ -66,7 +66,6 @@ Options: --help Print usage -h, --hostname string Container host name --init Run an init inside the container that forwards signals and reaps processes - --init-path string Path to the docker-init binary -i, --interactive Keep STDIN open even if not attached --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only) --io-maxiops uint Maximum IOps limit for the system drive (Windows only) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index dea7cec763..a189ccd5ad 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -70,7 +70,6 @@ Options: --help Print usage -h, --hostname string Container host name --init Run an init inside the container that forwards signals and reaps processes - --init-path string Path to the docker-init binary -i, --interactive Keep STDIN open even if not attached --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only) (Windows only). The format is ``. diff --git a/man/docker-run.1.md b/man/docker-run.1.md index 257711d196..2a743c134e 100644 --- a/man/docker-run.1.md +++ b/man/docker-run.1.md @@ -43,7 +43,6 @@ docker-run - Run a command in a new container [**-h**|**--hostname**[=*HOSTNAME*]] [**--help**] [**--init**] -[**--init-path**[=*[]*]] [**-i**|**--interactive**] [**--ip**[=*IPv4-ADDRESS*]] [**--ip6**[=*IPv6-ADDRESS*]] @@ -327,9 +326,6 @@ redirection on the host system. **--init** Run an init inside the container that forwards signals and reaps processes -**--init-path**="" - Path to the docker-init binary - **-i**, **--interactive**=*true*|*false* Keep STDIN open even if not attached. The default is *false*.