summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/containers_create.go
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-08-24 11:22:33 +0530
committerAditya R <arajan@redhat.com>2022-08-24 14:06:25 +0530
commitb4584ea8546be227c74174130ec3a04a93996d28 (patch)
treea18b2250fbbbc64f297415df7e27b37c2e659352 /pkg/api/handlers/compat/containers_create.go
parent2538bea8da2a4dba96f1c80594a66f6319d2d872 (diff)
downloadpodman-b4584ea8546be227c74174130ec3a04a93996d28.tar.gz
podman-b4584ea8546be227c74174130ec3a04a93996d28.tar.bz2
podman-b4584ea8546be227c74174130ec3a04a93996d28.zip
run,create: add support for --env-merge for preprocessing vars
Allow end users to preprocess default environment variables before injecting them into container using `--env-merge` Usage ``` podman run -it --rm --env-merge some=${some}-edit --env-merge some2=${some2}-edit2 myimage sh ``` Closes: https://github.com/containers/podman/issues/15288 Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat/containers_create.go')
-rw-r--r--pkg/api/handlers/compat/containers_create.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index 9fff8b4c8..d4f5d5f36 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -408,6 +408,7 @@ func cliOpts(cc handlers.CreateContainerConfig, rtc *config.Config) (*entities.C
Systemd: "true", // podman default
TmpFS: parsedTmp,
TTY: cc.Config.Tty,
+ EnvMerge: cc.EnvMerge,
UnsetEnv: cc.UnsetEnv,
UnsetEnvAll: cc.UnsetEnvAll,
User: cc.Config.User,