From da3b6648fd0bf092a6bc93944211b1ed59489ae9 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Sun, 16 Nov 2014 05:13:14 -0800 Subject: [PATCH] Be clearer in docs about COPY/ADD dirs COPY/ADD just copies the contents of dirs, not dirs themselves. This PR tries to clear that up in the docs. Closes #8775 Signed-off-by: Doug Davis --- docs/sources/reference/builder.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index 19cc16ad..198e81cf 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -420,8 +420,10 @@ The copy obeys the following rules: appropriate filename can be discovered in this case (`http://example.com` will not work). -- If `` is a directory, the entire directory is copied, including - filesystem metadata. +- If `` is a directory, the entire contents of the directory are copied, + including filesystem metadata. +> **Note**: +> The directory itself is not copied, just its contents. - If `` is a *local* tar archive in a recognized compression format (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 daemon. -- If `` is a directory, the entire directory is copied, including - filesystem metadata. +- If `` is a directory, the entire contents of the directory are copied, + including filesystem metadata. +> **Note**: +> The directory itself is not copied, just its contents. - If `` is any other kind of file, it is copied individually along with its metadata. In this case, if `` ends with a trailing slash `/`, it