1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #6835 from OddBloke/master

Explain ADD invalidation more accurately
This commit is contained in:
James Turnbull 2014-07-08 20:41:59 -04:00
commit 037a869919

View file

@ -169,9 +169,8 @@ will be reused during the next build.
The cache for `RUN` instructions can be invalidated by using the `--no-cache` The cache for `RUN` instructions can be invalidated by using the `--no-cache`
flag, for example `docker build --no-cache`. flag, for example `docker build --no-cache`.
The first encountered `ADD` instruction will invalidate the cache for all The cache for `RUN` instructions can be invalidated by `ADD` instructions. See
following instructions from the 'Dockerfile' if the contents of the context [below](#add) for details.
have changed. This will also invalidate the cache for `RUN` instructions.
### Known Issues (RUN) ### Known Issues (RUN)
@ -285,6 +284,11 @@ In the case where `<src>` is a remote file URL, the destination will have permis
> or use another tool from within the container as ADD does not support > or use another tool from within the container as ADD does not support
> authentication. > authentication.
> **Note**:
> The first encountered `ADD` instruction will invalidate the cache for all
> following instructions from the Dockerfile if the contents of `<src>` have
> changed. This includes invalidating the cache for `RUN` instructions.
The copy obeys the following rules: The copy obeys the following rules:
- The `<src>` path must be inside the *context* of the build; - The `<src>` path must be inside the *context* of the build;