diff --git a/docs/reference/builder.md b/docs/reference/builder.md index e23ede533b0e07849ac008d51c281dc53ae338a1..062c4793feed5df99061a9bd0c7fdea0d5f7d815 100644 --- a/docs/reference/builder.md +++ b/docs/reference/builder.md @@ -152,18 +152,24 @@ Example (parsed representation is displayed after the `#`): ADD . $foo # ADD . /bar COPY \$foo /quux # COPY $foo /quux -The instructions that handle environment variables in the `Dockerfile` are: +Environment variables are supported by the following list of instructions in +the `Dockerfile`: -* `ENV` * `ADD` * `COPY` -* `WORKDIR` +* `ENV` * `EXPOSE` -* `VOLUME` * `USER` +* `WORKDIR` +* `VOLUME` + +as well as: -`ONBUILD` instructions are **NOT** supported for environment replacement, even -the instructions above. +* `ONBUILD` (when combined with one of the supported instructions above) + +> **Note**: +> prior to 1.4, `ONBUILD` instructions did **NOT** support environment +> variable, even when combined with any of the instructions listed above. Environment variable substitution will use the same value for each variable throughout the entire command. In other words, in this example: