1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #2470 from metalivedev/2369-docuncompress

Documenting decompression behavior.
This commit is contained in:
Victor Vieux 2013-10-30 19:14:51 -07:00
commit c1c65f972a

View file

@ -208,6 +208,9 @@ a remote file URL.
``<dest>`` is the path at which the source will be copied in the ``<dest>`` is the path at which the source will be copied in the
destination container. destination container.
All new files and directories are created with mode 0755, uid and gid
0.
The copy obeys the following rules: The copy obeys the following rules:
* If ``<src>`` is a URL and ``<dest>`` does not end with a trailing slash, * If ``<src>`` is a URL and ``<dest>`` does not end with a trailing slash,
@ -220,8 +223,9 @@ The copy obeys the following rules:
(``http://example.com`` will not work). (``http://example.com`` will not work).
* If ``<src>`` is a directory, the entire directory is copied, * If ``<src>`` is a directory, the entire directory is copied,
including filesystem metadata. including filesystem metadata.
* If ``<src>`` is a tar archive in a recognized compression format * If ``<src>`` is a *local* tar archive in a recognized compression
(identity, gzip, bzip2 or xz), it is unpacked as a directory. format (identity, gzip, bzip2 or xz) then it is unpacked as a
directory. Resources from *remote* URLs are **not** decompressed.
When a directory is copied or unpacked, it has the same behavior as When a directory is copied or unpacked, it has the same behavior as
``tar -x``: the result is the union of ``tar -x``: the result is the union of
@ -229,7 +233,7 @@ The copy obeys the following rules:
1. whatever existed at the destination path and 1. whatever existed at the destination path and
2. the contents of the source tree, 2. the contents of the source tree,
with conflicts resolved in favor of 2) on a file-by-file basis. with conflicts resolved in favor of "2." on a file-by-file basis.
* If ``<src>`` is any other kind of file, it is copied individually * If ``<src>`` is any other kind of file, it is copied individually
along with its metadata. In this case, if ``<dest>`` ends with a along with its metadata. In this case, if ``<dest>`` ends with a
@ -237,10 +241,9 @@ The copy obeys the following rules:
contents of ``<src>`` will be written at ``<dest>/base(<src>)``. contents of ``<src>`` will be written at ``<dest>/base(<src>)``.
* If ``<dest>`` does not end with a trailing slash, it will be * If ``<dest>`` does not end with a trailing slash, it will be
considered a regular file and the contents of ``<src>`` will be considered a regular file and the contents of ``<src>`` will be
written at ``<dst>``. written at ``<dest>``.
* If ``<dest>`` doesn't exist, it is created along with all missing * If ``<dest>`` doesn't exist, it is created along with all missing
directories in its path. All new files and directories are created directories in its path.
with mode 0755, uid and gid 0.
.. _entrypoint_def: .. _entrypoint_def: