Merge pull request #32470 from runcom/remove-init-client

remove --init-path from client
This commit is contained in:
Vincent Demeester 2017-04-25 10:25:58 +02:00 committed by GitHub
commit e1101b1295
6 changed files with 1 additions and 16 deletions

View file

@ -377,7 +377,4 @@ type HostConfig struct {
// Run a custom init inside the container, if null, use the daemon's configured settings // Run a custom init inside the container, if null, use the daemon's configured settings
Init *bool `json:",omitempty"` Init *bool `json:",omitempty"`
// Custom init path
InitPath string `json:",omitempty"`
} }

View file

@ -118,7 +118,6 @@ type containerOptions struct {
runtime string runtime string
autoRemove bool autoRemove bool
init bool init bool
initPath string
Image string Image string
Args []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.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.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 return copts
} }

View file

@ -624,7 +624,7 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container)
(c.HostConfig.Init == nil && daemon.configStore.Init) { (c.HostConfig.Init == nil && daemon.configStore.Init) {
s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...) s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...)
var path string var path string
if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" { if daemon.configStore.InitPath == "" {
path, err = exec.LookPath(daemonconfig.DefaultInitBinary) path, err = exec.LookPath(daemonconfig.DefaultInitBinary)
if err != nil { if err != nil {
return err return err
@ -633,9 +633,6 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container)
if daemon.configStore.InitPath != "" { if daemon.configStore.InitPath != "" {
path = daemon.configStore.InitPath path = daemon.configStore.InitPath
} }
if c.HostConfig.InitPath != "" {
path = c.HostConfig.InitPath
}
s.Mounts = append(s.Mounts, specs.Mount{ s.Mounts = append(s.Mounts, specs.Mount{
Destination: "/dev/init", Destination: "/dev/init",
Type: "bind", Type: "bind",

View file

@ -66,7 +66,6 @@ Options:
--help Print usage --help Print usage
-h, --hostname string Container host name -h, --hostname string Container host name
--init Run an init inside the container that forwards signals and reaps processes --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 -i, --interactive Keep STDIN open even if not attached
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only) --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) --io-maxiops uint Maximum IOps limit for the system drive (Windows only)

View file

@ -70,7 +70,6 @@ Options:
--help Print usage --help Print usage
-h, --hostname string Container host name -h, --hostname string Container host name
--init Run an init inside the container that forwards signals and reaps processes --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 -i, --interactive Keep STDIN open even if not attached
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only) --io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
(Windows only). The format is `<number><unit>`. (Windows only). The format is `<number><unit>`.

View file

@ -43,7 +43,6 @@ docker-run - Run a command in a new container
[**-h**|**--hostname**[=*HOSTNAME*]] [**-h**|**--hostname**[=*HOSTNAME*]]
[**--help**] [**--help**]
[**--init**] [**--init**]
[**--init-path**[=*[]*]]
[**-i**|**--interactive**] [**-i**|**--interactive**]
[**--ip**[=*IPv4-ADDRESS*]] [**--ip**[=*IPv4-ADDRESS*]]
[**--ip6**[=*IPv6-ADDRESS*]] [**--ip6**[=*IPv6-ADDRESS*]]
@ -327,9 +326,6 @@ redirection on the host system.
**--init** **--init**
Run an init inside the container that forwards signals and reaps processes Run an init inside the container that forwards signals and reaps processes
**--init-path**=""
Path to the docker-init binary
**-i**, **--interactive**=*true*|*false* **-i**, **--interactive**=*true*|*false*
Keep STDIN open even if not attached. The default is *false*. Keep STDIN open even if not attached. The default is *false*.