Merge pull request #14735 from charleswhchan/patch-1
Minor edits to Environment variables section
This commit is contained in:
commit
f3af9c8bdb
1 changed files with 12 additions and 6 deletions
|
@ -152,18 +152,24 @@ Example (parsed representation is displayed after the `#`):
|
||||||
ADD . $foo # ADD . /bar
|
ADD . $foo # ADD . /bar
|
||||||
COPY \$foo /quux # COPY $foo /quux
|
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`
|
* `ADD`
|
||||||
* `COPY`
|
* `COPY`
|
||||||
* `WORKDIR`
|
* `ENV`
|
||||||
* `EXPOSE`
|
* `EXPOSE`
|
||||||
* `VOLUME`
|
|
||||||
* `USER`
|
* `USER`
|
||||||
|
* `WORKDIR`
|
||||||
|
* `VOLUME`
|
||||||
|
|
||||||
`ONBUILD` instructions are **NOT** supported for environment replacement, even
|
as well as:
|
||||||
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
|
Environment variable substitution will use the same value for each variable
|
||||||
throughout the entire command. In other words, in this example:
|
throughout the entire command. In other words, in this example:
|
||||||
|
|
Loading…
Add table
Reference in a new issue