Merge pull request #10431 from duglin/Issue10391
Clarify ENV non-recursivenes w.r.t. env var substitution + fix escaping Upstream-commit: 61966d281bb715a2359b27bcd30d0d59c98d2812 Component: engine
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user