diff options
author | Matthew Heon <matthew.heon@pm.me> | 2020-06-22 13:31:36 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2020-06-22 14:11:30 -0400 |
commit | f329e2ad67c5ff883d038c36435d30eb2ea8c670 (patch) | |
tree | 2328e629914b99b9026a4c25c8ef20da094252c3 /cmd/podman/common/create.go | |
parent | 22942e392df57d0ae5cc8ebdd27d060e43206d62 (diff) | |
download | podman-f329e2ad67c5ff883d038c36435d30eb2ea8c670.tar.gz podman-f329e2ad67c5ff883d038c36435d30eb2ea8c670.tar.bz2 podman-f329e2ad67c5ff883d038c36435d30eb2ea8c670.zip |
Re-add PODMAN_USERNS environment variable
This was lost during the Podman 2.0 migration. Turns out to be a
very easy fix, fortunately - we want to use the environment var
if not explicitly overridden.
Fixes #6705
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r-- | cmd/podman/common/create.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 921cd5a71..fbb7f449e 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -2,6 +2,7 @@ package common import ( "fmt" + "os" "github.com/containers/common/pkg/auth" "github.com/containers/libpod/cmd/podman/registry" @@ -464,7 +465,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet { "Username or UID (format: <name|uid>[:<group|gid>])", ) createFlags.String( - "userns", "", + "userns", os.Getenv("PODMAN_USERNS"), "User namespace to use", ) createFlags.String( |