Browse code

Merge pull request #14735 from charleswhchan/patch-1

Minor edits to Environment variables section

Jessie Frazelle authored on 2015/07/28 02:37:39
Showing 1 changed files
... ...
@@ -152,18 +152,24 @@ Example (parsed representation is displayed after the `#`):
152 152
     ADD . $foo       # ADD . /bar
153 153
     COPY \$foo /quux # COPY $foo /quux
154 154
 
155
-The instructions that handle environment variables in the `Dockerfile` are:
155
+Environment variables are supported by the following list of instructions in 
156
+the `Dockerfile`:
156 157
 
157
-* `ENV`
158 158
 * `ADD`
159 159
 * `COPY`
160
-* `WORKDIR`
160
+* `ENV`
161 161
 * `EXPOSE`
162
-* `VOLUME`
163 162
 * `USER`
163
+* `WORKDIR`
164
+* `VOLUME`
165
+
166
+as well as:
164 167
 
165
-`ONBUILD` instructions are **NOT** supported for environment replacement, even
166
-the instructions above.
168
+* `ONBUILD` (when combined with one of the supported instructions above)
169
+
170
+> **Note**:
171
+> prior to 1.4, `ONBUILD` instructions did **NOT** support environment 
172
+> variable, even when combined with any of the instructions listed above.
167 173
 
168 174
 Environment variable substitution will use the same value for each variable
169 175
 throughout the entire command.  In other words, in this example: