aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-06-22 13:31:36 -0400
committerMatthew Heon <mheon@redhat.com>2020-06-24 14:38:23 -0400
commit8fbfffc082215b03df29cb1eeb2eb22a582a48cd (patch)
tree3ca6ad6f38497a81a28a567a69324a4584d026aa /cmd/podman/common
parent0b4dcc7a36045f88c7bb6fde3884dd52f898e13f (diff)
downloadpodman-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>
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go3
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(