From ebe0a489a5cc66406345f1aafa0f2f866fd64172 Mon Sep 17 00:00:00 2001 From: Denis Defreyne Date: Thu, 27 Apr 2017 11:12:48 +0200 Subject: [PATCH] Clarify --env-file usage with names without values Signed-off-by: Denis Defreyne --- docs/reference/commandline/run.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference/commandline/run.md b/docs/reference/commandline/run.md index 7b7702bd30..ecb676dc20 100644 --- a/docs/reference/commandline/run.md +++ b/docs/reference/commandline/run.md @@ -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. You can also load the environment variables from a file. This file should use -the syntax `= value`, and `#` for comments. +the syntax `=value` (which sets the variable to the given value) or +`` (which takes the value from the local environment), and `#` for comments. ```bash $ cat env.list # This is a comment VAR1=value1 VAR2=value2 +USER $ docker run --env-file env.list ubuntu env | grep VAR VAR1=value1 VAR2=value2 +USER=denis ``` ### Set metadata on container (-l, --label, --label-file)