mirror of https://github.com/docker/cli.git
Clarify --env-file usage with names without values
Signed-off-by: Denis Defreyne <denis@soundcloud.com>
This commit is contained in:
parent
542af38ce5
commit
d24201d734
|
@ -393,17 +393,20 @@ If no `=` is provided and that variable is not exported in your local
|
||||||
environment, the variable won't be set in the container.
|
environment, the variable won't be set in the container.
|
||||||
|
|
||||||
You can also load the environment variables from a file. This file should use
|
You can also load the environment variables from a file. This file should use
|
||||||
the syntax `<variable>= value`, and `#` for comments.
|
the syntax `<variable>=value` (which sets the variable to the given value) or
|
||||||
|
`<variable>` (which takes the value from the local environment), and `#` for comments.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cat env.list
|
$ cat env.list
|
||||||
# This is a comment
|
# This is a comment
|
||||||
VAR1=value1
|
VAR1=value1
|
||||||
VAR2=value2
|
VAR2=value2
|
||||||
|
USER
|
||||||
|
|
||||||
$ docker run --env-file env.list ubuntu env | grep VAR
|
$ docker run --env-file env.list ubuntu env | grep VAR
|
||||||
VAR1=value1
|
VAR1=value1
|
||||||
VAR2=value2
|
VAR2=value2
|
||||||
|
USER=denis
|
||||||
```
|
```
|
||||||
|
|
||||||
### Set metadata on container (-l, --label, --label-file)
|
### Set metadata on container (-l, --label, --label-file)
|
||||||
|
|
Loading…
Reference in New Issue