docs: move --uts to docker run reference

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2023-11-22 09:29:53 +01:00
parent d66fe78810
commit ff62bf47b0
2 changed files with 18 additions and 16 deletions

View File

@ -109,7 +109,7 @@ Create and run a new container from an image
| [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options | | [`--ulimit`](#ulimit) | `ulimit` | | Ulimit options |
| `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) | | `-u`, `--user` | `string` | | Username or UID (format: <name\|uid>[:<group\|gid>]) |
| `--userns` | `string` | | User namespace to use | | `--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 | | [`-v`](#volume), [`--volume`](#volume) | `list` | | Bind mount a volume |
| `--volume-driver` | `string` | | Optional volume driver for the container | | `--volume-driver` | `string` | | Optional volume driver for the container |
| [`--volumes-from`](#volumes-from) | `list` | | Mount volumes from the specified container(s) | | [`--volumes-from`](#volumes-from) | `list` | | Mount volumes from the specified container(s) |
@ -272,6 +272,23 @@ container.
strace: Process 1 attached strace: Process 1 attached
``` ```
### <a name="uts"></a> 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.
### <a name="privileged"></a> Full container capabilities (--privileged) ### <a name="privileged"></a> Full container capabilities (--privileged)
```console ```console

View File

@ -159,21 +159,6 @@ $ docker ps -q --filter ancestor=nginx:alpine
For more information about using filters, see For more information about using filters, see
[Filtering](https://docs.docker.com/config/filter/). [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 settings (--ipc)
--ipc="MODE" : Set the IPC mode for the container --ipc="MODE" : Set the IPC mode for the container