aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-30 21:20:34 +0200
committerGitHub <noreply@github.com>2019-07-30 21:20:34 +0200
commite84ed3c1bca2a35f8b531473dafede7a2c624d0a (patch)
tree42dbcbc54a4c2f5d0f51d6e3aba2c93ee7372a1b /docs
parent1a008958d42644aaf20e35a79463d9eea366ef55 (diff)
parent2da86bdc3a626f3aebaadbf28c5cc73f80995a78 (diff)
downloadpodman-e84ed3c1bca2a35f8b531473dafede7a2c624d0a.tar.gz
podman-e84ed3c1bca2a35f8b531473dafede7a2c624d0a.tar.bz2
podman-e84ed3c1bca2a35f8b531473dafede7a2c624d0a.zip
Merge pull request #3665 from QiWang19/env
Set -env variables as appropriate
Diffstat (limited to 'docs')
-rw-r--r--docs/podman-create.1.md17
-rw-r--r--docs/podman-run.1.md15
2 files changed, 28 insertions, 4 deletions
diff --git a/docs/podman-create.1.md b/docs/podman-create.1.md
index d796c2586..50fca3541 100644
--- a/docs/podman-create.1.md
+++ b/docs/podman-create.1.md
@@ -253,9 +253,9 @@ You need to specify multi option commands in the form of a json string.
Set environment variables
-This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container. If you specify a environment variable without a value, podman will check the host environment for a value or set the environment to "". If you specify a environment variable ending in --*--, podman will search the host environment for variables starting with the prefix and add them to the container. If you want to add an environment variable with a ***** following it, then you need to set a value.
+This option allows arbitrary environment variables that are available for the process to be launched inside of the container. If an environment variable is specified without a value, Podman will check the host environment for a value and set the variable only if it is set on the host. If an environment variable ending in __*__ is specified, Podman will search the host environment for variables starting with the prefix and will add those variables to the container. If an environment variable with a trailing ***** is specified, then a value must be supplied.
-See **Environment** note below for precedence.
+See [**Environment**](#environment) note below for precedence and examples.
**--env-host**=*true|false*
@@ -933,6 +933,19 @@ Precedence Order:
**--env** : Any environment variables specified will override previous settings.
+Create containers and set the environment ending with a __*__ and a *****
+
+```
+$ export ENV1=a
+$ podman create --name ctr --env ENV* alpine printenv ENV1
+$ podman start --attach ctr
+a
+
+$ podman create --name ctr --env ENV*****=b alpine printenv ENV*****
+$ podman start --attach ctr
+b
+```
+
## FILES
**/etc/subuid**
diff --git a/docs/podman-run.1.md b/docs/podman-run.1.md
index f5f44fad4..209a07c0c 100644
--- a/docs/podman-run.1.md
+++ b/docs/podman-run.1.md
@@ -260,9 +260,9 @@ You need to specify multi option commands in the form of a json string.
Set environment variables
-This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container. If you specify a environment variable without a value, podman will check the host environment for a value or set the environment to "". If you specify a environment variable ending in --*--, podman will search the host environment for variables starting with the prefix and add them to the container. If you want to add an environment variable with a ***** following it, then you need to set a value.
+This option allows arbitrary environment variables that are available for the process to be launched inside of the container. If an environment variable is specified without a value, Podman will check the host environment for a value and set the variable only if it is set on the host. If an environment variable ending in __*__ is specified, Podman will search the host environment for variables starting with the prefix and will add those variables to the container. If an environment variable with a trailing ***** is specified, then a value must be supplied.
-See **Environment** note below for precedence.
+See [**Environment**](#environment) note below for precedence and examples.
**--env-host**=*true|false*
@@ -1219,6 +1219,17 @@ Precedence Order:
**--env** : Any environment variables specified will override previous settings.
+Run containers and set the environment ending with a __*__ and a *****
+
+```
+$ export ENV1=a
+$ $ podman run --env ENV* alpine printenv ENV1
+a
+
+$ podman run --env ENV*****=b alpine printenv ENV*****
+b
+```
+
## FILES
**/etc/subuid**