summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-24 09:14:42 -0400
committerGitHub <noreply@github.com>2022-08-24 09:14:42 -0400
commit67c4068bb35fd1aad95b1701c94ed11183d0fd66 (patch)
tree19f9cc0bbbdd593cbb099c260bf6e395cd80d715 /cmd
parent1bcceadca4850e8efd975d927a5586ad052207ac (diff)
parentb4584ea8546be227c74174130ec3a04a93996d28 (diff)
downloadpodman-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.go8
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(),