Browse code

remove --init-path from client

Signed-off-by: Antonio Murdaca <runcom@redhat.com>

Antonio Murdaca authored on 2017/04/10 20:11:58
Showing 6 changed files
... ...
@@ -377,7 +377,4 @@ type HostConfig struct {
377 377
 
378 378
 	// Run a custom init inside the container, if null, use the daemon's configured settings
379 379
 	Init *bool `json:",omitempty"`
380
-
381
-	// Custom init path
382
-	InitPath string `json:",omitempty"`
383 380
 }
... ...
@@ -118,7 +118,6 @@ type containerOptions struct {
118 118
 	runtime            string
119 119
 	autoRemove         bool
120 120
 	init               bool
121
-	initPath           string
122 121
 
123 122
 	Image string
124 123
 	Args  []string
... ...
@@ -284,8 +283,6 @@ func addFlags(flags *pflag.FlagSet) *containerOptions {
284 284
 
285 285
 	flags.BoolVar(&copts.init, "init", false, "Run an init inside the container that forwards signals and reaps processes")
286 286
 	flags.SetAnnotation("init", "version", []string{"1.25"})
287
-	flags.StringVar(&copts.initPath, "init-path", "", "Path to the docker-init binary")
288
-	flags.SetAnnotation("init-path", "version", []string{"1.25"})
289 287
 	return copts
290 288
 }
291 289
 
... ...
@@ -624,7 +624,7 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container)
624 624
 			(c.HostConfig.Init == nil && daemon.configStore.Init) {
625 625
 			s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...)
626 626
 			var path string
627
-			if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" {
627
+			if daemon.configStore.InitPath == "" {
628 628
 				path, err = exec.LookPath(daemonconfig.DefaultInitBinary)
629 629
 				if err != nil {
630 630
 					return err
... ...
@@ -633,9 +633,6 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container)
633 633
 			if daemon.configStore.InitPath != "" {
634 634
 				path = daemon.configStore.InitPath
635 635
 			}
636
-			if c.HostConfig.InitPath != "" {
637
-				path = c.HostConfig.InitPath
638
-			}
639 636
 			s.Mounts = append(s.Mounts, specs.Mount{
640 637
 				Destination: "/dev/init",
641 638
 				Type:        "bind",
... ...
@@ -66,7 +66,6 @@ Options:
66 66
       --help                          Print usage
67 67
   -h, --hostname string               Container host name
68 68
       --init                          Run an init inside the container that forwards signals and reaps processes
69
-      --init-path string              Path to the docker-init binary
70 69
   -i, --interactive                   Keep STDIN open even if not attached
71 70
       --io-maxbandwidth string        Maximum IO bandwidth limit for the system drive (Windows only)
72 71
       --io-maxiops uint               Maximum IOps limit for the system drive (Windows only)
... ...
@@ -70,7 +70,6 @@ Options:
70 70
       --help                          Print usage
71 71
   -h, --hostname string               Container host name
72 72
       --init                          Run an init inside the container that forwards signals and reaps processes
73
-      --init-path string              Path to the docker-init binary
74 73
   -i, --interactive                   Keep STDIN open even if not attached
75 74
       --io-maxbandwidth string        Maximum IO bandwidth limit for the system drive (Windows only)
76 75
                                       (Windows only). The format is `<number><unit>`.
... ...
@@ -43,7 +43,6 @@ docker-run - Run a command in a new container
43 43
 [**-h**|**--hostname**[=*HOSTNAME*]]
44 44
 [**--help**]
45 45
 [**--init**]
46
-[**--init-path**[=*[]*]]
47 46
 [**-i**|**--interactive**]
48 47
 [**--ip**[=*IPv4-ADDRESS*]]
49 48
 [**--ip6**[=*IPv6-ADDRESS*]]
... ...
@@ -327,9 +326,6 @@ redirection on the host system.
327 327
 **--init**
328 328
    Run an init inside the container that forwards signals and reaps processes
329 329
 
330
-**--init-path**=""
331
-   Path to the docker-init binary
332
-
333 330
 **-i**, **--interactive**=*true*|*false*
334 331
    Keep STDIN open even if not attached. The default is *false*.
335 332