From 6ea2cc5e0e40facce791c510e8f167806ab94af2 Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Tue, 16 Sep 2014 09:58:20 -0700 Subject: [PATCH] Add support for copy/add with multiple src files Part one of solution for issue #6820 Signed-off-by: Doug Davis --- docs/sources/reference/builder.md | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/docs/sources/reference/builder.md b/docs/sources/reference/builder.md index 4b16e0365c..1f5bd4dada 100644 --- a/docs/sources/reference/builder.md +++ b/docs/sources/reference/builder.md @@ -284,13 +284,15 @@ change them using `docker run --env =`. ## ADD - ADD + ADD ... -The `ADD` instruction will copy new files from `` and add them to the -container's filesystem at path ``. +The `ADD` instruction copies new files,directories or remote file URLs to +the filesystem of the container from `` and add them to the at +path ``. -`` must be the path to a file or directory relative to the source directory -being built (also called the *context* of the build) or a remote file URL. +Multiple resource may be specified but if they are files or +directories then they must be relative to the source directory that is +being built (the context of the build). `` is the absolute path to which the source will be copied inside the destination container. @@ -353,6 +355,9 @@ The copy obeys the following rules: will be considered a directory and the contents of `` will be written at `/base()`. +- If multiple `` resources are specified then `` must be a + directory, and it must end with a slash `/`. + - If `` does not end with a trailing slash, it will be considered a regular file and the contents of `` will be written at ``. @@ -361,13 +366,15 @@ The copy obeys the following rules: ## COPY - COPY + COPY ... -The `COPY` instruction will copy new files from `` and add them to the -container's filesystem at path ``. +The `COPY` instruction copies new files,directories or remote file URLs to +the filesystem of the container from `` and add them to the at +path ``. -`` must be the path to a file or directory relative to the source directory -being built (also called the *context* of the build). +Multiple resource may be specified but if they are files or +directories then they must be relative to the source directory that is being +built (the context of the build). `` is the absolute path to which the source will be copied inside the destination container. @@ -393,6 +400,9 @@ The copy obeys the following rules: will be considered a directory and the contents of `` will be written at `/base()`. +- If multiple `` resources are specified then `` must be a + directory, and it must end with a slash `/`. + - If `` does not end with a trailing slash, it will be considered a regular file and the contents of `` will be written at ``.