mirror of https://github.com/docker/cli.git
docs: move --init to docker run reference
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
92c664b0dc
commit
9e75a4cf61
|
@ -58,7 +58,7 @@ Create and run a new container from an image
|
||||||
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
|
| `--health-timeout` | `duration` | `0s` | Maximum time to allow one check to run (ms\|s\|m\|h) (default 0s) |
|
||||||
| `--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`](#init) | | | Run an init inside the container that forwards signals and reaps processes |
|
||||||
| [`-i`](#interactive), [`--interactive`](#interactive) | | | Keep STDIN open even if not attached |
|
| [`-i`](#interactive), [`--interactive`](#interactive) | | | Keep STDIN open even if not attached |
|
||||||
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
|
| `--io-maxbandwidth` | `bytes` | `0` | Maximum IO bandwidth limit for the system drive (Windows only) |
|
||||||
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
|
| `--io-maxiops` | `uint64` | `0` | Maximum IOps limit for the system drive (Windows only) |
|
||||||
|
@ -902,6 +902,17 @@ $ docker run --rm -i busybox echo "foo bar baz" \
|
||||||
rab
|
rab
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## <a name="init"></a> Specify an init process
|
||||||
|
|
||||||
|
You can use the `--init` flag to indicate that an init process should be used as
|
||||||
|
the PID 1 in the container. Specifying an init process ensures the usual
|
||||||
|
responsibilities of an init system, such as reaping zombie processes, are
|
||||||
|
performed inside the created container.
|
||||||
|
|
||||||
|
The default init process used is the first `docker-init` executable found in the
|
||||||
|
system path of the Docker daemon process. This `docker-init` binary, included in
|
||||||
|
the default installation, is backed by [tini](https://github.com/krallin/tini).
|
||||||
|
|
||||||
### <a name="tty"></a> Allocate a pseudo-TTY (-t, --tty)
|
### <a name="tty"></a> Allocate a pseudo-TTY (-t, --tty)
|
||||||
|
|
||||||
The `--tty` (or `-t`) flag attaches a pseudo-TTY to the container, connecting
|
The `--tty` (or `-t`) flag attaches a pseudo-TTY to the container, connecting
|
||||||
|
|
|
@ -241,17 +241,6 @@ $ echo $?
|
||||||
3
|
3
|
||||||
```
|
```
|
||||||
|
|
||||||
## Specify an init process
|
|
||||||
|
|
||||||
You can use the `--init` flag to indicate that an init process should be used as
|
|
||||||
the PID 1 in the container. Specifying an init process ensures the usual
|
|
||||||
responsibilities of an init system, such as reaping zombie processes, are
|
|
||||||
performed inside the created container.
|
|
||||||
|
|
||||||
The default init process used is the first `docker-init` executable found in the
|
|
||||||
system path of the Docker daemon process. This `docker-init` binary, included in
|
|
||||||
the default installation, is backed by [tini](https://github.com/krallin/tini).
|
|
||||||
|
|
||||||
## Specify custom cgroups
|
## Specify custom cgroups
|
||||||
|
|
||||||
Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a
|
Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a
|
||||||
|
|
Loading…
Reference in New Issue