diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-12-11 21:22:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 21:22:59 +0100 |
commit | f81f15f42250a642f0753b5f18be61c1f24931dd (patch) | |
tree | fb3e64704caa95da765368b198bd834bc9e1c8df /cmd/podman | |
parent | 5941138fdd3d203a949871f47f1d63462a0f18e8 (diff) | |
parent | a332825ff58de514dd226de58885aa32a778be4f (diff) | |
download | podman-f81f15f42250a642f0753b5f18be61c1f24931dd.tar.gz podman-f81f15f42250a642f0753b5f18be61c1f24931dd.tar.bz2 podman-f81f15f42250a642f0753b5f18be61c1f24931dd.zip |
Merge pull request #4677 from baude/execenvfile
allow exec to read files of environment variables
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/cliconfig/config.go | 1 | ||||
-rw-r--r-- | cmd/podman/exec.go | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/cliconfig/config.go b/cmd/podman/cliconfig/config.go index 431d5e087..e81756808 100644 --- a/cmd/podman/cliconfig/config.go +++ b/cmd/podman/cliconfig/config.go @@ -128,6 +128,7 @@ type ExecValues struct { PodmanCommand DetachKeys string Env []string + EnvFile []string Privileged bool Interactive bool Tty bool diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go index 8dcec24ce..6e5799396 100644 --- a/cmd/podman/exec.go +++ b/cmd/podman/exec.go @@ -40,6 +40,7 @@ func init() { // priority execCommand.DetachKeys = "" flags.StringArrayVarP(&execCommand.Env, "env", "e", []string{}, "Set environment variables") + flags.StringSliceVar(&execCommand.EnvFile, "env-file", []string{}, "Read in a file of environment variables") flags.BoolVarP(&execCommand.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached") flags.BoolVarP(&execCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of") flags.BoolVar(&execCommand.Privileged, "privileged", false, "Give the process extended Linux capabilities inside the container. The default is false") @@ -48,6 +49,7 @@ func init() { flags.IntVar(&execCommand.PreserveFDs, "preserve-fds", 0, "Pass N additional file descriptors to the container") flags.StringVarP(&execCommand.Workdir, "workdir", "w", "", "Working directory inside the container") + markFlagHiddenForRemoteClient("env-file", flags) markFlagHiddenForRemoteClient("latest", flags) markFlagHiddenForRemoteClient("preserve-fds", flags) } |