summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-23 19:28:08 +0100
committerGitHub <noreply@github.com>2021-12-23 19:28:08 +0100
commit73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37 (patch)
tree98bbc1c08061cde903f5b1aef21790d66e8e742e /cmd
parent5570b5b9751894d509be2b478685097cf8fde923 (diff)
parente8c06fac97f56ccc710584731d8b52ed58fbd2dd (diff)
downloadpodman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.tar.gz
podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.tar.bz2
podman-73a54ea54d0a1b4ccaa2a0e23c678e5b7c1d5c37.zip
Merge pull request #12627 from rhatdan/passwd
Allow users to add host user accounts to /etc/passwd
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/create.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 1b01cd001..f02c5713b 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -292,6 +292,14 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
"Set proxy environment variables in the container based on the host proxy vars",
)
+ hostUserFlagName := "hostuser"
+ createFlags.StringSliceVar(
+ &cf.HostUsers,
+ hostUserFlagName, []string{},
+ "Host user account to add to /etc/passwd within container",
+ )
+ _ = cmd.RegisterFlagCompletionFunc(hostUserFlagName, completion.AutocompleteNone)
+
imageVolumeFlagName := "image-volume"
createFlags.StringVar(
&cf.ImageVolume,