diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-14 21:50:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-14 21:50:21 +0200 |
commit | bb4872e2f6602950f5852c34e95444acc3623f21 (patch) | |
tree | 9c8197ddff683f6f56d5f577d4cfef6554b2710d | |
parent | 9b6cb7e80f98df9725686d849ae9a5ca69858f4d (diff) | |
parent | f76390d5e60bb580b87d61df839b7bb4913bf476 (diff) | |
download | podman-bb4872e2f6602950f5852c34e95444acc3623f21.tar.gz podman-bb4872e2f6602950f5852c34e95444acc3623f21.tar.bz2 podman-bb4872e2f6602950f5852c34e95444acc3623f21.zip |
Merge pull request #15809 from edsantiago/docs_dedup_user
[CI:DOCS] Man pages: refactor common options: --user
-rw-r--r-- | docs/source/markdown/options/user.md | 7 | ||||
-rw-r--r-- | docs/source/markdown/podman-create.1.md.in | 9 | ||||
-rw-r--r-- | docs/source/markdown/podman-exec.1.md.in | 6 | ||||
-rw-r--r-- | docs/source/markdown/podman-run.1.md.in | 8 |
4 files changed, 10 insertions, 20 deletions
diff --git a/docs/source/markdown/options/user.md b/docs/source/markdown/options/user.md new file mode 100644 index 000000000..6cf12d347 --- /dev/null +++ b/docs/source/markdown/options/user.md @@ -0,0 +1,7 @@ +#### **--user**, **-u**=*user[:group]* + +Sets the username or UID used and, optionally, the groupname or GID for the specified command. Both *user* and *group* may be symbolic or numeric. + +Without this argument, the command will run as the user specified in the container image. Unless overridden by a `USER` command in the Containerfile or by a value passed to this option, this user generally defaults to root. + +When a user namespace is not in use, the UID and GID used within the container and on the host will match. When user namespaces are in use, however, the UID and GID in the container may correspond to another UID and GID on the host. In rootless containers, for example, a user namespace is always used, and root in the container will by default correspond to the UID and GID of the user invoking Podman. diff --git a/docs/source/markdown/podman-create.1.md.in b/docs/source/markdown/podman-create.1.md.in index 44e524dd6..020cdc00e 100644 --- a/docs/source/markdown/podman-create.1.md.in +++ b/docs/source/markdown/podman-create.1.md.in @@ -450,14 +450,7 @@ When size is `0`, there is no limit on the amount of memory used for IPC by the @@option unsetenv-all -#### **--user**, **-u**=*user* - -Sets the username or UID used and optionally the groupname or GID for the specified command. - -The following examples are all valid: ---user [user | user:group | uid | uid:gid | user:gid | uid:group ] - -Without this argument the command will be run as root in the container. +@@option user @@option userns.container diff --git a/docs/source/markdown/podman-exec.1.md.in b/docs/source/markdown/podman-exec.1.md.in index a3931df1d..8198c319e 100644 --- a/docs/source/markdown/podman-exec.1.md.in +++ b/docs/source/markdown/podman-exec.1.md.in @@ -44,11 +44,7 @@ to run containers such as CRI-O, the last started container could be from either @@option tty -#### **--user**, **-u** - -Sets the username or UID used and optionally the groupname or GID for the specified command. -The following examples are all valid: ---user [user | user:group | uid | uid:gid | user:gid | uid:group ] +@@option user @@option workdir diff --git a/docs/source/markdown/podman-run.1.md.in b/docs/source/markdown/podman-run.1.md.in index 96605ee3f..227eb455c 100644 --- a/docs/source/markdown/podman-run.1.md.in +++ b/docs/source/markdown/podman-run.1.md.in @@ -491,13 +491,7 @@ echo "asdf" | podman run --rm -i someimage /bin/cat @@option unsetenv-all -#### **--user**, **-u**=*user[:group]* - -Sets the username or UID used and, optionally, the groupname or GID for the specified command. Both *user* and *group* may be symbolic or numeric. - -Without this argument, the command will run as the user specified in the container image. Unless overridden by a `USER` command in the Containerfile or by a value passed to this option, this user generally defaults to root. - -When a user namespace is not in use, the UID and GID used within the container and on the host will match. When user namespaces are in use, however, the UID and GID in the container may correspond to another UID and GID on the host. In rootless containers, for example, a user namespace is always used, and root in the container will by default correspond to the UID and GID of the user invoking Podman. +@@option user @@option userns.container |