Add cp command and copy api endpoint

The cp command and copy api endpoint allows users
to copy files and or folders from a containers filesystem.

Closes #382
This commit is contained in:
Michael Crosby
2013-08-06 16:09:54 +00:00
parent 0dbc51f4d2
commit 5b8cfbe15c
10 changed files with 202 additions and 1 deletions
+32 -1
View File
@@ -525,6 +525,38 @@ Remove a container
:statuscode 500: server error
Copy files or folders from a container
**************************************
.. http:post:: /containers/(id)/copy
Copy files or folders of container ``id``
**Example request**:
.. sourcecode:: http
POST /containers/4fa6e0f0c678/copy HTTP/1.1
Content-Type: application/json
{
"Resource":"test.txt"
}
**Example response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Content-Type: application/octet-stream
{{ STREAM }}
:statuscode 200: no error
:statuscode 404: no such container
:statuscode 500: server error
2.2 Images
----------
@@ -1091,7 +1123,6 @@ Monitor Docker's events
:statuscode 200: no error
:statuscode 500: server error
3. Going further
================