mirror of https://github.com/docker/cli.git
Explain ADD invalidation more accurately
And also move it in to the `ADD` section, rather than being hidden in the `RUN` section. Docker-DCO-1.1-Signed-off-by: Daniel Watkins <daniel@daniel-watkins.co.uk> (github: OddBloke)
This commit is contained in:
parent
8c2470323d
commit
383db402ca
|
@ -169,9 +169,8 @@ will be reused during the next build.
|
|||
The cache for `RUN` instructions can be invalidated by using the `--no-cache`
|
||||
flag, for example `docker build --no-cache`.
|
||||
|
||||
The first encountered `ADD` instruction will invalidate the cache for all
|
||||
following instructions from the 'Dockerfile' if the contents of the context
|
||||
have changed. This will also invalidate the cache for `RUN` instructions.
|
||||
The cache for `RUN` instructions can be invalidated by `ADD` instructions. See
|
||||
[below](#add) for details.
|
||||
|
||||
### 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
|
||||
> 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 `<src>` path must be inside the *context* of the build;
|
||||
|
|
Loading…
Reference in New Issue