From f329e2ad67c5ff883d038c36435d30eb2ea8c670 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 22 Jun 2020 13:31:36 -0400 Subject: 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 --- cmd/podman/common/create.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: [:])", ) createFlags.String( - "userns", "", + "userns", os.Getenv("PODMAN_USERNS"), "User namespace to use", ) createFlags.String( -- cgit v1.2.3-54-g00ecf