File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -805,14 +805,15 @@ see the
805805 ENV <key>=<value> ...
806806
807807The ` 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
810810many as well.
811811
812812The ` ENV ` instruction has two forms. The first form, ` ENV <key> <value> ` ,
813813will 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
817818The second form, ` ENV <key>=<value> ... ` , allows for multiple variables to
818819be set at one time. Notice that the second form uses the equals sign (=)
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
836836The environment variables set using ` ENV ` will persist when a container is run
837837from the resulting image. You can view the values using ` docker inspect ` , and
You can’t perform that action at this time.
0 commit comments