diff options
author | Matthew Heon <matthew.heon@pm.me> | 2020-06-22 13:31:36 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-06-24 14:38:23 -0400 |
commit | 8fbfffc082215b03df29cb1eeb2eb22a582a48cd (patch) | |
tree | 3ca6ad6f38497a81a28a567a69324a4584d026aa | |
parent | 0b4dcc7a36045f88c7bb6fde3884dd52f898e13f (diff) | |
download | podman-8fbfffc082215b03df29cb1eeb2eb22a582a48cd.tar.gz podman-8fbfffc082215b03df29cb1eeb2eb22a582a48cd.tar.bz2 podman-8fbfffc082215b03df29cb1eeb2eb22a582a48cd.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>
-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( |