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>
This commit is contained in:
Aditya R
2022-08-24 11:22:33 +05:30
parent 2538bea8da
commit b4584ea854
13 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#### **--env-merge**=*env*
Preprocess default environment variables for the containers. For example
if image contains environment variable `hello=world` user can preprocess
it using `--env-merge hello=${hello}-some` so new value will be `hello=world-some`.

View File

@ -208,6 +208,8 @@ Read in a line delimited file of environment variables. See **Environment** note
@@option env-host
@@option env-merge
@@option expose
#### **--gidmap**=*container_gid:host_gid:amount*

View File

@ -243,6 +243,8 @@ Read in a line delimited file of environment variables. See **Environment** note
@@option env-host
@@option env-merge
@@option expose
#### **--gidmap**=*container_gid:host_gid:amount*