add new endpoints for docker cp

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2015-07-18 22:04:56 -07:00
parent bcc28f658d
commit 5a217d6169
1 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,9 @@ type context struct {
type handler func(c *context, w http.ResponseWriter, r *http.Request)
var routes = map[string]map[string]handler{
"HEAD": {
"/containers/{name:.*}/archive": proxyContainer,
},
"GET": {
"/_ping": ping,
"/events": getEvents,
@ -35,6 +38,7 @@ var routes = map[string]map[string]handler{
"/images/{name:.*}/json": proxyImage,
"/containers/ps": getContainersJSON,
"/containers/json": getContainersJSON,
"/containers/{name:.*}/archive": proxyContainer,
"/containers/{name:.*}/export": proxyContainer,
"/containers/{name:.*}/changes": proxyContainer,
"/containers/{name:.*}/json": getContainerJSON,
@ -68,6 +72,9 @@ var routes = map[string]map[string]handler{
"/exec/{execid:.*}/start": proxyHijack,
"/exec/{execid:.*}/resize": proxyContainer,
},
"PUT": {
"/containers/{name:.*}/archive": proxyContainer,
},
"DELETE": {
"/containers/{name:.*}": deleteContainers,
"/images/{name:.*}": deleteImages,