mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #9191 from duglin/Issue8775
Be clearer in docs about COPY/ADD dirs
This commit is contained in:
commit
3e5cb0c84f
1 changed files with 8 additions and 4 deletions
|
@ -420,8 +420,10 @@ The copy obeys the following rules:
|
||||||
appropriate filename can be discovered in this case (`http://example.com`
|
appropriate filename can be discovered in this case (`http://example.com`
|
||||||
will not work).
|
will not work).
|
||||||
|
|
||||||
- If `<src>` is a directory, the entire directory is copied, including
|
- If `<src>` is a directory, the entire contents of the directory are copied,
|
||||||
filesystem metadata.
|
including filesystem metadata.
|
||||||
|
> **Note**:
|
||||||
|
> The directory itself is not copied, just its contents.
|
||||||
|
|
||||||
- If `<src>` is a *local* tar archive in a recognized compression format
|
- If `<src>` is a *local* tar archive in a recognized compression format
|
||||||
(identity, gzip, bzip2 or xz) then it is unpacked as a directory. Resources
|
(identity, gzip, bzip2 or xz) then it is unpacked as a directory. Resources
|
||||||
|
@ -480,8 +482,10 @@ The copy obeys the following rules:
|
||||||
`docker build` is to send the context directory (and subdirectories) to the
|
`docker build` is to send the context directory (and subdirectories) to the
|
||||||
docker daemon.
|
docker daemon.
|
||||||
|
|
||||||
- If `<src>` is a directory, the entire directory is copied, including
|
- If `<src>` is a directory, the entire contents of the directory are copied,
|
||||||
filesystem metadata.
|
including filesystem metadata.
|
||||||
|
> **Note**:
|
||||||
|
> The directory itself is not copied, just its contents.
|
||||||
|
|
||||||
- If `<src>` is any other kind of file, it is copied individually along with
|
- If `<src>` is any other kind of file, it is copied individually along with
|
||||||
its metadata. In this case, if `<dest>` ends with a trailing slash `/`, it
|
its metadata. In this case, if `<dest>` ends with a trailing slash `/`, it
|
||||||
|
|
Loading…
Reference in a new issue