Skip to content

Commit 4f55001

Browse files
authored
Merge pull request #814 from dnephin/fix-builder-env-docs
Improve builder ENV docs
2 parents fab4762 + 01b521c commit 4f55001

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/reference/builder.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -805,14 +805,15 @@ see the
805805
ENV <key>=<value> ...
806806

807807
The `ENV` instruction sets the environment variable `<key>` to the value
808-
`<value>`. This value will be in the environment of all "descendant"
809-
`Dockerfile` commands and can be [replaced inline](#environment-replacement) in
808+
`<value>`. This value will be in the environment for all subsequent instructions
809+
in the build stage and can be [replaced inline](#environment-replacement) in
810810
many as well.
811811

812812
The `ENV` instruction has two forms. The first form, `ENV <key> <value>`,
813813
will set a single variable to a value. The entire string after the first
814-
space will be treated as the `<value>` - including characters such as
815-
spaces and quotes.
814+
space will be treated as the `<value>` - including whitespace characters. The
815+
value will be interpreted for other environment variables, so quote characters
816+
will be removed if they are not escaped.
816817

817818
The second form, `ENV <key>=<value> ...`, allows for multiple variables to
818819
be set at one time. Notice that the second form uses the equals sign (=)
@@ -830,8 +831,7 @@ and
830831
ENV myDog Rex The Dog
831832
ENV myCat fluffy
832833

833-
will yield the same net results in the final image, but the first form
834-
is preferred because it produces a single cache layer.
834+
will yield the same net results in the final image.
835835

836836
The environment variables set using `ENV` will persist when a container is run
837837
from the resulting image. You can view the values using `docker inspect`, and

0 commit comments

Comments
 (0)