mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 07:48:44 +00:00
Merge pull request #10145 from duglin/Issue10141
Docker run -e FOO should erase FOO if FOO isn't set in client env
This commit is contained in:
@@ -1736,9 +1736,12 @@ ports in Docker.
|
||||
|
||||
This sets environmental variables in the container. For illustration all three
|
||||
flags are shown here. Where `-e`, `--env` take an environment variable and
|
||||
value, or if no "=" is provided, then that variable's current value is passed
|
||||
through (i.e. `$MYVAR1` from the host is set to `$MYVAR1` in the container). All
|
||||
three flags, `-e`, `--env` and `--env-file` can be repeated.
|
||||
value, or if no `=` is provided, then that variable's current value is passed
|
||||
through (i.e. `$MYVAR1` from the host is set to `$MYVAR1` in the container).
|
||||
When no `=` is provided and that variable is not defined in the client's
|
||||
environment then that variable will be removed from the container's list of
|
||||
environment variables.
|
||||
All three flags, `-e`, `--env` and `--env-file` can be repeated.
|
||||
|
||||
Regardless of the order of these three flags, the `--env-file` are processed
|
||||
first, and then `-e`, `--env` flags. This way, the `-e` or `--env` will
|
||||
|
||||
Reference in New Issue
Block a user