Clarify behavior of docker cp

The STDOUT behavior of cp is not yet released in 1.50 so removed.
Also, tested against 1.5 all other behaviors and extended documentation to match.
Renamed HOSTPATH to HOSTDIR to give a self documenting name.

Adding back in the references to STDOUT
fix the command string
Entering Doug's comment re append and ~/tmp/foo in the glass
Adding in Doug's comments regarding PATHs and missing |-
Updating with James comments

Signed-off-by: Mary Anthony <mary@docker.com>
This commit is contained in:
Mary Anthony 2015-03-10 18:40:20 -07:00 committed by Tibor Vass
parent e2b5fc47e3
commit f1cb33631f
1 changed files with 5 additions and 6 deletions

View File

@ -779,14 +779,13 @@ Supported `Dockerfile` instructions: `ADD`|`CMD`|`ENTRYPOINT`|`ENV`|`EXPOSE`|`FR
## cp
Copy files/folders from a container's filesystem to the
path. Use '-' to write the data as a tar file to STDOUT.
Paths are relative to the root of the filesystem.
Copy files or folders from a container's filesystem to the directory on the
host. Use '-' to write the data as a tar file to `STDOUT`. `CONTAINER:PATH` is
relative to the root of the container's filesystem.
Usage: docker cp CONTAINER:PATH HOSTPATH|-
Usage: docker cp CONTAINER:PATH HOSTDIR|-
Copy files/folders from the PATH to the HOSTPATH. Use '-' to write the data
as a tar file to STDOUT.
Copy files/folders from the PATH to the HOSTDIR.
## create