From ff62bf47b02d7efd67819d635a05ff8af11b2f37 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Wed, 22 Nov 2023 09:29:53 +0100 Subject: [PATCH] docs: move --uts to docker run reference Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- docs/reference/commandline/run.md | 19 ++++++++++++++++++- docs/reference/run.md | 15 --------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 2688d3b59b..8111f40fbf 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -109,7 +109,7 @@ Create and run a new container from an image | [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options | | `-u`, `--user` | `string` | | Username or UID (format: [:]) | | `--userns` | `string` | | User namespace to use | -| `--uts` | `string` | | UTS namespace to use | +| [`--uts`](#uts) | `string` | | UTS namespace to use | | [`-v`](#volume), [`--volume`](#volume) | `list` | | Bind mount a volume | | `--volume-driver` | `string` | | Optional volume driver for the container | | [`--volumes-from`](#volumes-from) | `list` | | Mount volumes from the specified container(s) | @@ -272,6 +272,23 @@ container. strace: Process 1 attached ``` +### UTS settings (--uts) + +```text +--uts="" : Set the UTS namespace mode for the container + 'host': use the host's UTS namespace inside the container +``` + +The UTS namespace is for setting the hostname and the domain that's visible to +running processes in that namespace. By default, all containers, including +those with `--network=host`, have their own UTS namespace. The `host` setting +will result in the container using the same UTS namespace as the host. Note +that `--hostname` and `--domainname` are invalid in `host` UTS mode. + +You may wish to share the UTS namespace with the host if you would like the +hostname of the container to change as the hostname of the host changes. A more +advanced use case would be changing the host's hostname from a container. + ### Full container capabilities (--privileged) ```console diff --git a/docs/reference/run.md b/docs/reference/run.md index bd9aa7c933..4eed05b2c0 100644 --- a/docs/reference/run.md +++ b/docs/reference/run.md @@ -159,21 +159,6 @@ $ docker ps -q --filter ancestor=nginx:alpine For more information about using filters, see [Filtering](https://docs.docker.com/config/filter/). -## UTS settings (--uts) - - --uts="" : Set the UTS namespace mode for the container, - 'host': use the host's UTS namespace inside the container - -The UTS namespace is for setting the hostname and the domain that is visible -to running processes in that namespace. By default, all containers, including -those with `--network=host`, have their own UTS namespace. The `host` setting will -result in the container using the same UTS namespace as the host. Note that -`--hostname` and `--domainname` are invalid in `host` UTS mode. - -You may wish to share the UTS namespace with the host if you would like the -hostname of the container to change as the hostname of the host changes. A -more advanced use case would be changing the host's hostname from a container. - ## IPC settings (--ipc) --ipc="MODE" : Set the IPC mode for the container