| ... | ... |
@@ -28,543 +28,525 @@ List containers |
| 28 | 28 |
|
| 29 | 29 |
.. http:get:: /containers/json |
| 30 | 30 |
|
| 31 |
- List containers |
|
| 32 |
- |
|
| 33 |
- **Example request**: |
|
| 34 |
- |
|
| 35 |
- .. sourcecode:: http |
|
| 36 |
- |
|
| 37 |
- GET /containers/json?all=1&before=8dfafdbc3a40&size=1 HTTP/1.1 |
|
| 38 |
- |
|
| 39 |
- **Example response**: |
|
| 40 |
- |
|
| 41 |
- .. sourcecode:: http |
|
| 42 |
- |
|
| 43 |
- HTTP/1.1 200 OK |
|
| 44 |
- Content-Type: application/json |
|
| 45 |
- |
|
| 46 |
- [ |
|
| 47 |
- {
|
|
| 48 |
- "Id": "8dfafdbc3a40", |
|
| 49 |
- "Image": "ubuntu:latest", |
|
| 50 |
- "Command": "echo 1", |
|
| 51 |
- "Created": 1367854155, |
|
| 52 |
- "Status": "Exit 0", |
|
| 53 |
- "Ports":[{"PrivatePort": 2222, "PublicPort": 3333, "Type": "tcp"}],
|
|
| 54 |
- "SizeRw":12288, |
|
| 55 |
- "SizeRootFs":0 |
|
| 56 |
- }, |
|
| 57 |
- {
|
|
| 58 |
- "Id": "9cd87474be90", |
|
| 59 |
- "Image": "ubuntu:latest", |
|
| 60 |
- "Command": "echo 222222", |
|
| 61 |
- "Created": 1367854155, |
|
| 62 |
- "Status": "Exit 0", |
|
| 63 |
- "Ports":[], |
|
| 64 |
- "SizeRw":12288, |
|
| 65 |
- "SizeRootFs":0 |
|
| 66 |
- }, |
|
| 67 |
- {
|
|
| 68 |
- "Id": "3176a2479c92", |
|
| 69 |
- "Image": "centos:latest", |
|
| 70 |
- "Command": "echo 3333333333333333", |
|
| 71 |
- "Created": 1367854154, |
|
| 72 |
- "Status": "Exit 0", |
|
| 73 |
- "Ports":[], |
|
| 74 |
- "SizeRw":12288, |
|
| 75 |
- "SizeRootFs":0 |
|
| 76 |
- }, |
|
| 77 |
- {
|
|
| 78 |
- "Id": "4cb07b47f9fb", |
|
| 79 |
- "Image": "fedora:latest", |
|
| 80 |
- "Command": "echo 444444444444444444444444444444444", |
|
| 81 |
- "Created": 1367854152, |
|
| 82 |
- "Status": "Exit 0", |
|
| 83 |
- "Ports":[], |
|
| 84 |
- "SizeRw":12288, |
|
| 85 |
- "SizeRootFs":0 |
|
| 86 |
- } |
|
| 87 |
- ] |
|
| 88 |
- |
|
| 89 |
- :query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default |
|
| 90 |
- :query limit: Show ``limit`` last created containers, include non-running ones. |
|
| 91 |
- :query since: Show only containers created since Id, include non-running ones. |
|
| 92 |
- :query before: Show only containers created before Id, include non-running ones. |
|
| 93 |
- :query size: 1/True/true or 0/False/false, Show the containers sizes |
|
| 94 |
- :statuscode 200: no error |
|
| 95 |
- :statuscode 400: bad parameter |
|
| 96 |
- :statuscode 500: server error |
|
| 31 |
+ List containers |
|
| 97 | 32 |
|
| 33 |
+ **Example request**: |
|
| 34 |
+ |
|
| 35 |
+ .. sourcecode:: http |
|
| 36 |
+ |
|
| 37 |
+ GET /containers/json?all=1&before=8dfafdbc3a40&size=1 HTTP/1.1 |
|
| 38 |
+ |
|
| 39 |
+ **Example response**: |
|
| 40 |
+ |
|
| 41 |
+ .. sourcecode:: http |
|
| 42 |
+ |
|
| 43 |
+ HTTP/1.1 200 OK |
|
| 44 |
+ Content-Type: application/json |
|
| 45 |
+ |
|
| 46 |
+ [ |
|
| 47 |
+ {
|
|
| 48 |
+ "Id": "8dfafdbc3a40", |
|
| 49 |
+ "Image": "ubuntu:latest", |
|
| 50 |
+ "Command": "echo 1", |
|
| 51 |
+ "Created": 1367854155, |
|
| 52 |
+ "Status": "Exit 0", |
|
| 53 |
+ "Ports":[{"PrivatePort": 2222, "PublicPort": 3333, "Type": "tcp"}],
|
|
| 54 |
+ "SizeRw":12288, |
|
| 55 |
+ "SizeRootFs":0 |
|
| 56 |
+ }, |
|
| 57 |
+ {
|
|
| 58 |
+ "Id": "9cd87474be90", |
|
| 59 |
+ "Image": "ubuntu:latest", |
|
| 60 |
+ "Command": "echo 222222", |
|
| 61 |
+ "Created": 1367854155, |
|
| 62 |
+ "Status": "Exit 0", |
|
| 63 |
+ "Ports":[], |
|
| 64 |
+ "SizeRw":12288, |
|
| 65 |
+ "SizeRootFs":0 |
|
| 66 |
+ }, |
|
| 67 |
+ {
|
|
| 68 |
+ "Id": "3176a2479c92", |
|
| 69 |
+ "Image": "centos:latest", |
|
| 70 |
+ "Command": "echo 3333333333333333", |
|
| 71 |
+ "Created": 1367854154, |
|
| 72 |
+ "Status": "Exit 0", |
|
| 73 |
+ "Ports":[], |
|
| 74 |
+ "SizeRw":12288, |
|
| 75 |
+ "SizeRootFs":0 |
|
| 76 |
+ }, |
|
| 77 |
+ {
|
|
| 78 |
+ "Id": "4cb07b47f9fb", |
|
| 79 |
+ "Image": "fedora:latest", |
|
| 80 |
+ "Command": "echo 444444444444444444444444444444444", |
|
| 81 |
+ "Created": 1367854152, |
|
| 82 |
+ "Status": "Exit 0", |
|
| 83 |
+ "Ports":[], |
|
| 84 |
+ "SizeRw":12288, |
|
| 85 |
+ "SizeRootFs":0 |
|
| 86 |
+ } |
|
| 87 |
+ ] |
|
| 88 |
+ |
|
| 89 |
+ :query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default |
|
| 90 |
+ :query limit: Show ``limit`` last created containers, include non-running ones. |
|
| 91 |
+ :query since: Show only containers created since Id, include non-running ones. |
|
| 92 |
+ :query before: Show only containers created before Id, include non-running ones. |
|
| 93 |
+ :query size: 1/True/true or 0/False/false, Show the containers sizes |
|
| 94 |
+ :statuscode 200: no error |
|
| 95 |
+ :statuscode 400: bad parameter |
|
| 96 |
+ :statuscode 500: server error |
|
| 98 | 97 |
|
| 99 | 98 |
Create a container |
| 100 | 99 |
****************** |
| 101 | 100 |
|
| 102 | 101 |
.. http:post:: /containers/create |
| 103 | 102 |
|
| 104 |
- Create a container |
|
| 105 |
- |
|
| 106 |
- **Example request**: |
|
| 107 |
- |
|
| 108 |
- .. sourcecode:: http |
|
| 109 |
- |
|
| 110 |
- POST /containers/create HTTP/1.1 |
|
| 111 |
- Content-Type: application/json |
|
| 112 |
- |
|
| 113 |
- {
|
|
| 114 |
- "Hostname":"", |
|
| 115 |
- "User":"", |
|
| 116 |
- "Memory":0, |
|
| 117 |
- "MemorySwap":0, |
|
| 118 |
- "AttachStdin":false, |
|
| 119 |
- "AttachStdout":true, |
|
| 120 |
- "AttachStderr":true, |
|
| 121 |
- "PortSpecs":null, |
|
| 122 |
- "Privileged": false, |
|
| 123 |
- "Tty":false, |
|
| 124 |
- "OpenStdin":false, |
|
| 125 |
- "StdinOnce":false, |
|
| 126 |
- "Env":null, |
|
| 127 |
- "Cmd":[ |
|
| 128 |
- "date" |
|
| 129 |
- ], |
|
| 130 |
- "Dns":null, |
|
| 131 |
- "Image":"ubuntu", |
|
| 132 |
- "Volumes":{},
|
|
| 133 |
- "VolumesFrom":"", |
|
| 134 |
- "WorkingDir":"" |
|
| 135 |
- |
|
| 136 |
- } |
|
| 137 |
- |
|
| 138 |
- **Example response**: |
|
| 139 |
- |
|
| 140 |
- .. sourcecode:: http |
|
| 141 |
- |
|
| 142 |
- HTTP/1.1 201 OK |
|
| 143 |
- Content-Type: application/json |
|
| 144 |
- |
|
| 145 |
- {
|
|
| 146 |
- "Id":"e90e34656806" |
|
| 147 |
- "Warnings":[] |
|
| 148 |
- } |
|
| 149 |
- |
|
| 150 |
- :jsonparam config: the container's configuration |
|
| 151 |
- :statuscode 201: no error |
|
| 152 |
- :statuscode 404: no such container |
|
| 153 |
- :statuscode 406: impossible to attach (container not running) |
|
| 154 |
- :statuscode 500: server error |
|
| 103 |
+ Create a container |
|
| 104 |
+ |
|
| 105 |
+ **Example request**: |
|
| 106 |
+ |
|
| 107 |
+ .. sourcecode:: http |
|
| 155 | 108 |
|
| 109 |
+ POST /containers/create HTTP/1.1 |
|
| 110 |
+ Content-Type: application/json |
|
| 111 |
+ |
|
| 112 |
+ {
|
|
| 113 |
+ "Hostname":"", |
|
| 114 |
+ "User":"", |
|
| 115 |
+ "Memory":0, |
|
| 116 |
+ "MemorySwap":0, |
|
| 117 |
+ "AttachStdin":false, |
|
| 118 |
+ "AttachStdout":true, |
|
| 119 |
+ "AttachStderr":true, |
|
| 120 |
+ "PortSpecs":null, |
|
| 121 |
+ "Privileged": false, |
|
| 122 |
+ "Tty":false, |
|
| 123 |
+ "OpenStdin":false, |
|
| 124 |
+ "StdinOnce":false, |
|
| 125 |
+ "Env":null, |
|
| 126 |
+ "Cmd":[ |
|
| 127 |
+ "date" |
|
| 128 |
+ ], |
|
| 129 |
+ "Dns":null, |
|
| 130 |
+ "Image":"ubuntu", |
|
| 131 |
+ "Volumes":{},
|
|
| 132 |
+ "VolumesFrom":"", |
|
| 133 |
+ "WorkingDir":"" |
|
| 134 |
+ } |
|
| 135 |
+ |
|
| 136 |
+ **Example response**: |
|
| 137 |
+ |
|
| 138 |
+ .. sourcecode:: http |
|
| 139 |
+ |
|
| 140 |
+ HTTP/1.1 201 OK |
|
| 141 |
+ Content-Type: application/json |
|
| 142 |
+ |
|
| 143 |
+ {
|
|
| 144 |
+ "Id":"e90e34656806" |
|
| 145 |
+ "Warnings":[] |
|
| 146 |
+ } |
|
| 147 |
+ |
|
| 148 |
+ :jsonparam config: the container's configuration |
|
| 149 |
+ :statuscode 201: no error |
|
| 150 |
+ :statuscode 404: no such container |
|
| 151 |
+ :statuscode 406: impossible to attach (container not running) |
|
| 152 |
+ :statuscode 500: server error |
|
| 156 | 153 |
|
| 157 | 154 |
Inspect a container |
| 158 | 155 |
******************* |
| 159 | 156 |
|
| 160 | 157 |
.. http:get:: /containers/(id)/json |
| 161 | 158 |
|
| 162 |
- Return low-level information on the container ``id`` |
|
| 163 |
- |
|
| 164 |
- **Example request**: |
|
| 165 |
- |
|
| 166 |
- .. sourcecode:: http |
|
| 167 |
- |
|
| 168 |
- GET /containers/4fa6e0f0c678/json HTTP/1.1 |
|
| 169 |
- |
|
| 170 |
- **Example response**: |
|
| 171 |
- |
|
| 172 |
- .. sourcecode:: http |
|
| 173 |
- |
|
| 174 |
- HTTP/1.1 200 OK |
|
| 175 |
- Content-Type: application/json |
|
| 176 |
- |
|
| 177 |
- {
|
|
| 178 |
- "Id": "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2", |
|
| 179 |
- "Created": "2013-05-07T14:51:42.041847+02:00", |
|
| 180 |
- "Path": "date", |
|
| 181 |
- "Args": [], |
|
| 182 |
- "Config": {
|
|
| 183 |
- "Hostname": "4fa6e0f0c678", |
|
| 184 |
- "User": "", |
|
| 185 |
- "Memory": 0, |
|
| 186 |
- "MemorySwap": 0, |
|
| 187 |
- "AttachStdin": false, |
|
| 188 |
- "AttachStdout": true, |
|
| 189 |
- "AttachStderr": true, |
|
| 190 |
- "PortSpecs": null, |
|
| 191 |
- "Tty": false, |
|
| 192 |
- "OpenStdin": false, |
|
| 193 |
- "StdinOnce": false, |
|
| 194 |
- "Env": null, |
|
| 195 |
- "Cmd": [ |
|
| 196 |
- "date" |
|
| 197 |
- ], |
|
| 198 |
- "Dns": null, |
|
| 199 |
- "Image": "ubuntu", |
|
| 200 |
- "Volumes": {},
|
|
| 201 |
- "VolumesFrom": "", |
|
| 202 |
- "WorkingDir":"" |
|
| 203 |
- |
|
| 204 |
- }, |
|
| 205 |
- "State": {
|
|
| 206 |
- "Running": false, |
|
| 207 |
- "Pid": 0, |
|
| 208 |
- "ExitCode": 0, |
|
| 209 |
- "StartedAt": "2013-05-07T14:51:42.087658+02:01360", |
|
| 210 |
- "Ghost": false |
|
| 211 |
- }, |
|
| 212 |
- "Image": "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc", |
|
| 213 |
- "NetworkSettings": {
|
|
| 214 |
- "IpAddress": "", |
|
| 215 |
- "IpPrefixLen": 0, |
|
| 216 |
- "Gateway": "", |
|
| 217 |
- "Bridge": "", |
|
| 218 |
- "PortMapping": null |
|
| 219 |
- }, |
|
| 220 |
- "SysInitPath": "/home/kitty/go/src/github.com/dotcloud/docker/bin/docker", |
|
| 221 |
- "ResolvConfPath": "/etc/resolv.conf", |
|
| 222 |
- "Volumes": {}
|
|
| 223 |
- } |
|
| 224 |
- |
|
| 225 |
- :statuscode 200: no error |
|
| 226 |
- :statuscode 404: no such container |
|
| 227 |
- :statuscode 500: server error |
|
| 159 |
+ Return low-level information on the container ``id`` |
|
| 160 |
+ |
|
| 161 |
+ **Example request**: |
|
| 162 |
+ |
|
| 163 |
+ .. sourcecode:: http |
|
| 164 |
+ |
|
| 165 |
+ GET /containers/4fa6e0f0c678/json HTTP/1.1 |
|
| 166 |
+ |
|
| 167 |
+ **Example response**: |
|
| 228 | 168 |
|
| 169 |
+ .. sourcecode:: http |
|
| 170 |
+ |
|
| 171 |
+ HTTP/1.1 200 OK |
|
| 172 |
+ Content-Type: application/json |
|
| 173 |
+ |
|
| 174 |
+ {
|
|
| 175 |
+ "Id": "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2", |
|
| 176 |
+ "Created": "2013-05-07T14:51:42.041847+02:00", |
|
| 177 |
+ "Path": "date", |
|
| 178 |
+ "Args": [], |
|
| 179 |
+ "Config": {
|
|
| 180 |
+ "Hostname": "4fa6e0f0c678", |
|
| 181 |
+ "User": "", |
|
| 182 |
+ "Memory": 0, |
|
| 183 |
+ "MemorySwap": 0, |
|
| 184 |
+ "AttachStdin": false, |
|
| 185 |
+ "AttachStdout": true, |
|
| 186 |
+ "AttachStderr": true, |
|
| 187 |
+ "PortSpecs": null, |
|
| 188 |
+ "Tty": false, |
|
| 189 |
+ "OpenStdin": false, |
|
| 190 |
+ "StdinOnce": false, |
|
| 191 |
+ "Env": null, |
|
| 192 |
+ "Cmd": [ |
|
| 193 |
+ "date" |
|
| 194 |
+ ], |
|
| 195 |
+ "Dns": null, |
|
| 196 |
+ "Image": "ubuntu", |
|
| 197 |
+ "Volumes": {},
|
|
| 198 |
+ "VolumesFrom": "", |
|
| 199 |
+ "WorkingDir":"" |
|
| 200 |
+ }, |
|
| 201 |
+ "State": {
|
|
| 202 |
+ "Running": false, |
|
| 203 |
+ "Pid": 0, |
|
| 204 |
+ "ExitCode": 0, |
|
| 205 |
+ "StartedAt": "2013-05-07T14:51:42.087658+02:01360", |
|
| 206 |
+ "Ghost": false |
|
| 207 |
+ }, |
|
| 208 |
+ "Image": "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc", |
|
| 209 |
+ "NetworkSettings": {
|
|
| 210 |
+ "IpAddress": "", |
|
| 211 |
+ "IpPrefixLen": 0, |
|
| 212 |
+ "Gateway": "", |
|
| 213 |
+ "Bridge": "", |
|
| 214 |
+ "PortMapping": null |
|
| 215 |
+ }, |
|
| 216 |
+ "SysInitPath": "/home/kitty/go/src/github.com/dotcloud/docker/bin/docker", |
|
| 217 |
+ "ResolvConfPath": "/etc/resolv.conf", |
|
| 218 |
+ "Volumes": {}
|
|
| 219 |
+ } |
|
| 220 |
+ |
|
| 221 |
+ :statuscode 200: no error |
|
| 222 |
+ :statuscode 404: no such container |
|
| 223 |
+ :statuscode 500: server error |
|
| 229 | 224 |
|
| 230 | 225 |
List processes running inside a container |
| 231 | 226 |
***************************************** |
| 232 | 227 |
|
| 233 | 228 |
.. http:get:: /containers/(id)/top |
| 234 | 229 |
|
| 235 |
- List processes running inside the container ``id`` |
|
| 236 |
- |
|
| 237 |
- **Example request**: |
|
| 238 |
- |
|
| 239 |
- .. sourcecode:: http |
|
| 230 |
+ List processes running inside the container ``id`` |
|
| 240 | 231 |
|
| 241 |
- GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 232 |
+ **Example request**: |
|
| 242 | 233 |
|
| 243 |
- **Example response**: |
|
| 234 |
+ .. sourcecode:: http |
|
| 244 | 235 |
|
| 245 |
- .. sourcecode:: http |
|
| 236 |
+ GET /containers/4fa6e0f0c678/top HTTP/1.1 |
|
| 246 | 237 |
|
| 247 |
- HTTP/1.1 200 OK |
|
| 248 |
- Content-Type: application/json |
|
| 238 |
+ **Example response**: |
|
| 249 | 239 |
|
| 250 |
- {
|
|
| 251 |
- "Titles":[ |
|
| 252 |
- "USER", |
|
| 253 |
- "PID", |
|
| 254 |
- "%CPU", |
|
| 255 |
- "%MEM", |
|
| 256 |
- "VSZ", |
|
| 257 |
- "RSS", |
|
| 258 |
- "TTY", |
|
| 259 |
- "STAT", |
|
| 260 |
- "START", |
|
| 261 |
- "TIME", |
|
| 262 |
- "COMMAND" |
|
| 263 |
- ], |
|
| 264 |
- "Processes":[ |
|
| 265 |
- ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 266 |
- ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 267 |
- ] |
|
| 268 |
- } |
|
| 240 |
+ .. sourcecode:: http |
|
| 269 | 241 |
|
| 270 |
- :query ps_args: ps arguments to use (eg. aux) |
|
| 271 |
- :statuscode 200: no error |
|
| 272 |
- :statuscode 404: no such container |
|
| 273 |
- :statuscode 500: server error |
|
| 242 |
+ HTTP/1.1 200 OK |
|
| 243 |
+ Content-Type: application/json |
|
| 274 | 244 |
|
| 245 |
+ {
|
|
| 246 |
+ "Titles":[ |
|
| 247 |
+ "USER", |
|
| 248 |
+ "PID", |
|
| 249 |
+ "%CPU", |
|
| 250 |
+ "%MEM", |
|
| 251 |
+ "VSZ", |
|
| 252 |
+ "RSS", |
|
| 253 |
+ "TTY", |
|
| 254 |
+ "STAT", |
|
| 255 |
+ "START", |
|
| 256 |
+ "TIME", |
|
| 257 |
+ "COMMAND" |
|
| 258 |
+ ], |
|
| 259 |
+ "Processes":[ |
|
| 260 |
+ ["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"], |
|
| 261 |
+ ["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"] |
|
| 262 |
+ ] |
|
| 263 |
+ } |
|
| 264 |
+ |
|
| 265 |
+ :query ps_args: ps arguments to use (eg. aux) |
|
| 266 |
+ :statuscode 200: no error |
|
| 267 |
+ :statuscode 404: no such container |
|
| 268 |
+ :statuscode 500: server error |
|
| 275 | 269 |
|
| 276 | 270 |
Inspect changes on a container's filesystem |
| 277 | 271 |
******************************************* |
| 278 | 272 |
|
| 279 | 273 |
.. http:get:: /containers/(id)/changes |
| 280 | 274 |
|
| 281 |
- Inspect changes on container ``id`` 's filesystem |
|
| 275 |
+ Inspect changes on container ``id`` 's filesystem |
|
| 282 | 276 |
|
| 283 |
- **Example request**: |
|
| 277 |
+ **Example request**: |
|
| 284 | 278 |
|
| 285 |
- .. sourcecode:: http |
|
| 279 |
+ .. sourcecode:: http |
|
| 286 | 280 |
|
| 287 |
- GET /containers/4fa6e0f0c678/changes HTTP/1.1 |
|
| 281 |
+ GET /containers/4fa6e0f0c678/changes HTTP/1.1 |
|
| 288 | 282 |
|
| 289 |
- |
|
| 290 |
- **Example response**: |
|
| 283 |
+ **Example response**: |
|
| 291 | 284 |
|
| 292 |
- .. sourcecode:: http |
|
| 285 |
+ .. sourcecode:: http |
|
| 293 | 286 |
|
| 294 |
- HTTP/1.1 200 OK |
|
| 295 |
- Content-Type: application/json |
|
| 296 |
- |
|
| 297 |
- [ |
|
| 298 |
- {
|
|
| 299 |
- "Path":"/dev", |
|
| 300 |
- "Kind":0 |
|
| 301 |
- }, |
|
| 302 |
- {
|
|
| 303 |
- "Path":"/dev/kmsg", |
|
| 304 |
- "Kind":1 |
|
| 305 |
- }, |
|
| 306 |
- {
|
|
| 307 |
- "Path":"/test", |
|
| 308 |
- "Kind":1 |
|
| 309 |
- } |
|
| 310 |
- ] |
|
| 311 |
- |
|
| 312 |
- :statuscode 200: no error |
|
| 313 |
- :statuscode 404: no such container |
|
| 314 |
- :statuscode 500: server error |
|
| 287 |
+ HTTP/1.1 200 OK |
|
| 288 |
+ Content-Type: application/json |
|
| 315 | 289 |
|
| 290 |
+ [ |
|
| 291 |
+ {
|
|
| 292 |
+ "Path":"/dev", |
|
| 293 |
+ "Kind":0 |
|
| 294 |
+ }, |
|
| 295 |
+ {
|
|
| 296 |
+ "Path":"/dev/kmsg", |
|
| 297 |
+ "Kind":1 |
|
| 298 |
+ }, |
|
| 299 |
+ {
|
|
| 300 |
+ "Path":"/test", |
|
| 301 |
+ "Kind":1 |
|
| 302 |
+ } |
|
| 303 |
+ ] |
|
| 304 |
+ |
|
| 305 |
+ :statuscode 200: no error |
|
| 306 |
+ :statuscode 404: no such container |
|
| 307 |
+ :statuscode 500: server error |
|
| 316 | 308 |
|
| 317 | 309 |
Export a container |
| 318 | 310 |
****************** |
| 319 | 311 |
|
| 320 | 312 |
.. http:get:: /containers/(id)/export |
| 321 | 313 |
|
| 322 |
- Export the contents of container ``id`` |
|
| 314 |
+ Export the contents of container ``id`` |
|
| 323 | 315 |
|
| 324 |
- **Example request**: |
|
| 316 |
+ **Example request**: |
|
| 325 | 317 |
|
| 326 |
- .. sourcecode:: http |
|
| 318 |
+ .. sourcecode:: http |
|
| 327 | 319 |
|
| 328 |
- GET /containers/4fa6e0f0c678/export HTTP/1.1 |
|
| 320 |
+ GET /containers/4fa6e0f0c678/export HTTP/1.1 |
|
| 329 | 321 |
|
| 330 |
- |
|
| 331 |
- **Example response**: |
|
| 322 |
+ **Example response**: |
|
| 332 | 323 |
|
| 333 |
- .. sourcecode:: http |
|
| 324 |
+ .. sourcecode:: http |
|
| 334 | 325 |
|
| 335 |
- HTTP/1.1 200 OK |
|
| 336 |
- Content-Type: application/octet-stream |
|
| 337 |
- |
|
| 338 |
- {{ STREAM }}
|
|
| 326 |
+ HTTP/1.1 200 OK |
|
| 327 |
+ Content-Type: application/octet-stream |
|
| 339 | 328 |
|
| 340 |
- :statuscode 200: no error |
|
| 341 |
- :statuscode 404: no such container |
|
| 342 |
- :statuscode 500: server error |
|
| 329 |
+ {{ STREAM }}
|
|
| 343 | 330 |
|
| 331 |
+ :statuscode 200: no error |
|
| 332 |
+ :statuscode 404: no such container |
|
| 333 |
+ :statuscode 500: server error |
|
| 344 | 334 |
|
| 345 | 335 |
Start a container |
| 346 | 336 |
***************** |
| 347 | 337 |
|
| 348 | 338 |
.. http:post:: /containers/(id)/start |
| 349 | 339 |
|
| 350 |
- Start the container ``id`` |
|
| 351 |
- |
|
| 352 |
- **Example request**: |
|
| 340 |
+ Start the container ``id`` |
|
| 353 | 341 |
|
| 354 |
- .. sourcecode:: http |
|
| 342 |
+ **Example request**: |
|
| 355 | 343 |
|
| 356 |
- POST /containers/(id)/start HTTP/1.1 |
|
| 357 |
- Content-Type: application/json |
|
| 344 |
+ .. sourcecode:: http |
|
| 358 | 345 |
|
| 359 |
- {
|
|
| 360 |
- "Binds":["/tmp:/tmp"], |
|
| 361 |
- "LxcConf":[{"Key":"lxc.utsname","Value":"docker"}]
|
|
| 362 |
- } |
|
| 346 |
+ POST /containers/(id)/start HTTP/1.1 |
|
| 347 |
+ Content-Type: application/json |
|
| 363 | 348 |
|
| 364 |
- **Example response**: |
|
| 349 |
+ {
|
|
| 350 |
+ "Binds":["/tmp:/tmp"], |
|
| 351 |
+ "LxcConf":[{"Key":"lxc.utsname","Value":"docker"}]
|
|
| 352 |
+ } |
|
| 365 | 353 |
|
| 366 |
- .. sourcecode:: http |
|
| 354 |
+ **Example response**: |
|
| 367 | 355 |
|
| 368 |
- HTTP/1.1 204 No Content |
|
| 369 |
- Content-Type: text/plain |
|
| 356 |
+ .. sourcecode:: http |
|
| 370 | 357 |
|
| 371 |
- :jsonparam hostConfig: the container's host configuration (optional) |
|
| 372 |
- :statuscode 204: no error |
|
| 373 |
- :statuscode 404: no such container |
|
| 374 |
- :statuscode 500: server error |
|
| 358 |
+ HTTP/1.1 204 No Content |
|
| 359 |
+ Content-Type: text/plain |
|
| 375 | 360 |
|
| 361 |
+ :jsonparam hostConfig: the container's host configuration (optional) |
|
| 362 |
+ :statuscode 204: no error |
|
| 363 |
+ :statuscode 404: no such container |
|
| 364 |
+ :statuscode 500: server error |
|
| 376 | 365 |
|
| 377 | 366 |
Stop a container |
| 378 | 367 |
**************** |
| 379 | 368 |
|
| 380 | 369 |
.. http:post:: /containers/(id)/stop |
| 381 | 370 |
|
| 382 |
- Stop the container ``id`` |
|
| 371 |
+ Stop the container ``id`` |
|
| 372 |
+ |
|
| 373 |
+ **Example request**: |
|
| 383 | 374 |
|
| 384 |
- **Example request**: |
|
| 375 |
+ .. sourcecode:: http |
|
| 385 | 376 |
|
| 386 |
- .. sourcecode:: http |
|
| 377 |
+ POST /containers/e90e34656806/stop?t=5 HTTP/1.1 |
|
| 387 | 378 |
|
| 388 |
- POST /containers/e90e34656806/stop?t=5 HTTP/1.1 |
|
| 389 |
- |
|
| 390 |
- **Example response**: |
|
| 379 |
+ **Example response**: |
|
| 391 | 380 |
|
| 392 |
- .. sourcecode:: http |
|
| 381 |
+ .. sourcecode:: http |
|
| 393 | 382 |
|
| 394 |
- HTTP/1.1 204 OK |
|
| 395 |
- |
|
| 396 |
- :query t: number of seconds to wait before killing the container |
|
| 397 |
- :statuscode 204: no error |
|
| 398 |
- :statuscode 404: no such container |
|
| 399 |
- :statuscode 500: server error |
|
| 383 |
+ HTTP/1.1 204 OK |
|
| 400 | 384 |
|
| 385 |
+ :query t: number of seconds to wait before killing the container |
|
| 386 |
+ :statuscode 204: no error |
|
| 387 |
+ :statuscode 404: no such container |
|
| 388 |
+ :statuscode 500: server error |
|
| 401 | 389 |
|
| 402 | 390 |
Restart a container |
| 403 | 391 |
******************* |
| 404 | 392 |
|
| 405 | 393 |
.. http:post:: /containers/(id)/restart |
| 406 | 394 |
|
| 407 |
- Restart the container ``id`` |
|
| 395 |
+ Restart the container ``id`` |
|
| 396 |
+ |
|
| 397 |
+ **Example request**: |
|
| 408 | 398 |
|
| 409 |
- **Example request**: |
|
| 399 |
+ .. sourcecode:: http |
|
| 410 | 400 |
|
| 411 |
- .. sourcecode:: http |
|
| 401 |
+ POST /containers/e90e34656806/restart?t=5 HTTP/1.1 |
|
| 412 | 402 |
|
| 413 |
- POST /containers/e90e34656806/restart?t=5 HTTP/1.1 |
|
| 414 |
- |
|
| 415 |
- **Example response**: |
|
| 403 |
+ **Example response**: |
|
| 416 | 404 |
|
| 417 |
- .. sourcecode:: http |
|
| 405 |
+ .. sourcecode:: http |
|
| 418 | 406 |
|
| 419 |
- HTTP/1.1 204 OK |
|
| 420 |
- |
|
| 421 |
- :query t: number of seconds to wait before killing the container |
|
| 422 |
- :statuscode 204: no error |
|
| 423 |
- :statuscode 404: no such container |
|
| 424 |
- :statuscode 500: server error |
|
| 407 |
+ HTTP/1.1 204 OK |
|
| 425 | 408 |
|
| 409 |
+ :query t: number of seconds to wait before killing the container |
|
| 410 |
+ :statuscode 204: no error |
|
| 411 |
+ :statuscode 404: no such container |
|
| 412 |
+ :statuscode 500: server error |
|
| 426 | 413 |
|
| 427 | 414 |
Kill a container |
| 428 | 415 |
**************** |
| 429 | 416 |
|
| 430 | 417 |
.. http:post:: /containers/(id)/kill |
| 431 | 418 |
|
| 432 |
- Kill the container ``id`` |
|
| 419 |
+ Kill the container ``id`` |
|
| 433 | 420 |
|
| 434 |
- **Example request**: |
|
| 421 |
+ **Example request**: |
|
| 435 | 422 |
|
| 436 |
- .. sourcecode:: http |
|
| 423 |
+ .. sourcecode:: http |
|
| 437 | 424 |
|
| 438 |
- POST /containers/e90e34656806/kill HTTP/1.1 |
|
| 439 |
- |
|
| 440 |
- **Example response**: |
|
| 425 |
+ POST /containers/e90e34656806/kill HTTP/1.1 |
|
| 441 | 426 |
|
| 442 |
- .. sourcecode:: http |
|
| 427 |
+ **Example response**: |
|
| 443 | 428 |
|
| 444 |
- HTTP/1.1 204 OK |
|
| 445 |
- |
|
| 446 |
- :statuscode 204: no error |
|
| 447 |
- :statuscode 404: no such container |
|
| 448 |
- :statuscode 500: server error |
|
| 429 |
+ .. sourcecode:: http |
|
| 449 | 430 |
|
| 431 |
+ HTTP/1.1 204 OK |
|
| 432 |
+ |
|
| 433 |
+ :statuscode 204: no error |
|
| 434 |
+ :statuscode 404: no such container |
|
| 435 |
+ :statuscode 500: server error |
|
| 450 | 436 |
|
| 451 | 437 |
Attach to a container |
| 452 | 438 |
********************* |
| 453 | 439 |
|
| 454 | 440 |
.. http:post:: /containers/(id)/attach |
| 455 | 441 |
|
| 456 |
- Attach to the container ``id`` |
|
| 442 |
+ Attach to the container ``id`` |
|
| 443 |
+ |
|
| 444 |
+ **Example request**: |
|
| 457 | 445 |
|
| 458 |
- **Example request**: |
|
| 446 |
+ .. sourcecode:: http |
|
| 459 | 447 |
|
| 460 |
- .. sourcecode:: http |
|
| 448 |
+ POST /containers/16253994b7c4/attach?logs=1&stream=0&stdout=1 HTTP/1.1 |
|
| 461 | 449 |
|
| 462 |
- POST /containers/16253994b7c4/attach?logs=1&stream=0&stdout=1 HTTP/1.1 |
|
| 463 |
- |
|
| 464 |
- **Example response**: |
|
| 450 |
+ **Example response**: |
|
| 465 | 451 |
|
| 466 |
- .. sourcecode:: http |
|
| 452 |
+ .. sourcecode:: http |
|
| 467 | 453 |
|
| 468 |
- HTTP/1.1 200 OK |
|
| 469 |
- Content-Type: application/vnd.docker.raw-stream |
|
| 454 |
+ HTTP/1.1 200 OK |
|
| 455 |
+ Content-Type: application/vnd.docker.raw-stream |
|
| 470 | 456 |
|
| 471 |
- {{ STREAM }}
|
|
| 472 |
- |
|
| 473 |
- :query logs: 1/True/true or 0/False/false, return logs. Default false |
|
| 474 |
- :query stream: 1/True/true or 0/False/false, return stream. Default false |
|
| 475 |
- :query stdin: 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false |
|
| 476 |
- :query stdout: 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false |
|
| 477 |
- :query stderr: 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false |
|
| 478 |
- :statuscode 200: no error |
|
| 479 |
- :statuscode 400: bad parameter |
|
| 480 |
- :statuscode 404: no such container |
|
| 481 |
- :statuscode 500: server error |
|
| 457 |
+ {{ STREAM }}
|
|
| 482 | 458 |
|
| 459 |
+ :query logs: 1/True/true or 0/False/false, return logs. Default false |
|
| 460 |
+ :query stream: 1/True/true or 0/False/false, return stream. Default false |
|
| 461 |
+ :query stdin: 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false |
|
| 462 |
+ :query stdout: 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false |
|
| 463 |
+ :query stderr: 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false |
|
| 464 |
+ :statuscode 200: no error |
|
| 465 |
+ :statuscode 400: bad parameter |
|
| 466 |
+ :statuscode 404: no such container |
|
| 467 |
+ :statuscode 500: server error |
|
| 483 | 468 |
|
| 484 | 469 |
Wait a container |
| 485 | 470 |
**************** |
| 486 | 471 |
|
| 487 | 472 |
.. http:post:: /containers/(id)/wait |
| 488 | 473 |
|
| 489 |
- Block until container ``id`` stops, then returns the exit code |
|
| 474 |
+ Block until container ``id`` stops, then returns the exit code |
|
| 490 | 475 |
|
| 491 |
- **Example request**: |
|
| 476 |
+ **Example request**: |
|
| 492 | 477 |
|
| 493 |
- .. sourcecode:: http |
|
| 478 |
+ .. sourcecode:: http |
|
| 494 | 479 |
|
| 495 |
- POST /containers/16253994b7c4/wait HTTP/1.1 |
|
| 496 |
- |
|
| 497 |
- **Example response**: |
|
| 480 |
+ POST /containers/16253994b7c4/wait HTTP/1.1 |
|
| 498 | 481 |
|
| 499 |
- .. sourcecode:: http |
|
| 482 |
+ **Example response**: |
|
| 500 | 483 |
|
| 501 |
- HTTP/1.1 200 OK |
|
| 502 |
- Content-Type: application/json |
|
| 484 |
+ .. sourcecode:: http |
|
| 503 | 485 |
|
| 504 |
- {"StatusCode":0}
|
|
| 505 |
- |
|
| 506 |
- :statuscode 200: no error |
|
| 507 |
- :statuscode 404: no such container |
|
| 508 |
- :statuscode 500: server error |
|
| 486 |
+ HTTP/1.1 200 OK |
|
| 487 |
+ Content-Type: application/json |
|
| 488 |
+ |
|
| 489 |
+ {"StatusCode":0}
|
|
| 509 | 490 |
|
| 491 |
+ :statuscode 200: no error |
|
| 492 |
+ :statuscode 404: no such container |
|
| 493 |
+ :statuscode 500: server error |
|
| 510 | 494 |
|
| 511 | 495 |
Remove a container |
| 512 | 496 |
******************* |
| 513 | 497 |
|
| 514 | 498 |
.. http:delete:: /containers/(id) |
| 515 | 499 |
|
| 516 |
- Remove the container ``id`` from the filesystem |
|
| 500 |
+ Remove the container ``id`` from the filesystem |
|
| 517 | 501 |
|
| 518 |
- **Example request**: |
|
| 502 |
+ **Example request**: |
|
| 519 | 503 |
|
| 520 |
- .. sourcecode:: http |
|
| 504 |
+ .. sourcecode:: http |
|
| 521 | 505 |
|
| 522 |
- DELETE /containers/16253994b7c4?v=1 HTTP/1.1 |
|
| 506 |
+ DELETE /containers/16253994b7c4?v=1 HTTP/1.1 |
|
| 523 | 507 |
|
| 524 |
- **Example response**: |
|
| 508 |
+ **Example response**: |
|
| 525 | 509 |
|
| 526 |
- .. sourcecode:: http |
|
| 510 |
+ .. sourcecode:: http |
|
| 527 | 511 |
|
| 528 |
- HTTP/1.1 204 OK |
|
| 529 |
- |
|
| 530 |
- :query v: 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false |
|
| 531 |
- :statuscode 204: no error |
|
| 532 |
- :statuscode 400: bad parameter |
|
| 533 |
- :statuscode 404: no such container |
|
| 534 |
- :statuscode 500: server error |
|
| 512 |
+ HTTP/1.1 204 OK |
|
| 535 | 513 |
|
| 514 |
+ :query v: 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false |
|
| 515 |
+ :statuscode 204: no error |
|
| 516 |
+ :statuscode 400: bad parameter |
|
| 517 |
+ :statuscode 404: no such container |
|
| 518 |
+ :statuscode 500: server error |
|
| 536 | 519 |
|
| 537 | 520 |
Copy files or folders from a container |
| 538 | 521 |
************************************** |
| 539 | 522 |
|
| 540 | 523 |
.. http:post:: /containers/(id)/copy |
| 541 | 524 |
|
| 542 |
- Copy files or folders of container ``id`` |
|
| 525 |
+ Copy files or folders of container ``id`` |
|
| 543 | 526 |
|
| 544 |
- **Example request**: |
|
| 527 |
+ **Example request**: |
|
| 545 | 528 |
|
| 546 |
- .. sourcecode:: http |
|
| 529 |
+ .. sourcecode:: http |
|
| 547 | 530 |
|
| 548 |
- POST /containers/4fa6e0f0c678/copy HTTP/1.1 |
|
| 549 |
- Content-Type: application/json |
|
| 531 |
+ POST /containers/4fa6e0f0c678/copy HTTP/1.1 |
|
| 532 |
+ Content-Type: application/json |
|
| 550 | 533 |
|
| 551 |
- {
|
|
| 552 |
- "Resource":"test.txt" |
|
| 553 |
- } |
|
| 534 |
+ {
|
|
| 535 |
+ "Resource":"test.txt" |
|
| 536 |
+ } |
|
| 554 | 537 |
|
| 555 |
- **Example response**: |
|
| 538 |
+ **Example response**: |
|
| 556 | 539 |
|
| 557 |
- .. sourcecode:: http |
|
| 540 |
+ .. sourcecode:: http |
|
| 558 | 541 |
|
| 559 |
- HTTP/1.1 200 OK |
|
| 560 |
- Content-Type: application/octet-stream |
|
| 561 |
- |
|
| 562 |
- {{ STREAM }}
|
|
| 542 |
+ HTTP/1.1 200 OK |
|
| 543 |
+ Content-Type: application/octet-stream |
|
| 563 | 544 |
|
| 564 |
- :statuscode 200: no error |
|
| 565 |
- :statuscode 404: no such container |
|
| 566 |
- :statuscode 500: server error |
|
| 545 |
+ {{ STREAM }}
|
|
| 567 | 546 |
|
| 547 |
+ :statuscode 200: no error |
|
| 548 |
+ :statuscode 404: no such container |
|
| 549 |
+ :statuscode 500: server error |
|
| 568 | 550 |
|
| 569 | 551 |
2.2 Images |
| 570 | 552 |
---------- |
| ... | ... |
@@ -574,370 +556,360 @@ List Images |
| 574 | 574 |
|
| 575 | 575 |
.. http:get:: /images/(format) |
| 576 | 576 |
|
| 577 |
- List images ``format`` could be json or viz (json default) |
|
| 578 |
- |
|
| 579 |
- **Example request**: |
|
| 580 |
- |
|
| 581 |
- .. sourcecode:: http |
|
| 582 |
- |
|
| 583 |
- GET /images/json?all=0 HTTP/1.1 |
|
| 584 |
- |
|
| 585 |
- **Example response**: |
|
| 586 |
- |
|
| 587 |
- .. sourcecode:: http |
|
| 588 |
- |
|
| 589 |
- HTTP/1.1 200 OK |
|
| 590 |
- Content-Type: application/json |
|
| 591 |
- |
|
| 592 |
- [ |
|
| 593 |
- {
|
|
| 594 |
- "Repository":"ubuntu", |
|
| 595 |
- "Tag":"precise", |
|
| 596 |
- "Id":"b750fe79269d", |
|
| 597 |
- "Created":1364102658, |
|
| 598 |
- "Size":24653, |
|
| 599 |
- "VirtualSize":180116135 |
|
| 600 |
- }, |
|
| 601 |
- {
|
|
| 602 |
- "Repository":"ubuntu", |
|
| 603 |
- "Tag":"12.04", |
|
| 604 |
- "Id":"b750fe79269d", |
|
| 605 |
- "Created":1364102658, |
|
| 606 |
- "Size":24653, |
|
| 607 |
- "VirtualSize":180116135 |
|
| 608 |
- } |
|
| 609 |
- ] |
|
| 610 |
- |
|
| 611 |
- |
|
| 612 |
- **Example request**: |
|
| 613 |
- |
|
| 614 |
- .. sourcecode:: http |
|
| 615 |
- |
|
| 616 |
- GET /images/viz HTTP/1.1 |
|
| 617 |
- |
|
| 618 |
- **Example response**: |
|
| 619 |
- |
|
| 620 |
- .. sourcecode:: http |
|
| 621 |
- |
|
| 622 |
- HTTP/1.1 200 OK |
|
| 623 |
- Content-Type: text/plain |
|
| 624 |
- |
|
| 625 |
- digraph docker {
|
|
| 626 |
- "d82cbacda43a" -> "074be284591f" |
|
| 627 |
- "1496068ca813" -> "08306dc45919" |
|
| 628 |
- "08306dc45919" -> "0e7893146ac2" |
|
| 629 |
- "b750fe79269d" -> "1496068ca813" |
|
| 630 |
- base -> "27cf78414709" [style=invis] |
|
| 631 |
- "f71189fff3de" -> "9a33b36209ed" |
|
| 632 |
- "27cf78414709" -> "b750fe79269d" |
|
| 633 |
- "0e7893146ac2" -> "d6434d954665" |
|
| 634 |
- "d6434d954665" -> "d82cbacda43a" |
|
| 635 |
- base -> "e9aa60c60128" [style=invis] |
|
| 636 |
- "074be284591f" -> "f71189fff3de" |
|
| 637 |
- "b750fe79269d" [label="b750fe79269d\nubuntu",shape=box,fillcolor="paleturquoise",style="filled,rounded"]; |
|
| 638 |
- "e9aa60c60128" [label="e9aa60c60128\ncentos",shape=box,fillcolor="paleturquoise",style="filled,rounded"]; |
|
| 639 |
- "9a33b36209ed" [label="9a33b36209ed\nfedora",shape=box,fillcolor="paleturquoise",style="filled,rounded"]; |
|
| 640 |
- base [style=invisible] |
|
| 641 |
- } |
|
| 642 |
- |
|
| 643 |
- :query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default |
|
| 644 |
- :statuscode 200: no error |
|
| 645 |
- :statuscode 400: bad parameter |
|
| 646 |
- :statuscode 500: server error |
|
| 577 |
+ List images ``format`` could be json or viz (json default) |
|
| 647 | 578 |
|
| 579 |
+ **Example request**: |
|
| 580 |
+ |
|
| 581 |
+ .. sourcecode:: http |
|
| 582 |
+ |
|
| 583 |
+ GET /images/json?all=0 HTTP/1.1 |
|
| 584 |
+ |
|
| 585 |
+ **Example response**: |
|
| 586 |
+ |
|
| 587 |
+ .. sourcecode:: http |
|
| 588 |
+ |
|
| 589 |
+ HTTP/1.1 200 OK |
|
| 590 |
+ Content-Type: application/json |
|
| 591 |
+ |
|
| 592 |
+ [ |
|
| 593 |
+ {
|
|
| 594 |
+ "Repository":"ubuntu", |
|
| 595 |
+ "Tag":"precise", |
|
| 596 |
+ "Id":"b750fe79269d", |
|
| 597 |
+ "Created":1364102658, |
|
| 598 |
+ "Size":24653, |
|
| 599 |
+ "VirtualSize":180116135 |
|
| 600 |
+ }, |
|
| 601 |
+ {
|
|
| 602 |
+ "Repository":"ubuntu", |
|
| 603 |
+ "Tag":"12.04", |
|
| 604 |
+ "Id":"b750fe79269d", |
|
| 605 |
+ "Created":1364102658, |
|
| 606 |
+ "Size":24653, |
|
| 607 |
+ "VirtualSize":180116135 |
|
| 608 |
+ } |
|
| 609 |
+ ] |
|
| 610 |
+ |
|
| 611 |
+ **Example request**: |
|
| 612 |
+ |
|
| 613 |
+ .. sourcecode:: http |
|
| 614 |
+ |
|
| 615 |
+ GET /images/viz HTTP/1.1 |
|
| 616 |
+ |
|
| 617 |
+ **Example response**: |
|
| 618 |
+ |
|
| 619 |
+ .. sourcecode:: http |
|
| 620 |
+ |
|
| 621 |
+ HTTP/1.1 200 OK |
|
| 622 |
+ Content-Type: text/plain |
|
| 623 |
+ |
|
| 624 |
+ digraph docker {
|
|
| 625 |
+ "d82cbacda43a" -> "074be284591f" |
|
| 626 |
+ "1496068ca813" -> "08306dc45919" |
|
| 627 |
+ "08306dc45919" -> "0e7893146ac2" |
|
| 628 |
+ "b750fe79269d" -> "1496068ca813" |
|
| 629 |
+ base -> "27cf78414709" [style=invis] |
|
| 630 |
+ "f71189fff3de" -> "9a33b36209ed" |
|
| 631 |
+ "27cf78414709" -> "b750fe79269d" |
|
| 632 |
+ "0e7893146ac2" -> "d6434d954665" |
|
| 633 |
+ "d6434d954665" -> "d82cbacda43a" |
|
| 634 |
+ base -> "e9aa60c60128" [style=invis] |
|
| 635 |
+ "074be284591f" -> "f71189fff3de" |
|
| 636 |
+ "b750fe79269d" [label="b750fe79269d\nubuntu",shape=box,fillcolor="paleturquoise",style="filled,rounded"]; |
|
| 637 |
+ "e9aa60c60128" [label="e9aa60c60128\ncentos",shape=box,fillcolor="paleturquoise",style="filled,rounded"]; |
|
| 638 |
+ "9a33b36209ed" [label="9a33b36209ed\nfedora",shape=box,fillcolor="paleturquoise",style="filled,rounded"]; |
|
| 639 |
+ base [style=invisible] |
|
| 640 |
+ } |
|
| 641 |
+ |
|
| 642 |
+ :query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default |
|
| 643 |
+ :statuscode 200: no error |
|
| 644 |
+ :statuscode 400: bad parameter |
|
| 645 |
+ :statuscode 500: server error |
|
| 648 | 646 |
|
| 649 | 647 |
Create an image |
| 650 | 648 |
*************** |
| 651 | 649 |
|
| 652 | 650 |
.. http:post:: /images/create |
| 653 | 651 |
|
| 654 |
- Create an image, either by pull it from the registry or by importing it |
|
| 655 |
- |
|
| 656 |
- **Example request**: |
|
| 652 |
+ Create an image, either by pull it from the registry or by importing it |
|
| 657 | 653 |
|
| 658 |
- .. sourcecode:: http |
|
| 654 |
+ **Example request**: |
|
| 659 | 655 |
|
| 660 |
- POST /images/create?fromImage=ubuntu HTTP/1.1 |
|
| 656 |
+ .. sourcecode:: http |
|
| 661 | 657 |
|
| 662 |
- **Example response**: |
|
| 658 |
+ POST /images/create?fromImage=ubuntu HTTP/1.1 |
|
| 663 | 659 |
|
| 664 |
- .. sourcecode:: http |
|
| 660 |
+ **Example response**: |
|
| 665 | 661 |
|
| 666 |
- HTTP/1.1 200 OK |
|
| 667 |
- Content-Type: application/json |
|
| 662 |
+ .. sourcecode:: http |
|
| 668 | 663 |
|
| 669 |
- {"status":"Pulling..."}
|
|
| 670 |
- {"status":"Pulling", "progress":"1/? (n/a)"}
|
|
| 671 |
- {"error":"Invalid..."}
|
|
| 672 |
- ... |
|
| 664 |
+ HTTP/1.1 200 OK |
|
| 665 |
+ Content-Type: application/json |
|
| 673 | 666 |
|
| 674 |
- When using this endpoint to pull an image from the registry, |
|
| 675 |
- the ``X-Registry-Auth`` header can be used to include a |
|
| 676 |
- base64-encoded AuthConfig object. |
|
| 667 |
+ {"status":"Pulling..."}
|
|
| 668 |
+ {"status":"Pulling", "progress":"1/? (n/a)"}
|
|
| 669 |
+ {"error":"Invalid..."}
|
|
| 670 |
+ ... |
|
| 677 | 671 |
|
| 678 |
- :query fromImage: name of the image to pull |
|
| 679 |
- :query fromSrc: source to import, - means stdin |
|
| 680 |
- :query repo: repository |
|
| 681 |
- :query tag: tag |
|
| 682 |
- :query registry: the registry to pull from |
|
| 683 |
- :statuscode 200: no error |
|
| 684 |
- :statuscode 500: server error |
|
| 672 |
+ When using this endpoint to pull an image from the registry, |
|
| 673 |
+ the ``X-Registry-Auth`` header can be used to include a |
|
| 674 |
+ base64-encoded AuthConfig object. |
|
| 685 | 675 |
|
| 676 |
+ :query fromImage: name of the image to pull |
|
| 677 |
+ :query fromSrc: source to import, - means stdin |
|
| 678 |
+ :query repo: repository |
|
| 679 |
+ :query tag: tag |
|
| 680 |
+ :query registry: the registry to pull from |
|
| 681 |
+ :statuscode 200: no error |
|
| 682 |
+ :statuscode 500: server error |
|
| 686 | 683 |
|
| 687 | 684 |
Insert a file in an image |
| 688 | 685 |
************************* |
| 689 | 686 |
|
| 690 | 687 |
.. http:post:: /images/(name)/insert |
| 691 | 688 |
|
| 692 |
- Insert a file from ``url`` in the image ``name`` at ``path`` |
|
| 693 |
- |
|
| 694 |
- **Example request**: |
|
| 689 |
+ Insert a file from ``url`` in the image ``name`` at ``path`` |
|
| 695 | 690 |
|
| 696 |
- .. sourcecode:: http |
|
| 691 |
+ **Example request**: |
|
| 697 | 692 |
|
| 698 |
- POST /images/test/insert?path=/usr&url=myurl HTTP/1.1 |
|
| 693 |
+ .. sourcecode:: http |
|
| 699 | 694 |
|
| 700 |
- **Example response**: |
|
| 695 |
+ POST /images/test/insert?path=/usr&url=myurl HTTP/1.1 |
|
| 701 | 696 |
|
| 702 |
- .. sourcecode:: http |
|
| 697 |
+ **Example response**: |
|
| 703 | 698 |
|
| 704 |
- HTTP/1.1 200 OK |
|
| 705 |
- Content-Type: application/json |
|
| 699 |
+ .. sourcecode:: http |
|
| 706 | 700 |
|
| 707 |
- {"status":"Inserting..."}
|
|
| 708 |
- {"status":"Inserting", "progress":"1/? (n/a)"}
|
|
| 709 |
- {"error":"Invalid..."}
|
|
| 710 |
- ... |
|
| 701 |
+ HTTP/1.1 200 OK |
|
| 702 |
+ Content-Type: application/json |
|
| 711 | 703 |
|
| 712 |
- :statuscode 200: no error |
|
| 713 |
- :statuscode 500: server error |
|
| 704 |
+ {"status":"Inserting..."}
|
|
| 705 |
+ {"status":"Inserting", "progress":"1/? (n/a)"}
|
|
| 706 |
+ {"error":"Invalid..."}
|
|
| 707 |
+ ... |
|
| 714 | 708 |
|
| 709 |
+ :statuscode 200: no error |
|
| 710 |
+ :statuscode 500: server error |
|
| 715 | 711 |
|
| 716 | 712 |
Inspect an image |
| 717 | 713 |
**************** |
| 718 | 714 |
|
| 719 | 715 |
.. http:get:: /images/(name)/json |
| 720 | 716 |
|
| 721 |
- Return low-level information on the image ``name`` |
|
| 722 |
- |
|
| 723 |
- **Example request**: |
|
| 724 |
- |
|
| 725 |
- .. sourcecode:: http |
|
| 726 |
- |
|
| 727 |
- GET /images/centos/json HTTP/1.1 |
|
| 728 |
- |
|
| 729 |
- **Example response**: |
|
| 730 |
- |
|
| 731 |
- .. sourcecode:: http |
|
| 732 |
- |
|
| 733 |
- HTTP/1.1 200 OK |
|
| 734 |
- Content-Type: application/json |
|
| 735 |
- |
|
| 736 |
- {
|
|
| 737 |
- "id":"b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc", |
|
| 738 |
- "parent":"27cf784147099545", |
|
| 739 |
- "created":"2013-03-23T22:24:18.818426-07:00", |
|
| 740 |
- "container":"3d67245a8d72ecf13f33dffac9f79dcdf70f75acb84d308770391510e0c23ad0", |
|
| 741 |
- "container_config": |
|
| 742 |
- {
|
|
| 743 |
- "Hostname":"", |
|
| 744 |
- "User":"", |
|
| 745 |
- "Memory":0, |
|
| 746 |
- "MemorySwap":0, |
|
| 747 |
- "AttachStdin":false, |
|
| 748 |
- "AttachStdout":false, |
|
| 749 |
- "AttachStderr":false, |
|
| 750 |
- "PortSpecs":null, |
|
| 751 |
- "Tty":true, |
|
| 752 |
- "OpenStdin":true, |
|
| 753 |
- "StdinOnce":false, |
|
| 754 |
- "Env":null, |
|
| 755 |
- "Cmd": ["/bin/bash"] |
|
| 756 |
- ,"Dns":null, |
|
| 757 |
- "Image":"centos", |
|
| 758 |
- "Volumes":null, |
|
| 759 |
- "VolumesFrom":"", |
|
| 760 |
- "WorkingDir":"" |
|
| 761 |
- }, |
|
| 762 |
- "Size": 6824592 |
|
| 763 |
- } |
|
| 764 |
- |
|
| 765 |
- :statuscode 200: no error |
|
| 766 |
- :statuscode 404: no such image |
|
| 767 |
- :statuscode 500: server error |
|
| 717 |
+ Return low-level information on the image ``name`` |
|
| 718 |
+ |
|
| 719 |
+ **Example request**: |
|
| 720 |
+ |
|
| 721 |
+ .. sourcecode:: http |
|
| 722 |
+ |
|
| 723 |
+ GET /images/centos/json HTTP/1.1 |
|
| 724 |
+ |
|
| 725 |
+ **Example response**: |
|
| 768 | 726 |
|
| 727 |
+ .. sourcecode:: http |
|
| 728 |
+ |
|
| 729 |
+ HTTP/1.1 200 OK |
|
| 730 |
+ Content-Type: application/json |
|
| 731 |
+ |
|
| 732 |
+ {
|
|
| 733 |
+ "id":"b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc", |
|
| 734 |
+ "parent":"27cf784147099545", |
|
| 735 |
+ "created":"2013-03-23T22:24:18.818426-07:00", |
|
| 736 |
+ "container":"3d67245a8d72ecf13f33dffac9f79dcdf70f75acb84d308770391510e0c23ad0", |
|
| 737 |
+ "container_config": |
|
| 738 |
+ {
|
|
| 739 |
+ "Hostname":"", |
|
| 740 |
+ "User":"", |
|
| 741 |
+ "Memory":0, |
|
| 742 |
+ "MemorySwap":0, |
|
| 743 |
+ "AttachStdin":false, |
|
| 744 |
+ "AttachStdout":false, |
|
| 745 |
+ "AttachStderr":false, |
|
| 746 |
+ "PortSpecs":null, |
|
| 747 |
+ "Tty":true, |
|
| 748 |
+ "OpenStdin":true, |
|
| 749 |
+ "StdinOnce":false, |
|
| 750 |
+ "Env":null, |
|
| 751 |
+ "Cmd": ["/bin/bash"] |
|
| 752 |
+ ,"Dns":null, |
|
| 753 |
+ "Image":"centos", |
|
| 754 |
+ "Volumes":null, |
|
| 755 |
+ "VolumesFrom":"", |
|
| 756 |
+ "WorkingDir":"" |
|
| 757 |
+ }, |
|
| 758 |
+ "Size": 6824592 |
|
| 759 |
+ } |
|
| 760 |
+ |
|
| 761 |
+ :statuscode 200: no error |
|
| 762 |
+ :statuscode 404: no such image |
|
| 763 |
+ :statuscode 500: server error |
|
| 769 | 764 |
|
| 770 | 765 |
Get the history of an image |
| 771 | 766 |
*************************** |
| 772 | 767 |
|
| 773 | 768 |
.. http:get:: /images/(name)/history |
| 774 | 769 |
|
| 775 |
- Return the history of the image ``name`` |
|
| 776 |
- |
|
| 777 |
- **Example request**: |
|
| 778 |
- |
|
| 779 |
- .. sourcecode:: http |
|
| 770 |
+ Return the history of the image ``name`` |
|
| 780 | 771 |
|
| 781 |
- GET /images/fedora/history HTTP/1.1 |
|
| 772 |
+ **Example request**: |
|
| 782 | 773 |
|
| 783 |
- **Example response**: |
|
| 774 |
+ .. sourcecode:: http |
|
| 784 | 775 |
|
| 785 |
- .. sourcecode:: http |
|
| 776 |
+ GET /images/fedora/history HTTP/1.1 |
|
| 786 | 777 |
|
| 787 |
- HTTP/1.1 200 OK |
|
| 788 |
- Content-Type: application/json |
|
| 778 |
+ **Example response**: |
|
| 789 | 779 |
|
| 790 |
- [ |
|
| 791 |
- {
|
|
| 792 |
- "Id":"b750fe79269d", |
|
| 793 |
- "Created":1364102658, |
|
| 794 |
- "CreatedBy":"/bin/bash" |
|
| 795 |
- }, |
|
| 796 |
- {
|
|
| 797 |
- "Id":"27cf78414709", |
|
| 798 |
- "Created":1364068391, |
|
| 799 |
- "CreatedBy":"" |
|
| 800 |
- } |
|
| 801 |
- ] |
|
| 780 |
+ .. sourcecode:: http |
|
| 802 | 781 |
|
| 803 |
- :statuscode 200: no error |
|
| 804 |
- :statuscode 404: no such image |
|
| 805 |
- :statuscode 500: server error |
|
| 782 |
+ HTTP/1.1 200 OK |
|
| 783 |
+ Content-Type: application/json |
|
| 806 | 784 |
|
| 785 |
+ [ |
|
| 786 |
+ {
|
|
| 787 |
+ "Id":"b750fe79269d", |
|
| 788 |
+ "Created":1364102658, |
|
| 789 |
+ "CreatedBy":"/bin/bash" |
|
| 790 |
+ }, |
|
| 791 |
+ {
|
|
| 792 |
+ "Id":"27cf78414709", |
|
| 793 |
+ "Created":1364068391, |
|
| 794 |
+ "CreatedBy":"" |
|
| 795 |
+ } |
|
| 796 |
+ ] |
|
| 797 |
+ |
|
| 798 |
+ :statuscode 200: no error |
|
| 799 |
+ :statuscode 404: no such image |
|
| 800 |
+ :statuscode 500: server error |
|
| 807 | 801 |
|
| 808 | 802 |
Push an image on the registry |
| 809 | 803 |
***************************** |
| 810 | 804 |
|
| 811 | 805 |
.. http:post:: /images/(name)/push |
| 812 | 806 |
|
| 813 |
- Push the image ``name`` on the registry |
|
| 807 |
+ Push the image ``name`` on the registry |
|
| 814 | 808 |
|
| 815 |
- **Example request**: |
|
| 809 |
+ **Example request**: |
|
| 816 | 810 |
|
| 817 |
- .. sourcecode:: http |
|
| 811 |
+ .. sourcecode:: http |
|
| 818 | 812 |
|
| 819 |
- POST /images/test/push HTTP/1.1 |
|
| 813 |
+ POST /images/test/push HTTP/1.1 |
|
| 820 | 814 |
|
| 821 |
- **Example response**: |
|
| 815 |
+ **Example response**: |
|
| 822 | 816 |
|
| 823 |
- .. sourcecode:: http |
|
| 817 |
+ .. sourcecode:: http |
|
| 824 | 818 |
|
| 825 | 819 |
HTTP/1.1 200 OK |
| 826 | 820 |
Content-Type: application/json |
| 827 | 821 |
|
| 828 |
- {"status":"Pushing..."}
|
|
| 829 |
- {"status":"Pushing", "progress":"1/? (n/a)"}
|
|
| 830 |
- {"error":"Invalid..."}
|
|
| 831 |
- ... |
|
| 832 |
- |
|
| 833 |
- The ``X-Registry-Auth`` header can be used to include a |
|
| 834 |
- base64-encoded AuthConfig object. |
|
| 822 |
+ {"status":"Pushing..."}
|
|
| 823 |
+ {"status":"Pushing", "progress":"1/? (n/a)"}
|
|
| 824 |
+ {"error":"Invalid..."}
|
|
| 825 |
+ ... |
|
| 835 | 826 |
|
| 836 |
- :query registry: the registry you wan to push, optional |
|
| 837 |
- :statuscode 200: no error |
|
| 838 |
- :statuscode 404: no such image |
|
| 839 |
- :statuscode 500: server error |
|
| 827 |
+ The ``X-Registry-Auth`` header can be used to include a |
|
| 828 |
+ base64-encoded AuthConfig object. |
|
| 840 | 829 |
|
| 830 |
+ :query registry: the registry you wan to push, optional |
|
| 831 |
+ :statuscode 200: no error |
|
| 832 |
+ :statuscode 404: no such image |
|
| 833 |
+ :statuscode 500: server error |
|
| 841 | 834 |
|
| 842 | 835 |
Tag an image into a repository |
| 843 | 836 |
****************************** |
| 844 | 837 |
|
| 845 | 838 |
.. http:post:: /images/(name)/tag |
| 846 | 839 |
|
| 847 |
- Tag the image ``name`` into a repository |
|
| 840 |
+ Tag the image ``name`` into a repository |
|
| 848 | 841 |
|
| 849 |
- **Example request**: |
|
| 842 |
+ **Example request**: |
|
| 850 | 843 |
|
| 851 |
- .. sourcecode:: http |
|
| 852 |
- |
|
| 853 |
- POST /images/test/tag?repo=myrepo&force=0 HTTP/1.1 |
|
| 844 |
+ .. sourcecode:: http |
|
| 854 | 845 |
|
| 855 |
- **Example response**: |
|
| 846 |
+ POST /images/test/tag?repo=myrepo&force=0 HTTP/1.1 |
|
| 856 | 847 |
|
| 857 |
- .. sourcecode:: http |
|
| 848 |
+ **Example response**: |
|
| 858 | 849 |
|
| 859 |
- HTTP/1.1 200 OK |
|
| 850 |
+ .. sourcecode:: http |
|
| 860 | 851 |
|
| 861 |
- :query repo: The repository to tag in |
|
| 862 |
- :query force: 1/True/true or 0/False/false, default false |
|
| 863 |
- :statuscode 200: no error |
|
| 864 |
- :statuscode 400: bad parameter |
|
| 865 |
- :statuscode 404: no such image |
|
| 866 |
- :statuscode 409: conflict |
|
| 867 |
- :statuscode 500: server error |
|
| 852 |
+ HTTP/1.1 200 OK |
|
| 868 | 853 |
|
| 854 |
+ :query repo: The repository to tag in |
|
| 855 |
+ :query force: 1/True/true or 0/False/false, default false |
|
| 856 |
+ :statuscode 200: no error |
|
| 857 |
+ :statuscode 400: bad parameter |
|
| 858 |
+ :statuscode 404: no such image |
|
| 859 |
+ :statuscode 409: conflict |
|
| 860 |
+ :statuscode 500: server error |
|
| 869 | 861 |
|
| 870 | 862 |
Remove an image |
| 871 | 863 |
*************** |
| 872 | 864 |
|
| 873 | 865 |
.. http:delete:: /images/(name) |
| 874 | 866 |
|
| 875 |
- Remove the image ``name`` from the filesystem |
|
| 876 |
- |
|
| 877 |
- **Example request**: |
|
| 867 |
+ Remove the image ``name`` from the filesystem |
|
| 878 | 868 |
|
| 879 |
- .. sourcecode:: http |
|
| 869 |
+ **Example request**: |
|
| 880 | 870 |
|
| 881 |
- DELETE /images/test HTTP/1.1 |
|
| 871 |
+ .. sourcecode:: http |
|
| 882 | 872 |
|
| 883 |
- **Example response**: |
|
| 873 |
+ DELETE /images/test HTTP/1.1 |
|
| 884 | 874 |
|
| 885 |
- .. sourcecode:: http |
|
| 875 |
+ **Example response**: |
|
| 886 | 876 |
|
| 887 |
- HTTP/1.1 200 OK |
|
| 888 |
- Content-type: application/json |
|
| 877 |
+ .. sourcecode:: http |
|
| 889 | 878 |
|
| 890 |
- [ |
|
| 891 |
- {"Untagged":"3e2f21a89f"},
|
|
| 892 |
- {"Deleted":"3e2f21a89f"},
|
|
| 893 |
- {"Deleted":"53b4f83ac9"}
|
|
| 894 |
- ] |
|
| 879 |
+ HTTP/1.1 200 OK |
|
| 880 |
+ Content-type: application/json |
|
| 895 | 881 |
|
| 896 |
- :statuscode 200: no error |
|
| 897 |
- :statuscode 404: no such image |
|
| 898 |
- :statuscode 409: conflict |
|
| 899 |
- :statuscode 500: server error |
|
| 882 |
+ [ |
|
| 883 |
+ {"Untagged":"3e2f21a89f"},
|
|
| 884 |
+ {"Deleted":"3e2f21a89f"},
|
|
| 885 |
+ {"Deleted":"53b4f83ac9"}
|
|
| 886 |
+ ] |
|
| 900 | 887 |
|
| 888 |
+ :statuscode 200: no error |
|
| 889 |
+ :statuscode 404: no such image |
|
| 890 |
+ :statuscode 409: conflict |
|
| 891 |
+ :statuscode 500: server error |
|
| 901 | 892 |
|
| 902 | 893 |
Search images |
| 903 | 894 |
************* |
| 904 | 895 |
|
| 905 | 896 |
.. http:get:: /images/search |
| 906 | 897 |
|
| 907 |
- Search for an image in the docker index |
|
| 908 |
- |
|
| 909 |
- **Example request**: |
|
| 898 |
+ Search for an image in the docker index |
|
| 910 | 899 |
|
| 911 |
- .. sourcecode:: http |
|
| 900 |
+ **Example request**: |
|
| 912 | 901 |
|
| 913 |
- GET /images/search?term=sshd HTTP/1.1 |
|
| 902 |
+ .. sourcecode:: http |
|
| 914 | 903 |
|
| 915 |
- **Example response**: |
|
| 904 |
+ GET /images/search?term=sshd HTTP/1.1 |
|
| 916 | 905 |
|
| 917 |
- .. sourcecode:: http |
|
| 906 |
+ **Example response**: |
|
| 918 | 907 |
|
| 919 |
- HTTP/1.1 200 OK |
|
| 920 |
- Content-Type: application/json |
|
| 921 |
- |
|
| 922 |
- [ |
|
| 923 |
- {
|
|
| 924 |
- "Name":"cespare/sshd", |
|
| 925 |
- "Description":"" |
|
| 926 |
- }, |
|
| 927 |
- {
|
|
| 928 |
- "Name":"johnfuller/sshd", |
|
| 929 |
- "Description":"" |
|
| 930 |
- }, |
|
| 931 |
- {
|
|
| 932 |
- "Name":"dhrp/mongodb-sshd", |
|
| 933 |
- "Description":"" |
|
| 934 |
- } |
|
| 935 |
- ] |
|
| 908 |
+ .. sourcecode:: http |
|
| 936 | 909 |
|
| 937 |
- :query term: term to search |
|
| 938 |
- :statuscode 200: no error |
|
| 939 |
- :statuscode 500: server error |
|
| 910 |
+ HTTP/1.1 200 OK |
|
| 911 |
+ Content-Type: application/json |
|
| 940 | 912 |
|
| 913 |
+ [ |
|
| 914 |
+ {
|
|
| 915 |
+ "Name":"cespare/sshd", |
|
| 916 |
+ "Description":"" |
|
| 917 |
+ }, |
|
| 918 |
+ {
|
|
| 919 |
+ "Name":"johnfuller/sshd", |
|
| 920 |
+ "Description":"" |
|
| 921 |
+ }, |
|
| 922 |
+ {
|
|
| 923 |
+ "Name":"dhrp/mongodb-sshd", |
|
| 924 |
+ "Description":"" |
|
| 925 |
+ } |
|
| 926 |
+ ] |
|
| 927 |
+ |
|
| 928 |
+ :query term: term to search |
|
| 929 |
+ :statuscode 200: no error |
|
| 930 |
+ :statuscode 500: server error |
|
| 941 | 931 |
|
| 942 | 932 |
2.3 Misc |
| 943 | 933 |
-------- |
| ... | ... |
@@ -947,199 +919,192 @@ Build an image from Dockerfile via stdin |
| 947 | 947 |
|
| 948 | 948 |
.. http:post:: /build |
| 949 | 949 |
|
| 950 |
- Build an image from Dockerfile via stdin |
|
| 951 |
- |
|
| 952 |
- **Example request**: |
|
| 953 |
- |
|
| 954 |
- .. sourcecode:: http |
|
| 950 |
+ Build an image from Dockerfile via stdin |
|
| 955 | 951 |
|
| 956 |
- POST /build HTTP/1.1 |
|
| 952 |
+ **Example request**: |
|
| 957 | 953 |
|
| 958 |
- {{ STREAM }}
|
|
| 954 |
+ .. sourcecode:: http |
|
| 959 | 955 |
|
| 960 |
- **Example response**: |
|
| 956 |
+ POST /build HTTP/1.1 |
|
| 961 | 957 |
|
| 962 |
- .. sourcecode:: http |
|
| 958 |
+ {{ STREAM }}
|
|
| 963 | 959 |
|
| 964 |
- HTTP/1.1 200 OK |
|
| 960 |
+ **Example response**: |
|
| 965 | 961 |
|
| 966 |
- {{ STREAM }}
|
|
| 962 |
+ .. sourcecode:: http |
|
| 967 | 963 |
|
| 964 |
+ HTTP/1.1 200 OK |
|
| 968 | 965 |
|
| 969 |
- The stream must be a tar archive compressed with one of the following algorithms: |
|
| 970 |
- identity (no compression), gzip, bzip2, xz. The archive must include a file called |
|
| 971 |
- `Dockerfile` at its root. It may include any number of other files, which will be |
|
| 972 |
- accessible in the build context (See the ADD build command). |
|
| 966 |
+ {{ STREAM }}
|
|
| 973 | 967 |
|
| 974 |
- The Content-type header should be set to "application/tar". |
|
| 968 |
+ The stream must be a tar archive compressed with one of the following algorithms: |
|
| 969 |
+ identity (no compression), gzip, bzip2, xz. The archive must include a file called |
|
| 970 |
+ `Dockerfile` at its root. It may include any number of other files, which will be |
|
| 971 |
+ accessible in the build context (See the ADD build command). |
|
| 975 | 972 |
|
| 976 |
- :query t: repository name (and optionally a tag) to be applied to the resulting image in case of success |
|
| 977 |
- :query q: suppress verbose build output |
|
| 978 |
- :query nocache: do not use the cache when building the image |
|
| 979 |
- :query rm: remove intermediate containers after a successful build |
|
| 980 |
- :statuscode 200: no error |
|
| 981 |
- :statuscode 500: server error |
|
| 973 |
+ The Content-type header should be set to "application/tar". |
|
| 982 | 974 |
|
| 975 |
+ :query t: repository name (and optionally a tag) to be applied to the resulting image in case of success |
|
| 976 |
+ :query q: suppress verbose build output |
|
| 977 |
+ :query nocache: do not use the cache when building the image |
|
| 978 |
+ :query rm: remove intermediate containers after a successful build |
|
| 979 |
+ :statuscode 200: no error |
|
| 980 |
+ :statuscode 500: server error |
|
| 983 | 981 |
|
| 984 | 982 |
Check auth configuration |
| 985 | 983 |
************************ |
| 986 | 984 |
|
| 987 | 985 |
.. http:post:: /auth |
| 988 | 986 |
|
| 989 |
- Get the default username and email |
|
| 990 |
- |
|
| 991 |
- **Example request**: |
|
| 987 |
+ Get the default username and email |
|
| 992 | 988 |
|
| 993 |
- .. sourcecode:: http |
|
| 989 |
+ **Example request**: |
|
| 994 | 990 |
|
| 995 |
- POST /auth HTTP/1.1 |
|
| 996 |
- Content-Type: application/json |
|
| 991 |
+ .. sourcecode:: http |
|
| 997 | 992 |
|
| 998 |
- {
|
|
| 999 |
- "username":"hannibal", |
|
| 1000 |
- "password:"xxxx", |
|
| 1001 |
- "email":"hannibal@a-team.com", |
|
| 1002 |
- "serveraddress":"https://index.docker.io/v1/" |
|
| 1003 |
- } |
|
| 993 |
+ POST /auth HTTP/1.1 |
|
| 994 |
+ Content-Type: application/json |
|
| 1004 | 995 |
|
| 1005 |
- **Example response**: |
|
| 996 |
+ {
|
|
| 997 |
+ "username":"hannibal", |
|
| 998 |
+ "password:"xxxx", |
|
| 999 |
+ "email":"hannibal@a-team.com", |
|
| 1000 |
+ "serveraddress":"https://index.docker.io/v1/" |
|
| 1001 |
+ } |
|
| 1006 | 1002 |
|
| 1007 |
- .. sourcecode:: http |
|
| 1003 |
+ **Example response**: |
|
| 1008 | 1004 |
|
| 1009 |
- HTTP/1.1 200 OK |
|
| 1005 |
+ .. sourcecode:: http |
|
| 1010 | 1006 |
|
| 1011 |
- :statuscode 200: no error |
|
| 1012 |
- :statuscode 204: no error |
|
| 1013 |
- :statuscode 500: server error |
|
| 1007 |
+ HTTP/1.1 200 OK |
|
| 1014 | 1008 |
|
| 1009 |
+ :statuscode 200: no error |
|
| 1010 |
+ :statuscode 204: no error |
|
| 1011 |
+ :statuscode 500: server error |
|
| 1015 | 1012 |
|
| 1016 | 1013 |
Display system-wide information |
| 1017 | 1014 |
******************************* |
| 1018 | 1015 |
|
| 1019 | 1016 |
.. http:get:: /info |
| 1020 | 1017 |
|
| 1021 |
- Display system-wide information |
|
| 1022 |
- |
|
| 1023 |
- **Example request**: |
|
| 1018 |
+ Display system-wide information |
|
| 1024 | 1019 |
|
| 1025 |
- .. sourcecode:: http |
|
| 1020 |
+ **Example request**: |
|
| 1026 | 1021 |
|
| 1027 |
- GET /info HTTP/1.1 |
|
| 1022 |
+ .. sourcecode:: http |
|
| 1028 | 1023 |
|
| 1029 |
- **Example response**: |
|
| 1024 |
+ GET /info HTTP/1.1 |
|
| 1030 | 1025 |
|
| 1031 |
- .. sourcecode:: http |
|
| 1026 |
+ **Example response**: |
|
| 1032 | 1027 |
|
| 1033 |
- HTTP/1.1 200 OK |
|
| 1034 |
- Content-Type: application/json |
|
| 1028 |
+ .. sourcecode:: http |
|
| 1035 | 1029 |
|
| 1036 |
- {
|
|
| 1037 |
- "Containers":11, |
|
| 1038 |
- "Images":16, |
|
| 1039 |
- "Debug":false, |
|
| 1040 |
- "NFd": 11, |
|
| 1041 |
- "NGoroutines":21, |
|
| 1042 |
- "MemoryLimit":true, |
|
| 1043 |
- "SwapLimit":false, |
|
| 1044 |
- "IPv4Forwarding":true |
|
| 1045 |
- } |
|
| 1030 |
+ HTTP/1.1 200 OK |
|
| 1031 |
+ Content-Type: application/json |
|
| 1046 | 1032 |
|
| 1047 |
- :statuscode 200: no error |
|
| 1048 |
- :statuscode 500: server error |
|
| 1033 |
+ {
|
|
| 1034 |
+ "Containers":11, |
|
| 1035 |
+ "Images":16, |
|
| 1036 |
+ "Debug":false, |
|
| 1037 |
+ "NFd": 11, |
|
| 1038 |
+ "NGoroutines":21, |
|
| 1039 |
+ "MemoryLimit":true, |
|
| 1040 |
+ "SwapLimit":false, |
|
| 1041 |
+ "IPv4Forwarding":true |
|
| 1042 |
+ } |
|
| 1049 | 1043 |
|
| 1044 |
+ :statuscode 200: no error |
|
| 1045 |
+ :statuscode 500: server error |
|
| 1050 | 1046 |
|
| 1051 | 1047 |
Show the docker version information |
| 1052 | 1048 |
*********************************** |
| 1053 | 1049 |
|
| 1054 | 1050 |
.. http:get:: /version |
| 1055 | 1051 |
|
| 1056 |
- Show the docker version information |
|
| 1052 |
+ Show the docker version information |
|
| 1057 | 1053 |
|
| 1058 |
- **Example request**: |
|
| 1054 |
+ **Example request**: |
|
| 1059 | 1055 |
|
| 1060 |
- .. sourcecode:: http |
|
| 1056 |
+ .. sourcecode:: http |
|
| 1061 | 1057 |
|
| 1062 |
- GET /version HTTP/1.1 |
|
| 1058 |
+ GET /version HTTP/1.1 |
|
| 1063 | 1059 |
|
| 1064 |
- **Example response**: |
|
| 1060 |
+ **Example response**: |
|
| 1065 | 1061 |
|
| 1066 |
- .. sourcecode:: http |
|
| 1062 |
+ .. sourcecode:: http |
|
| 1067 | 1063 |
|
| 1068 |
- HTTP/1.1 200 OK |
|
| 1069 |
- Content-Type: application/json |
|
| 1070 |
- |
|
| 1071 |
- {
|
|
| 1072 |
- "Version":"0.2.2", |
|
| 1073 |
- "GitCommit":"5a2a5cc+CHANGES", |
|
| 1074 |
- "GoVersion":"go1.0.3" |
|
| 1075 |
- } |
|
| 1064 |
+ HTTP/1.1 200 OK |
|
| 1065 |
+ Content-Type: application/json |
|
| 1076 | 1066 |
|
| 1077 |
- :statuscode 200: no error |
|
| 1078 |
- :statuscode 500: server error |
|
| 1067 |
+ {
|
|
| 1068 |
+ "Version":"0.2.2", |
|
| 1069 |
+ "GitCommit":"5a2a5cc+CHANGES", |
|
| 1070 |
+ "GoVersion":"go1.0.3" |
|
| 1071 |
+ } |
|
| 1079 | 1072 |
|
| 1073 |
+ :statuscode 200: no error |
|
| 1074 |
+ :statuscode 500: server error |
|
| 1080 | 1075 |
|
| 1081 | 1076 |
Create a new image from a container's changes |
| 1082 | 1077 |
********************************************* |
| 1083 | 1078 |
|
| 1084 | 1079 |
.. http:post:: /commit |
| 1085 | 1080 |
|
| 1086 |
- Create a new image from a container's changes |
|
| 1081 |
+ Create a new image from a container's changes |
|
| 1087 | 1082 |
|
| 1088 |
- **Example request**: |
|
| 1083 |
+ **Example request**: |
|
| 1089 | 1084 |
|
| 1090 |
- .. sourcecode:: http |
|
| 1085 |
+ .. sourcecode:: http |
|
| 1091 | 1086 |
|
| 1092 |
- POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 |
|
| 1087 |
+ POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1 |
|
| 1093 | 1088 |
|
| 1094 |
- **Example response**: |
|
| 1089 |
+ **Example response**: |
|
| 1095 | 1090 |
|
| 1096 |
- .. sourcecode:: http |
|
| 1091 |
+ .. sourcecode:: http |
|
| 1097 | 1092 |
|
| 1098 |
- HTTP/1.1 201 OK |
|
| 1099 |
- Content-Type: application/vnd.docker.raw-stream |
|
| 1093 |
+ HTTP/1.1 201 OK |
|
| 1094 |
+ Content-Type: application/vnd.docker.raw-stream |
|
| 1100 | 1095 |
|
| 1101 |
- {"Id":"596069db4bf5"}
|
|
| 1102 |
- |
|
| 1103 |
- :query container: source container |
|
| 1104 |
- :query repo: repository |
|
| 1105 |
- :query tag: tag |
|
| 1106 |
- :query m: commit message |
|
| 1107 |
- :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") |
|
| 1108 |
- :query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
|
|
| 1109 |
- :statuscode 201: no error |
|
| 1110 |
- :statuscode 404: no such container |
|
| 1111 |
- :statuscode 500: server error |
|
| 1096 |
+ {"Id":"596069db4bf5"}
|
|
| 1112 | 1097 |
|
| 1098 |
+ :query container: source container |
|
| 1099 |
+ :query repo: repository |
|
| 1100 |
+ :query tag: tag |
|
| 1101 |
+ :query m: commit message |
|
| 1102 |
+ :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>") |
|
| 1103 |
+ :query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
|
|
| 1104 |
+ :statuscode 201: no error |
|
| 1105 |
+ :statuscode 404: no such container |
|
| 1106 |
+ :statuscode 500: server error |
|
| 1113 | 1107 |
|
| 1114 | 1108 |
Monitor Docker's events |
| 1115 | 1109 |
*********************** |
| 1116 | 1110 |
|
| 1117 | 1111 |
.. http:get:: /events |
| 1118 | 1112 |
|
| 1119 |
- Get events from docker, either in real time via streaming, or via polling (using `since`) |
|
| 1120 |
- |
|
| 1121 |
- **Example request**: |
|
| 1113 |
+ Get events from docker, either in real time via streaming, or via polling (using `since`) |
|
| 1122 | 1114 |
|
| 1123 |
- .. sourcecode:: http |
|
| 1115 |
+ **Example request**: |
|
| 1124 | 1116 |
|
| 1125 |
- POST /events?since=1374067924 |
|
| 1117 |
+ .. sourcecode:: http |
|
| 1126 | 1118 |
|
| 1127 |
- **Example response**: |
|
| 1119 |
+ POST /events?since=1374067924 |
|
| 1128 | 1120 |
|
| 1129 |
- .. sourcecode:: http |
|
| 1121 |
+ **Example response**: |
|
| 1130 | 1122 |
|
| 1131 |
- HTTP/1.1 200 OK |
|
| 1132 |
- Content-Type: application/json |
|
| 1123 |
+ .. sourcecode:: http |
|
| 1133 | 1124 |
|
| 1134 |
- {"status":"create","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067924}
|
|
| 1135 |
- {"status":"start","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067924}
|
|
| 1136 |
- {"status":"stop","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067966}
|
|
| 1137 |
- {"status":"destroy","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067970}
|
|
| 1125 |
+ HTTP/1.1 200 OK |
|
| 1126 |
+ Content-Type: application/json |
|
| 1138 | 1127 |
|
| 1139 |
- :query since: timestamp used for polling |
|
| 1140 |
- :statuscode 200: no error |
|
| 1141 |
- :statuscode 500: server error |
|
| 1128 |
+ {"status":"create","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067924}
|
|
| 1129 |
+ {"status":"start","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067924}
|
|
| 1130 |
+ {"status":"stop","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067966}
|
|
| 1131 |
+ {"status":"destroy","id":"dfdf82bd3881","from":"ubuntu:latest","time":1374067970}
|
|
| 1142 | 1132 |
|
| 1133 |
+ :query since: timestamp used for polling |
|
| 1134 |
+ :statuscode 200: no error |
|
| 1135 |
+ :statuscode 500: server error |
|
| 1143 | 1136 |
|
| 1144 | 1137 |
3. Going further |
| 1145 | 1138 |
================ |
| ... | ... |
@@ -1151,14 +1116,13 @@ Here are the steps of 'docker run' : |
| 1151 | 1151 |
|
| 1152 | 1152 |
* Create the container |
| 1153 | 1153 |
* If the status code is 404, it means the image doesn't exists: |
| 1154 |
- * Try to pull it |
|
| 1155 |
- * Then retry to create the container |
|
| 1154 |
+ * Try to pull it |
|
| 1155 |
+ * Then retry to create the container |
|
| 1156 | 1156 |
* Start the container |
| 1157 | 1157 |
* If you are not in detached mode: |
| 1158 |
- * Attach to the container, using logs=1 (to have stdout and stderr from the container's start) and stream=1 |
|
| 1158 |
+ * Attach to the container, using logs=1 (to have stdout and stderr from the container's start) and stream=1 |
|
| 1159 | 1159 |
* If in detached mode or only stdin is attached: |
| 1160 |
- * Display the container's id |
|
| 1161 |
- |
|
| 1160 |
+ * Display the container's id |
|
| 1162 | 1161 |
|
| 1163 | 1162 |
3.2 Hijacking |
| 1164 | 1163 |
------------- |
| ... | ... |
@@ -1172,5 +1136,4 @@ To enable cross origin requests to the remote api add the flag "-api-enable-cors |
| 1172 | 1172 |
|
| 1173 | 1173 |
.. code-block:: bash |
| 1174 | 1174 |
|
| 1175 |
- docker -d -H="192.168.1.9:4243" -api-enable-cors |
|
| 1176 |
- |
|
| 1175 |
+ docker -d -H="192.168.1.9:4243" -api-enable-cors |