summaryrefslogtreecommitdiff
path: root/cmd/podman/exec.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-12-11 09:16:55 -0600
committerbaude <bbaude@redhat.com>2019-12-11 09:21:24 -0600
commita332825ff58de514dd226de58885aa32a778be4f (patch)
treecd67994ff19ff038a78c0d710dee3a14bc02bae1 /cmd/podman/exec.go
parenta18de10499702495e4108b1c6f7abb244018b8f1 (diff)
downloadpodman-a332825ff58de514dd226de58885aa32a778be4f.tar.gz
podman-a332825ff58de514dd226de58885aa32a778be4f.tar.bz2
podman-a332825ff58de514dd226de58885aa32a778be4f.zip
allow exec to read files of environment variables
we want the ability to define environment variables in files for the exec command. Fixes: #1782408 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/exec.go')
-rw-r--r--cmd/podman/exec.go2
1 files changed, 2 insertions, 0 deletions
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)
}