Browse code

Merge pull request #6835 from OddBloke/master

Explain ADD invalidation more accurately

James Turnbull authored on 2014/07/09 09:41:59
Showing 1 changed files
... ...
@@ -169,9 +169,8 @@ will be reused during the next build.
169 169
 The cache for `RUN` instructions can be invalidated by using the `--no-cache`
170 170
 flag, for example `docker build --no-cache`.
171 171
 
172
-The first encountered `ADD` instruction will invalidate the cache for all
173
-following instructions from the 'Dockerfile' if the contents of the context
174
-have changed. This will also invalidate the cache for `RUN` instructions.
172
+The cache for `RUN` instructions can be invalidated by `ADD` instructions. See
173
+[below](#add) for details.
175 174
 
176 175
 ### Known Issues (RUN)
177 176
 
... ...
@@ -285,6 +284,11 @@ In the case where `<src>` is a remote file URL, the destination will have permis
285 285
 > or use another tool from within the container as ADD does not support
286 286
 > authentication.
287 287
 
288
+> **Note**:
289
+> The first encountered `ADD` instruction will invalidate the cache for all
290
+> following instructions from the Dockerfile if the contents of `<src>` have
291
+> changed. This includes invalidating the cache for `RUN` instructions.
292
+
288 293
 The copy obeys the following rules:
289 294
 
290 295
 - The `<src>` path must be inside the *context* of the build;