mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #2681 from SvenDowideit/add-instruction-path-limitations
add a little more info about the limitations of ADD wrt ../ and docker build
This commit is contained in:
commit
077c2496ed
1 changed files with 8 additions and 0 deletions
|
@ -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 ``<src>`` 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 ``<src>`` is a URL and ``<dest>`` does not end with a trailing slash,
|
||||
then a file is downloaded from the URL and copied to ``<dest>``.
|
||||
* If ``<src>`` is a URL and ``<dest>`` does end with a trailing slash,
|
||||
|
|
Loading…
Reference in a new issue