From 27159ce6bac4308b5fba311258fab8e852667787 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Sat, 16 Nov 2013 20:15:04 +1000 Subject: [PATCH] expunge the word 'Resource' in reference to a file/dir in a CONTAINER - that way users don't wonder how its different from a Path --- api.go | 2 +- commands.go | 4 ++-- docs/sources/commandline/cli.rst | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api.go b/api.go index dbaa2ae7de..c4d0f79503 100644 --- a/api.go +++ b/api.go @@ -978,7 +978,7 @@ func postContainersCopy(srv *Server, version float64, w http.ResponseWriter, r * } if copyData.Resource == "" { - return fmt.Errorf("Resource cannot be empty") + return fmt.Errorf("Path cannot be empty") } if copyData.Resource[0] == '/' { copyData.Resource = copyData.Resource[1:] diff --git a/commands.go b/commands.go index 710a311c08..1f780925ad 100644 --- a/commands.go +++ b/commands.go @@ -1924,7 +1924,7 @@ func (cli *DockerCli) CmdRun(args ...string) error { } func (cli *DockerCli) CmdCp(args ...string) error { - cmd := Subcmd("cp", "CONTAINER:RESOURCE HOSTPATH", "Copy files/folders from the RESOURCE to the HOSTPATH") + cmd := Subcmd("cp", "CONTAINER:PATH HOSTPATH", "Copy files/folders from the PATH to the HOSTPATH") if err := cmd.Parse(args); err != nil { return nil } @@ -1938,7 +1938,7 @@ func (cli *DockerCli) CmdCp(args ...string) error { info := strings.Split(cmd.Arg(0), ":") if len(info) != 2 { - return fmt.Errorf("Error: Resource not specified") + return fmt.Errorf("Error: Path not specified") } copyData.Resource = info[1] diff --git a/docs/sources/commandline/cli.rst b/docs/sources/commandline/cli.rst index 37f371baad..91f92248ba 100644 --- a/docs/sources/commandline/cli.rst +++ b/docs/sources/commandline/cli.rst @@ -219,10 +219,15 @@ Full -run example :: - Usage: docker cp CONTAINER:RESOURCE HOSTPATH + Usage: docker cp CONTAINER:PATH HOSTPATH Copy files/folders from the containers filesystem to the host path. Paths are relative to the root of the filesystem. + +.. code-block:: bash + + $ sudo docker cp 7bb0e258aefe:/etc/debian_version . + $ sudo docker cp blue_frog:/etc/hosts . .. _cli_diff: