Skip to content

Commit

Permalink
podman: honor env variable PODMAN_USERNS
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed May 24, 2019
1 parent f09370c commit 5eb321a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/podman/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func getCreateFlags(c *cliconfig.PodmanCommand) {
"Username or UID (format: <name|uid>[:<group|gid>])",
)
createFlags.String(
"userns", "",
"userns", os.Getenv("PODMAN_USERNS"),
"User namespace to use",
)
createFlags.String(
Expand Down
2 changes: 1 addition & 1 deletion docs/podman-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ Without this argument the command will be run as root in the container.
**--userns**=keep-id
**--userns**=ns:my_namespace

Set the user namespace mode for the container. The use of userns is disabled by default.
Set the user namespace mode for the container. It defaults to the **PODMAN_USERNS** environment variable. An empty value means user namespaces are disabled.

- `host`: run in the user namespace of the caller. This is the default if no user namespace options are set. The processes running in the container will have the same privileges on the host as any other process launched by the calling user.
- `keep-id`: creates a user namespace where the current rootless user's UID:GID are mapped to the same values in the container. This option is ignored for containers created by the root user.
Expand Down
2 changes: 1 addition & 1 deletion docs/podman-run.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ Without this argument the command will be run as root in the container.
**--userns**=keep-id
**--userns**=ns:my_namespace

Set the user namespace mode for the container. The use of userns is disabled by default.
Set the user namespace mode for the container. It defaults to the **PODMAN_USERNS** environment variable. An empty value means user namespaces are disabled.

- `host`: run in the user namespace of the caller. This is the default if no user namespace options are set. The processes running in the container will have the same privileges on the host as any other process launched by the calling user.
- `keep-id`: creates a user namespace where the current rootless user's UID:GID are mapped to the same values in the container. This option is ignored for containers created by the root user.
Expand Down

0 comments on commit 5eb321a

Please sign in to comment.