Skip to content

Commit

Permalink
Merge pull request containers#14657 from eriksjolund/rewrite_env_docs
Browse files Browse the repository at this point in the history
[CI:DOCS] Rewrite --env docs
  • Loading branch information
openshift-ci[bot] authored Jun 19, 2022
2 parents ff06c79 + dda6820 commit 55052c6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
18 changes: 9 additions & 9 deletions docs/source/markdown/podman-create.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ You need to specify multi option commands in the form of a json string.

Set environment variables

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.
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. As a special case, if an environment variable ending in __*__ is specified without a value, Podman will search the host environment for variables starting with the prefix and will add those variables to the container.

See [**Environment**](#environment) note below for precedence and examples.

Expand Down Expand Up @@ -1603,17 +1603,17 @@ Precedence order (later entries override earlier entries):
- **--env-file** : Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
- **--env** : Any environment variables specified will override previous settings.

Create containers and set the environment ending with a __*__ and a *****
Create containers and set the environment ending with a __*__.
The trailing __*__ glob functionality is only active when no value is specified:

```
$ 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
$ podman create --name ctr1 --env 'ENV*' alpine env
$ podman start --attach ctr1 | grep ENV
ENV1=a
$ podman create --name ctr2 --env 'ENV*=b' alpine env
$ podman start --attach ctr2 | grep ENV
ENV*=b
```

## CONMON
Expand Down
7 changes: 4 additions & 3 deletions docs/source/markdown/podman-exec.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ Start the exec session, but do not attach to it. The command will run in the bac

Specify the key sequence for detaching a container. Format is a single character `[a-Z]` or one or more `ctrl-<value>` characters where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`. Specifying "" will disable this feature. The default is *ctrl-p,ctrl-q*.

#### **--env**, **-e**
#### **--env**, **-e**=*env*

You may specify arbitrary environment variables that are available for the
command to be executed.
Set environment variables.

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. As a special case, if an environment variable ending in __*__ is specified without a value, Podman will search the host environment for variables starting with the prefix and will add those variables to the container.

#### **--env-file**=*file*

Expand Down
14 changes: 7 additions & 7 deletions docs/source/markdown/podman-run.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ You need to specify multi option commands in the form of a json string.

Set environment variables.

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.
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. As a special case, if an environment variable ending in __*__ is specified without a value, Podman will search the host environment for variables starting with the prefix and will add those variables to the container.

See [**Environment**](#environment) note below for precedence and examples.

Expand Down Expand Up @@ -1982,15 +1982,15 @@ in the following order of precedence (later entries override earlier entries):
- **--env-file**: Any environment variables specified via env-files. If multiple files specified, then they override each other in order of entry.
- **--env**: Any environment variables specified will override previous settings.

Run containers and set the environment ending with a __*__ and a __*****__:
Run containers and set the environment ending with a __*__.
The trailing __*__ glob functionality is only active when no value is specified:

```
$ export ENV1=a
$ podman run --env ENV* alpine printenv ENV1
a
$ podman run --env ENV*****=b alpine printenv ENV*****
b
$ podman run --env 'ENV*' alpine env | grep ENV
ENV1=a
$ podman run --env 'ENV*=b' alpine env | grep ENV
ENV*=b
```

## CONMON
Expand Down

0 comments on commit 55052c6

Please sign in to comment.