diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-08-24 09:14:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-24 09:14:42 -0400 |
commit | 67c4068bb35fd1aad95b1701c94ed11183d0fd66 (patch) | |
tree | 19f9cc0bbbdd593cbb099c260bf6e395cd80d715 /cmd | |
parent | 1bcceadca4850e8efd975d927a5586ad052207ac (diff) | |
parent | b4584ea8546be227c74174130ec3a04a93996d28 (diff) | |
download | podman-67c4068bb35fd1aad95b1701c94ed11183d0fd66.tar.gz podman-67c4068bb35fd1aad95b1701c94ed11183d0fd66.tar.bz2 podman-67c4068bb35fd1aad95b1701c94ed11183d0fd66.zip |
Merge pull request #15443 from flouthoc/env-merge-support
run,create: add support for `--env-merge` for preprocessing default environment variables
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/common/create.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 00873b95b..1e573cc2d 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -124,6 +124,14 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, "This is a Docker specific option and is a NOOP", ) + envMergeFlagName := "env-merge" + createFlags.StringArrayVar( + &cf.EnvMerge, + envMergeFlagName, []string{}, + "Preprocess environment variables from image before injecting them into the container", + ) + _ = cmd.RegisterFlagCompletionFunc(envMergeFlagName, completion.AutocompleteNone) + envFlagName := "env" createFlags.StringArrayP( envFlagName, "e", Env(), |