Browse code

Clarify --env-file usage with names without values

Signed-off-by: Denis Defreyne <denis@soundcloud.com>

Denis Defreyne authored on 2017/04/27 18:12:48
Showing 1 changed files
... ...
@@ -393,17 +393,20 @@ If no `=` is provided and that variable is not exported in your local
393 393
 environment, the variable won't be set in the container.
394 394
 
395 395
 You can also load the environment variables from a file. This file should use
396
-the syntax `<variable>= value`, and `#` for comments.
396
+the syntax `<variable>=value` (which sets the variable to the given value) or
397
+`<variable>` (which takes the value from the local environment), and `#` for comments.
397 398
 
398 399
 ```bash
399 400
 $ cat env.list
400 401
 # This is a comment
401 402
 VAR1=value1
402 403
 VAR2=value2
404
+USER
403 405
 
404 406
 $ docker run --env-file env.list ubuntu env | grep VAR
405 407
 VAR1=value1
406 408
 VAR2=value2
409
+USER=denis
407 410
 ```
408 411
 
409 412
 ### Set metadata on container (-l, --label, --label-file)