Browse code

add a little more info about the limitations of ADD wrt ../ and docker build -

¨Sven authored on 2013/11/13 21:55:55
Showing 1 changed files
... ...
@@ -221,8 +221,16 @@ destination container.
221 221
 All new files and directories are created with mode 0755, uid and gid
222 222
 0.
223 223
 
224
+.. note::
225
+   if you build using STDIN (``docker build - < somefile``), there is no build 
226
+   context, so the Dockerfile cannot contain an ADD statement.
227
+
224 228
 The copy obeys the following rules:
225 229
 
230
+* The ``<src>`` path must be inside the *context* of the build; you cannot 
231
+  ``ADD ../something /something``, because the first step of a 
232
+  ``docker build`` is to send the context directory (and subdirectories) to 
233
+  the docker daemon.
226 234
 * If ``<src>`` is a URL and ``<dest>`` does not end with a trailing slash,
227 235
   then a file is downloaded from the URL and copied to ``<dest>``.
228 236
 * If ``<src>`` is a URL and ``<dest>`` does end with a trailing slash,