From af0b2e38c3b2688cd4c2e831847bf4601d8fc149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A8Sven?= <¨SvenDowideit@home.org.au¨> Date: Wed, 13 Nov 2013 22:55:55 +1000 Subject: [PATCH] add a little more info about the limitations of ADD wrt ../ and docker build - --- docs/sources/use/builder.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/sources/use/builder.rst b/docs/sources/use/builder.rst index e48f3f2a48..18c52ec09f 100644 --- a/docs/sources/use/builder.rst +++ b/docs/sources/use/builder.rst @@ -221,8 +221,16 @@ destination container. All new files and directories are created with mode 0755, uid and gid 0. +.. note:: + if you build using STDIN (``docker build - < somefile``), there is no build + context, so the Dockerfile cannot contain an ADD statement. + The copy obeys the following rules: +* The ```` path must be inside the *context* of the build; you cannot + ``ADD ../something /something``, because the first step of a + ``docker build`` is to send the context directory (and subdirectories) to + the docker daemon. * If ```` is a URL and ```` does not end with a trailing slash, then a file is downloaded from the URL and copied to ````. * If ```` is a URL and ```` does end with a trailing slash,