From 39d8bc547c934565309a58cdf50ee7476ddab085 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Wed, 28 Jan 2015 18:28:48 -0800 Subject: [PATCH] Fix some escaping around env var processing Clarify in the docs that ENV is not recursive Closes #10391 Signed-off-by: Doug Davis Upstream-commit: f32b6eb23cb9e10301ecee673de2c52ac6d6b146 Component: cli --- components/cli/docs/sources/reference/builder.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/components/cli/docs/sources/reference/builder.md b/components/cli/docs/sources/reference/builder.md index 6955d31e0e..9e56abf639 100644 --- a/components/cli/docs/sources/reference/builder.md +++ b/components/cli/docs/sources/reference/builder.md @@ -146,6 +146,17 @@ The instructions that handle environment variables in the `Dockerfile` are: `ONBUILD` instructions are **NOT** supported for environment replacement, even the instructions above. +Environment variable subtitution will use the same value for each variable +throughout the entire command. In other words, in this example: + + ENV abc=hello + ENV abc=bye def=$abc + ENV ghi=$abc + +will result in `def` having a value of `hello`, not `bye`. However, +`ghi` will have a value of `bye` because it is not part of the same command +that set `abc` to `bye`. + ## The `.dockerignore` file If a file named `.dockerignore` exists in the source repository, then it