瀏覽代碼

Adds clarification to behavior of missing directories.

Closes #20920

Signed-off-by: Micah Zoltu <micah@zoltu.net>
Micah Zoltu 9 年之前
父節點
當前提交
889d06178a
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      docs/reference/commandline/cp.md
  2. 2 1
      man/docker-cp.1.md

+ 2 - 1
docs/reference/commandline/cp.md

@@ -39,7 +39,8 @@ the user and primary group at the destination. For example, files copied to a
 container are created with `UID:GID` of the root user. Files copied to the local
 container are created with `UID:GID` of the root user. Files copied to the local
 machine are created with the `UID:GID` of the user which invoked the `docker cp`
 machine are created with the `UID:GID` of the user which invoked the `docker cp`
 command.  If you specify the `-L` option, `docker cp` follows any symbolic link
 command.  If you specify the `-L` option, `docker cp` follows any symbolic link
-in the `SRC_PATH`.
+in the `SRC_PATH`.  `docker cp` does *not* create parent directories for
+`DEST_PATH` if they do not exist.
 
 
 Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
 Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
 argument of `DEST_PATH`, the behavior is as follows:
 argument of `DEST_PATH`, the behavior is as follows:

+ 2 - 1
man/docker-cp.1.md

@@ -36,7 +36,8 @@ the user and primary group at the destination. For example, files copied to a
 container are created with `UID:GID` of the root user. Files copied to the local
 container are created with `UID:GID` of the root user. Files copied to the local
 machine are created with the `UID:GID` of the user which invoked the `docker cp`
 machine are created with the `UID:GID` of the user which invoked the `docker cp`
 command.  If you specify the `-L` option, `docker cp` follows any symbolic link
 command.  If you specify the `-L` option, `docker cp` follows any symbolic link
-in the `SRC_PATH`.
+in the `SRC_PATH`. `docker cp` does *not* create parent directories for
+`DEST_PATH` if they do not exist.
 
 
 Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
 Assuming a path separator of `/`, a first argument of `SRC_PATH` and second
 argument of `DEST_PATH`, the behavior is as follows:
 argument of `DEST_PATH`, the behavior is as follows: