8000 Merge pull request #32470 from runcom/remove-init-client · moby/moby@e1101b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit e1101b1

Browse files
authored
Merge pull request #32470 from runcom/remove-init-client
remove --init-path from client
2 parents a3a109d + a18d103 commit e1101b1

File tree

6 files changed

+1
-16
lines changed

6 files changed

+1
-16
lines changed

api/types/container/host_config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,4 @@ type HostConfig struct {
377377

378378
// Run a custom init inside the container, if null, use the daemon's configured settings
379379
Init *bool `json:",omitempty"`
380-
381-
// Custom init path
382-
InitPath string `json:",omitempty"`
383380
}

cli/command/container/opts.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ type containerOptions struct {
118118
runtime string
119119
autoRemove bool
120120
init bool
121-
initPath string
122121

123122
Image string
124123
Args []string
@@ -284,8 +283,6 @@ func addFlags(flags *pflag.FlagSet) *containerOptions {
284283

285284
flags.BoolVar(&copts.init, "init", false, "Run an init inside the container that forwards signals and reaps processes")
286285
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"})
289286
return copts
290287
}
291288

daemon/oci_linux.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container)
624624
(c.HostConfig.Init == nil && daemon.configStore.Init) {
625625
s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...)
626626
var path string
627-
if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" {
627+
if daemon.configStore.InitPath == "" {
628628
path, err = exec.LookPath(daemonconfig.DefaultInitBinary)
629629
if err != nil {
630630
return err
@@ -633,9 +633,6 @@ func (daemon *Daemon) populateCommonSpec(s *specs.Spec, c *container.Container)
633633
if daemon.configStore.InitPath != "" {
634634
path = daemon.configStore.InitPath
635635
}
636-
if c.HostConfig.InitPath != "" {
637-
path = c.HostConfig.InitPath
638-
}
639636
s.Mounts = append(s.Mounts, specs.Mount{
640637
Destination: "/dev/init",
641638
Type: "bind",

docs/reference/commandline/create.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ Options:
6666
--help Print usage
6767
-h, --hostname string Container host name
6868
--init Run an init inside the container that forwards signals and reaps processes
69-
--init-path string Path to the docker-init binary
7069
-i, --interactive Keep STDIN open even if not attached
7170
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
7271
--io-maxiops uint Maximum IOps limit for the system drive (Windows only)

docs/reference/commandline/run.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ Options:
7070
--help Print usage
7171
-h, --hostname string Container host name
7272
--init Run an init inside the container that forwards signals and reaps processes
73-
--init-path string Path to the docker-init binary
7473
-i, --interactive Keep STDIN open even if not attached
7574
--io-maxbandwidth string Maximum IO bandwidth limit for the system drive (Windows only)
7675
(Windows only). The format is `<number><unit>`.

man/docker-run.1.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ docker-run - Run a command in a new container
4343
[**-h**|**--hostname**[=*HOSTNAME*]]
4444
[**--help**]
4545
[**--init**]
46-
[**--init-path**[=*[]*]]
4746
[**-i**|**--interactive**]
4847
[**--ip**[=*IPv4-ADDRESS*]]
4948
[**--ip6**[=*IPv6-ADDRESS*]]
@@ -327,9 +326,6 @@ redirection on the host system.
327326
**--init**
328327
Run an init inside the container that forwards signals and reaps processes
329328

330-
**--init-path**=""
331-
Path to the docker-init binary
332-
333329
**-i**, **--interactive**=*true*|*false*
334330
Keep STDIN open even if not attached. The default is *false*.
335331

0 commit comments

Comments
 (0)
0