From 9e75a4cf610de22c05f1740333b240cc2ac2efda Mon Sep 17 00:00:00 2001
From: David Karlsson <35727626+dvdksn@users.noreply.github.com>
Date: Thu, 23 Nov 2023 14:15:17 +0100
Subject: [PATCH] docs: move --init to docker run reference
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
---
docs/reference/commandline/run.md | 13 ++++++++++++-
docs/reference/run.md | 11 -----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md
index 3deaf5fd60..445111bd98 100644
--- a/docs/reference/commandline/run.md
+++ b/docs/reference/commandline/run.md
@@ -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) |
| `--help` | | | Print usage |
| `-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 |
| `--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) |
@@ -902,6 +902,17 @@ $ docker run --rm -i busybox echo "foo bar baz" \
rab
```
+## 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).
+
### Allocate a pseudo-TTY (-t, --tty)
The `--tty` (or `-t`) flag attaches a pseudo-TTY to the container, connecting
diff --git a/docs/reference/run.md b/docs/reference/run.md
index 5f2356d90f..52a99eb611 100644
--- a/docs/reference/run.md
+++ b/docs/reference/run.md
@@ -241,17 +241,6 @@ $ echo $?
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
Using the `--cgroup-parent` flag, you can pass a specific cgroup to run a