mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
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>
This commit is contained in:
@ -2,6 +2,7 @@ package common
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/containers/common/pkg/auth"
|
"github.com/containers/common/pkg/auth"
|
||||||
"github.com/containers/libpod/cmd/podman/registry"
|
"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>])",
|
"Username or UID (format: <name|uid>[:<group|gid>])",
|
||||||
)
|
)
|
||||||
createFlags.String(
|
createFlags.String(
|
||||||
"userns", "",
|
"userns", os.Getenv("PODMAN_USERNS"),
|
||||||
"User namespace to use",
|
"User namespace to use",
|
||||||
)
|
)
|
||||||
createFlags.String(
|
createFlags.String(
|
||||||
|
Reference in New Issue
Block a user