Add back the "old" networksettings fields that were removed,
but added back to maintain backward compatibility, in
https://github.com/docker/docker/pull/17538
Update network endpoint responses, with updated response
introduced in;
https://github.com/docker/docker/pull/17536
Added changes to v1.22 that were applied to the v1.21 / v1.20 docs
after the API bump(s);
https://github.com/docker/docker/pull/17085
https://github.com/docker/docker/pull/17127
https://github.com/docker/docker/pull/13707
Also fixed some mixed tab/spaces indentation
and Markdown formatting issues (causing code-blocks to
be rendered incorrectly)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 286fe69d5376add77dc31833dc3c2fcc9639dd17)
Conflicts:
docs/reference/api/docker_remote_api_v1.22.md
... | ... |
@@ -111,6 +111,16 @@ list of DNS options to be used in the container. |
111 | 111 |
* `GET /containers/json` will return `ImageID` of the image used by container. |
112 | 112 |
* `POST /exec/(name)/start` will now return an HTTP 409 when the container is either stopped or paused. |
113 | 113 |
* `GET /containers/(name)/json` now accepts a `size` parameter. Setting this parameter to '1' returns container size information in the `SizeRw` and `SizeRootFs` fields. |
114 |
+* `GET /containers/(name)/json` now returns a `NetworkSettings.Networks` field, |
|
115 |
+ detailing network settings per network. This field deprecates the |
|
116 |
+ `NetworkSettings.Gateway`, `NetworkSettings.IPAddress`, |
|
117 |
+ `NetworkSettings.IPPrefixLen`, and `NetworkSettings.MacAddress` fields, which |
|
118 |
+ are still returned for backward-compatibility, but will be removed in a future version. |
|
119 |
+* `GET /exec/(id)/json` now returns a `NetworkSettings.Networks` field, |
|
120 |
+ detailing networksettings per network. This field deprecates the |
|
121 |
+ `NetworkSettings.Gateway`, `NetworkSettings.IPAddress`, |
|
122 |
+ `NetworkSettings.IPPrefixLen`, and `NetworkSettings.MacAddress` fields, which |
|
123 |
+ are still returned for backward-compatibility, but will be removed in a future version. |
|
114 | 124 |
|
115 | 125 |
### v1.20 API changes |
116 | 126 |
|
... | ... |
@@ -217,7 +217,7 @@ Json Parameters: |
217 | 217 |
for the container. |
218 | 218 |
- **User** - A string value specifying the user inside the container. |
219 | 219 |
- **Memory** - Memory limit in bytes. |
220 |
-- **MemorySwap**- Total memory limit (memory + swap); set `-1` to disable swap |
|
220 |
+- **MemorySwap** - Total memory limit (memory + swap); set `-1` to disable swap |
|
221 | 221 |
You must use this with `memory` and make the swap value larger than `memory`. |
222 | 222 |
- **CpuShares** - An integer value containing the container's CPU Shares |
223 | 223 |
(ie. the relative weight vs other containers). |
... | ... |
@@ -2141,12 +2141,12 @@ Status Codes: |
2141 | 2141 |
|
2142 | 2142 |
`POST /exec/(id)/resize` |
2143 | 2143 |
|
2144 |
-Resizes the `tty` session used by the `exec` command `id`. |
|
2144 |
+Resizes the `tty` session used by the `exec` command `id`. The unit is number of characters. |
|
2145 | 2145 |
This API is valid only if `tty` was specified as part of creating and starting the `exec` command. |
2146 | 2146 |
|
2147 | 2147 |
**Example request**: |
2148 | 2148 |
|
2149 |
- POST /exec/e90e34656806/resize HTTP/1.1 |
|
2149 |
+ POST /exec/e90e34656806/resize?h=40&w=80 HTTP/1.1 |
|
2150 | 2150 |
Content-Type: text/plain |
2151 | 2151 |
|
2152 | 2152 |
**Example response**: |
... | ... |
@@ -2257,7 +2257,7 @@ Return low-level information about the `exec` command `id`. |
2257 | 2257 |
"ProcessLabel" : "", |
2258 | 2258 |
"AppArmorProfile" : "", |
2259 | 2259 |
"RestartCount" : 0, |
2260 |
- "Mounts" : [], |
|
2260 |
+ "Mounts" : [] |
|
2261 | 2261 |
} |
2262 | 2262 |
} |
2263 | 2263 |
|
... | ... |
@@ -46,7 +46,7 @@ List containers |
46 | 46 |
"Id": "8dfafdbc3a40", |
47 | 47 |
"Names":["/boring_feynman"], |
48 | 48 |
"Image": "ubuntu:latest", |
49 |
- "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
49 |
+ "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
50 | 50 |
"Command": "echo 1", |
51 | 51 |
"Created": 1367854155, |
52 | 52 |
"Status": "Exit 0", |
... | ... |
@@ -63,7 +63,7 @@ List containers |
63 | 63 |
"Id": "9cd87474be90", |
64 | 64 |
"Names":["/coolName"], |
65 | 65 |
"Image": "ubuntu:latest", |
66 |
- "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
66 |
+ "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
67 | 67 |
"Command": "echo 222222", |
68 | 68 |
"Created": 1367854155, |
69 | 69 |
"Status": "Exit 0", |
... | ... |
@@ -76,7 +76,7 @@ List containers |
76 | 76 |
"Id": "3176a2479c92", |
77 | 77 |
"Names":["/sleepy_dog"], |
78 | 78 |
"Image": "ubuntu:latest", |
79 |
- "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
79 |
+ "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
80 | 80 |
"Command": "echo 3333333333333333", |
81 | 81 |
"Created": 1367854154, |
82 | 82 |
"Status": "Exit 0", |
... | ... |
@@ -89,7 +89,7 @@ List containers |
89 | 89 |
"Id": "4cb07b47f9fb", |
90 | 90 |
"Names":["/running_cat"], |
91 | 91 |
"Image": "ubuntu:latest", |
92 |
- "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
92 |
+ "ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82", |
|
93 | 93 |
"Command": "echo 444444444444444444444444444444444", |
94 | 94 |
"Created": 1367854152, |
95 | 95 |
"Status": "Exit 0", |
... | ... |
@@ -204,7 +204,7 @@ Create a container |
204 | 204 |
"LogConfig": { "Type": "json-file", "Config": {} }, |
205 | 205 |
"SecurityOpt": [""], |
206 | 206 |
"CgroupParent": "", |
207 |
- "VolumeDriver": "" |
|
207 |
+ "VolumeDriver": "" |
|
208 | 208 |
} |
209 | 209 |
} |
210 | 210 |
|
... | ... |
@@ -439,15 +439,23 @@ Return low-level information on the container `id` |
439 | 439 |
"HairpinMode": false, |
440 | 440 |
"LinkLocalIPv6Address": "", |
441 | 441 |
"LinkLocalIPv6PrefixLen": 0, |
442 |
- "SandboxKey": "", |
|
443 |
- "SecondaryIPAddresses": [], |
|
444 |
- "SecondaryIPv6Addresses": [], |
|
445 | 442 |
"Ports": null, |
443 |
+ "SandboxKey": "", |
|
444 |
+ "SecondaryIPAddresses": null, |
|
445 |
+ "SecondaryIPv6Addresses": null, |
|
446 |
+ "EndpointID": "", |
|
447 |
+ "Gateway": "", |
|
448 |
+ "GlobalIPv6Address": "", |
|
449 |
+ "GlobalIPv6PrefixLen": 0, |
|
450 |
+ "IPAddress": "", |
|
451 |
+ "IPPrefixLen": 0, |
|
452 |
+ "IPv6Gateway": "", |
|
453 |
+ "MacAddress": "", |
|
446 | 454 |
"Networks": { |
447 | 455 |
"bridge": { |
448 | 456 |
"EndpointID": "", |
449 | 457 |
"Gateway": "", |
450 |
- "IPAdress": "", |
|
458 |
+ "IPAddress": "", |
|
451 | 459 |
"IPPrefixLen": 0, |
452 | 460 |
"IPv6Gateway": "", |
453 | 461 |
"GlobalIPv6Address": "", |
... | ... |
@@ -560,7 +568,7 @@ Status Codes: |
560 | 560 |
Get `stdout` and `stderr` logs from the container ``id`` |
561 | 561 |
|
562 | 562 |
> **Note**: |
563 |
-> This endpoint works only for containers with `json-file` logging driver. |
|
563 |
+> This endpoint works only for containers with the `json-file` or `journald` logging drivers. |
|
564 | 564 |
|
565 | 565 |
**Example request**: |
566 | 566 |
|
... | ... |
@@ -1242,14 +1250,14 @@ Query Parameters: |
1242 | 1242 |
|
1243 | 1243 |
**Example request**: |
1244 | 1244 |
|
1245 |
- PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1 |
|
1246 |
- Content-Type: application/x-tar |
|
1245 |
+ PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1 |
|
1246 |
+ Content-Type: application/x-tar |
|
1247 | 1247 |
|
1248 |
- {{ TAR STREAM }} |
|
1248 |
+ {{ TAR STREAM }} |
|
1249 | 1249 |
|
1250 | 1250 |
**Example response**: |
1251 | 1251 |
|
1252 |
- HTTP/1.1 200 OK |
|
1252 |
+ HTTP/1.1 200 OK |
|
1253 | 1253 |
|
1254 | 1254 |
Status Codes: |
1255 | 1255 |
|
... | ... |
@@ -2381,29 +2389,37 @@ Return low-level information about the `exec` command `id`. |
2381 | 2381 |
"SecurityOpt" : null |
2382 | 2382 |
}, |
2383 | 2383 |
"Image" : "5506de2b643be1e6febbf3b8a240760c6843244c41e12aa2f60ccbb7153d17f5", |
2384 |
- "NetworkSettings": { |
|
2385 |
- "Bridge": "", |
|
2386 |
- "SandboxID": "", |
|
2387 |
- "HairpinMode": false, |
|
2388 |
- "LinkLocalIPv6Address": "", |
|
2389 |
- "LinkLocalIPv6PrefixLen": 0, |
|
2390 |
- "SandboxKey": "", |
|
2391 |
- "SecondaryIPAddresses": [], |
|
2392 |
- "SecondaryIPv6Addresses": [], |
|
2393 |
- "Ports": null, |
|
2394 |
- "Networks": { |
|
2395 |
- "bridge": { |
|
2396 |
- "EndpointID": "", |
|
2397 |
- "Gateway": "", |
|
2398 |
- "IPAdress": "", |
|
2399 |
- "IPPrefixLen": 0, |
|
2400 |
- "IPv6Gateway": "", |
|
2401 |
- "GlobalIPv6Address": "", |
|
2402 |
- "GlobalIPv6PrefixLen": 0, |
|
2403 |
- "MacAddress": "" |
|
2404 |
- } |
|
2405 |
- } |
|
2406 |
- }, |
|
2384 |
+ "NetworkSettings": { |
|
2385 |
+ "Bridge": "", |
|
2386 |
+ "SandboxID": "", |
|
2387 |
+ "HairpinMode": false, |
|
2388 |
+ "LinkLocalIPv6Address": "", |
|
2389 |
+ "LinkLocalIPv6PrefixLen": 0, |
|
2390 |
+ "Ports": null, |
|
2391 |
+ "SandboxKey": "", |
|
2392 |
+ "SecondaryIPAddresses": null, |
|
2393 |
+ "SecondaryIPv6Addresses": null, |
|
2394 |
+ "EndpointID": "", |
|
2395 |
+ "Gateway": "", |
|
2396 |
+ "GlobalIPv6Address": "", |
|
2397 |
+ "GlobalIPv6PrefixLen": 0, |
|
2398 |
+ "IPAddress": "", |
|
2399 |
+ "IPPrefixLen": 0, |
|
2400 |
+ "IPv6Gateway": "", |
|
2401 |
+ "MacAddress": "", |
|
2402 |
+ "Networks": { |
|
2403 |
+ "bridge": { |
|
2404 |
+ "EndpointID": "", |
|
2405 |
+ "Gateway": "", |
|
2406 |
+ "IPAddress": "", |
|
2407 |
+ "IPPrefixLen": 0, |
|
2408 |
+ "IPv6Gateway": "", |
|
2409 |
+ "GlobalIPv6Address": "", |
|
2410 |
+ "GlobalIPv6PrefixLen": 0, |
|
2411 |
+ "MacAddress": "" |
|
2412 |
+ } |
|
2413 |
+ } |
|
2414 |
+ }, |
|
2407 | 2415 |
"ResolvConfPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/resolv.conf", |
2408 | 2416 |
"HostnamePath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/hostname", |
2409 | 2417 |
"HostsPath" : "/var/lib/docker/containers/8f177a186b977fb451136e0fdf182abff5599a08b3c7f6ef0d36a55aaf89634c/hosts", |
... | ... |
@@ -2433,22 +2449,22 @@ Status Codes: |
2433 | 2433 |
|
2434 | 2434 |
**Example request**: |
2435 | 2435 |
|
2436 |
- GET /volumes HTTP/1.1 |
|
2436 |
+ GET /volumes HTTP/1.1 |
|
2437 | 2437 |
|
2438 | 2438 |
**Example response**: |
2439 | 2439 |
|
2440 |
- HTTP/1.1 200 OK |
|
2441 |
- Content-Type: application/json |
|
2440 |
+ HTTP/1.1 200 OK |
|
2441 |
+ Content-Type: application/json |
|
2442 | 2442 |
|
2443 |
- { |
|
2444 |
- "Volumes": [ |
|
2445 |
- { |
|
2446 |
- "Name": "tardis", |
|
2447 |
- "Driver": "local", |
|
2448 |
- "Mountpoint": "/var/lib/docker/volumes/tardis" |
|
2449 |
- } |
|
2450 |
- ] |
|
2451 |
- } |
|
2443 |
+ { |
|
2444 |
+ "Volumes": [ |
|
2445 |
+ { |
|
2446 |
+ "Name": "tardis", |
|
2447 |
+ "Driver": "local", |
|
2448 |
+ "Mountpoint": "/var/lib/docker/volumes/tardis" |
|
2449 |
+ } |
|
2450 |
+ ] |
|
2451 |
+ } |
|
2452 | 2452 |
|
2453 | 2453 |
Query Parameters: |
2454 | 2454 |
|
... | ... |
@@ -2467,23 +2483,23 @@ Create a volume |
2467 | 2467 |
|
2468 | 2468 |
**Example request**: |
2469 | 2469 |
|
2470 |
- POST /volumes/create HTTP/1.1 |
|
2471 |
- Content-Type: application/json |
|
2470 |
+ POST /volumes/create HTTP/1.1 |
|
2471 |
+ Content-Type: application/json |
|
2472 | 2472 |
|
2473 |
- { |
|
2474 |
- "Name": "tardis" |
|
2475 |
- } |
|
2473 |
+ { |
|
2474 |
+ "Name": "tardis" |
|
2475 |
+ } |
|
2476 | 2476 |
|
2477 | 2477 |
**Example response**: |
2478 | 2478 |
|
2479 |
- HTTP/1.1 201 Created |
|
2480 |
- Content-Type: application/json |
|
2479 |
+ HTTP/1.1 201 Created |
|
2480 |
+ Content-Type: application/json |
|
2481 | 2481 |
|
2482 |
- { |
|
2483 |
- "Name": "tardis" |
|
2484 |
- "Driver": "local", |
|
2485 |
- "Mountpoint": "/var/lib/docker/volumes/tardis" |
|
2486 |
- } |
|
2482 |
+ { |
|
2483 |
+ "Name": "tardis", |
|
2484 |
+ "Driver": "local", |
|
2485 |
+ "Mountpoint": "/var/lib/docker/volumes/tardis" |
|
2486 |
+ } |
|
2487 | 2487 |
|
2488 | 2488 |
Status Codes: |
2489 | 2489 |
|
... | ... |
@@ -2509,14 +2525,14 @@ Return low-level information on the volume `name` |
2509 | 2509 |
|
2510 | 2510 |
**Example response**: |
2511 | 2511 |
|
2512 |
- HTTP/1.1 200 OK |
|
2513 |
- Content-Type: application/json |
|
2512 |
+ HTTP/1.1 200 OK |
|
2513 |
+ Content-Type: application/json |
|
2514 | 2514 |
|
2515 |
- { |
|
2516 |
- "Name": "tardis", |
|
2517 |
- "Driver": "local", |
|
2518 |
- "Mountpoint": "/var/lib/docker/volumes/tardis" |
|
2519 |
- } |
|
2515 |
+ { |
|
2516 |
+ "Name": "tardis", |
|
2517 |
+ "Driver": "local", |
|
2518 |
+ "Mountpoint": "/var/lib/docker/volumes/tardis" |
|
2519 |
+ } |
|
2520 | 2520 |
|
2521 | 2521 |
Status Codes: |
2522 | 2522 |
|
... | ... |
@@ -2532,11 +2548,11 @@ Instruct the driver to remove the volume (`name`). |
2532 | 2532 |
|
2533 | 2533 |
**Example request**: |
2534 | 2534 |
|
2535 |
- DELETE /volumes/local/tardis HTTP/1.1 |
|
2535 |
+ DELETE /volumes/local/tardis HTTP/1.1 |
|
2536 | 2536 |
|
2537 | 2537 |
**Example response**: |
2538 | 2538 |
|
2539 |
- HTTP/1.1 204 No Content |
|
2539 |
+ HTTP/1.1 204 No Content |
|
2540 | 2540 |
|
2541 | 2541 |
Status Codes |
2542 | 2542 |
|
... | ... |
@@ -2553,34 +2569,70 @@ Status Codes |
2553 | 2553 |
|
2554 | 2554 |
**Example request**: |
2555 | 2555 |
|
2556 |
- GET /networks HTTP/1.1 |
|
2556 |
+ GET /networks HTTP/1.1 |
|
2557 | 2557 |
|
2558 | 2558 |
**Example response**: |
2559 | 2559 |
|
2560 |
- HTTP/1.1 200 OK |
|
2561 |
- Content-Type: application/json |
|
2562 |
- |
|
2563 | 2560 |
``` |
2564 |
- [ |
|
2565 |
- { |
|
2566 |
- "name": "bridge", |
|
2567 |
- "id": "f995e41e471c833266786a64df584fbe4dc654ac99f63a4ee7495842aa093fc4", |
|
2568 |
- "driver": "bridge", |
|
2569 |
- "containers": {} |
|
2561 |
+HTTP/1.1 200 OK |
|
2562 |
+Content-Type: application/json |
|
2563 |
+ |
|
2564 |
+[ |
|
2565 |
+ { |
|
2566 |
+ "Name": "bridge", |
|
2567 |
+ "Id": "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566", |
|
2568 |
+ "Scope": "local", |
|
2569 |
+ "Driver": "bridge", |
|
2570 |
+ "IPAM": { |
|
2571 |
+ "Driver": "default", |
|
2572 |
+ "Config": [ |
|
2573 |
+ { |
|
2574 |
+ "Subnet": "172.17.0.0/16" |
|
2575 |
+ } |
|
2576 |
+ ] |
|
2570 | 2577 |
}, |
2571 |
- { |
|
2572 |
- "name": "none", |
|
2573 |
- "id": "21e34df9b29c74ae45ba312f8e9f83c02433c9a877cfebebcf57be78f69b77c8", |
|
2574 |
- "driver": "null", |
|
2575 |
- "containers": {} |
|
2578 |
+ "Containers": { |
|
2579 |
+ "39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867": { |
|
2580 |
+ "EndpointID": "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda", |
|
2581 |
+ "MacAddress": "02:42:ac:11:00:02", |
|
2582 |
+ "IPv4Address": "172.17.0.2/16", |
|
2583 |
+ "IPv6Address": "" |
|
2584 |
+ } |
|
2576 | 2585 |
}, |
2577 |
- { |
|
2578 |
- "name": "host", |
|
2579 |
- "id": "3f43a0873f00310a71cd6a71e2e60c113cf17d1812be2ec22fd519fbac68ec91", |
|
2580 |
- "driver": "host", |
|
2581 |
- "containers": {} |
|
2586 |
+ "Options": { |
|
2587 |
+ "com.docker.network.bridge.default_bridge": "true", |
|
2588 |
+ "com.docker.network.bridge.enable_icc": "true", |
|
2589 |
+ "com.docker.network.bridge.enable_ip_masquerade": "true", |
|
2590 |
+ "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", |
|
2591 |
+ "com.docker.network.bridge.name": "docker0", |
|
2592 |
+ "com.docker.network.driver.mtu": "1500" |
|
2582 | 2593 |
} |
2583 |
- ] |
|
2594 |
+ }, |
|
2595 |
+ { |
|
2596 |
+ "Name": "none", |
|
2597 |
+ "Id": "e086a3893b05ab69242d3c44e49483a3bbbd3a26b46baa8f61ab797c1088d794", |
|
2598 |
+ "Scope": "local", |
|
2599 |
+ "Driver": "null", |
|
2600 |
+ "IPAM": { |
|
2601 |
+ "Driver": "default", |
|
2602 |
+ "Config": [] |
|
2603 |
+ }, |
|
2604 |
+ "Containers": {}, |
|
2605 |
+ "Options": {} |
|
2606 |
+ }, |
|
2607 |
+ { |
|
2608 |
+ "Name": "host", |
|
2609 |
+ "Id": "13e871235c677f196c4e1ecebb9dc733b9b2d2ab589e30c539efeda84a24215e", |
|
2610 |
+ "Scope": "local", |
|
2611 |
+ "Driver": "host", |
|
2612 |
+ "IPAM": { |
|
2613 |
+ "Driver": "default", |
|
2614 |
+ "Config": [] |
|
2615 |
+ }, |
|
2616 |
+ "Containers": {}, |
|
2617 |
+ "Options": {} |
|
2618 |
+ } |
|
2619 |
+] |
|
2584 | 2620 |
``` |
2585 | 2621 |
|
2586 | 2622 |
|
... | ... |
@@ -2600,39 +2652,44 @@ Status Codes: |
2600 | 2600 |
|
2601 | 2601 |
**Example request**: |
2602 | 2602 |
|
2603 |
- GET /networks/f995e41e471c833266786a64df584fbe4dc654ac99f63a4ee7495842aa093fc4 HTTP/1.1 |
|
2603 |
+ GET /networks/f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566 HTTP/1.1 |
|
2604 | 2604 |
|
2605 | 2605 |
**Example response**: |
2606 | 2606 |
|
2607 |
- HTTP/1.1 200 OK |
|
2608 |
- Content-Type: application/json |
|
2609 |
- |
|
2610 | 2607 |
``` |
2611 |
- { |
|
2612 |
- "name": "bridge", |
|
2613 |
- "id": "f995e41e471c833266786a64df584fbe4dc654ac99f63a4ee7495842aa093fc4", |
|
2614 |
- "driver": "bridge", |
|
2615 |
- "containers": { |
|
2616 |
- "931d29e96e63022a3691f55ca18b28600239acf53878451975f77054b05ba559": { |
|
2617 |
- "endpoint": "aa79321e2899e6d72fcd46e6a4ad7f81ab9a19c3b06e384ef4ce51fea35827f9", |
|
2618 |
- "mac_address": "02:42:ac:11:00:04", |
|
2619 |
- "ipv4_address": "172.17.0.4/16", |
|
2620 |
- "ipv6_address": "" |
|
2621 |
- }, |
|
2622 |
- "961249b4ae6c764b11eed923e8463c102689111fffd933627b2e7e359c7d0f7c": { |
|
2623 |
- "endpoint": "4f62c5aea6b9a70512210be7db976bd4ec2cdba47125e4fe514d18c81b1624b1", |
|
2624 |
- "mac_address": "02:42:ac:11:00:02", |
|
2625 |
- "ipv4_address": "172.17.0.2/16", |
|
2626 |
- "ipv6_address": "" |
|
2627 |
- }, |
|
2628 |
- "9f6e0fec4449f42a173ed85be96dc2253b6719edd850d8169bc31bdc45db675c": { |
|
2629 |
- "endpoint": "352b512a5bccdfc77d16c2c04d04408e718f879a16f9ce3913a4733139e4f98d", |
|
2630 |
- "mac_address": "02:42:ac:11:00:03", |
|
2631 |
- "ipv4_address": "172.17.0.3/16", |
|
2632 |
- "ipv6_address": "" |
|
2608 |
+HTTP/1.1 200 OK |
|
2609 |
+Content-Type: application/json |
|
2610 |
+ |
|
2611 |
+{ |
|
2612 |
+ "Name": "bridge", |
|
2613 |
+ "Id": "f2de39df4171b0dc801e8002d1d999b77256983dfc63041c0f34030aa3977566", |
|
2614 |
+ "Scope": "local", |
|
2615 |
+ "Driver": "bridge", |
|
2616 |
+ "IPAM": { |
|
2617 |
+ "Driver": "default", |
|
2618 |
+ "Config": [ |
|
2619 |
+ { |
|
2620 |
+ "Subnet": "172.17.0.0/16" |
|
2633 | 2621 |
} |
2622 |
+ ] |
|
2623 |
+ }, |
|
2624 |
+ "Containers": { |
|
2625 |
+ "39b69226f9d79f5634485fb236a23b2fe4e96a0a94128390a7fbbcc167065867": { |
|
2626 |
+ "EndpointID": "ed2419a97c1d9954d05b46e462e7002ea552f216e9b136b80a7db8d98b442eda", |
|
2627 |
+ "MacAddress": "02:42:ac:11:00:02", |
|
2628 |
+ "IPv4Address": "172.17.0.2/16", |
|
2629 |
+ "IPv6Address": "" |
|
2634 | 2630 |
} |
2631 |
+ }, |
|
2632 |
+ "Options": { |
|
2633 |
+ "com.docker.network.bridge.default_bridge": "true", |
|
2634 |
+ "com.docker.network.bridge.enable_icc": "true", |
|
2635 |
+ "com.docker.network.bridge.enable_ip_masquerade": "true", |
|
2636 |
+ "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", |
|
2637 |
+ "com.docker.network.bridge.name": "docker0", |
|
2638 |
+ "com.docker.network.driver.mtu": "1500" |
|
2635 | 2639 |
} |
2640 |
+} |
|
2636 | 2641 |
``` |
2637 | 2642 |
|
2638 | 2643 |
Status Codes: |
... | ... |
@@ -2648,26 +2705,26 @@ Create a network |
2648 | 2648 |
|
2649 | 2649 |
**Example request**: |
2650 | 2650 |
|
2651 |
- POST /networks/create HTTP/1.1 |
|
2652 |
- Content-Type: application/json |
|
2653 |
- |
|
2654 | 2651 |
``` |
2655 |
- { |
|
2656 |
- "name":"isolated_nw", |
|
2657 |
- "driver":"bridge" |
|
2658 |
- } |
|
2652 |
+POST /networks/create HTTP/1.1 |
|
2653 |
+Content-Type: application/json |
|
2654 |
+ |
|
2655 |
+{ |
|
2656 |
+ "Name":"isolated_nw", |
|
2657 |
+ "Driver":"bridge" |
|
2658 |
+} |
|
2659 | 2659 |
``` |
2660 | 2660 |
|
2661 | 2661 |
**Example response**: |
2662 | 2662 |
|
2663 |
- HTTP/1.1 201 Created |
|
2664 |
- Content-Type: application/json |
|
2665 |
- |
|
2666 | 2663 |
``` |
2667 |
- { |
|
2668 |
- "id": "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30", |
|
2669 |
- "warning": "" |
|
2670 |
- } |
|
2664 |
+HTTP/1.1 201 Created |
|
2665 |
+Content-Type: application/json |
|
2666 |
+ |
|
2667 |
+{ |
|
2668 |
+ "Id": "22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30", |
|
2669 |
+ "Warning": "" |
|
2670 |
+} |
|
2671 | 2671 |
``` |
2672 | 2672 |
|
2673 | 2673 |
Status Codes: |
... | ... |
@@ -2678,10 +2735,10 @@ Status Codes: |
2678 | 2678 |
|
2679 | 2679 |
JSON Parameters: |
2680 | 2680 |
|
2681 |
-- **name** - The new network's name. this is a mandatory field |
|
2682 |
-- **driver** - Name of the network driver to use. Defaults to `bridge` driver |
|
2683 |
-- **options** - Network specific options to be used by the drivers |
|
2684 |
-- **check_duplicate** - Requests daemon to check for networks with same name |
|
2681 |
+- **Name** - The new network's name. this is a mandatory field |
|
2682 |
+- **Driver** - Name of the network driver to use. Defaults to `bridge` driver |
|
2683 |
+- **Options** - Network specific options to be used by the drivers |
|
2684 |
+- **CheckDuplicate** - Requests daemon to check for networks with same name |
|
2685 | 2685 |
|
2686 | 2686 |
### Connect a container to a network |
2687 | 2687 |
|
... | ... |
@@ -2691,18 +2748,18 @@ Connects a container to a network |
2691 | 2691 |
|
2692 | 2692 |
**Example request**: |
2693 | 2693 |
|
2694 |
- POST /networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/connect HTTP/1.1 |
|
2695 |
- Content-Type: application/json |
|
2696 |
- |
|
2697 | 2694 |
``` |
2698 |
- { |
|
2699 |
- "container":"3613f73ba0e4" |
|
2700 |
- } |
|
2695 |
+POST /networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/connect HTTP/1.1 |
|
2696 |
+Content-Type: application/json |
|
2697 |
+ |
|
2698 |
+{ |
|
2699 |
+ "Container":"3613f73ba0e4" |
|
2700 |
+} |
|
2701 | 2701 |
``` |
2702 | 2702 |
|
2703 | 2703 |
**Example response**: |
2704 | 2704 |
|
2705 |
- HTTP/1.1 200 OK |
|
2705 |
+ HTTP/1.1 200 OK |
|
2706 | 2706 |
|
2707 | 2707 |
Status Codes: |
2708 | 2708 |
|
... | ... |
@@ -2721,18 +2778,18 @@ Disconnects a container from a network |
2721 | 2721 |
|
2722 | 2722 |
**Example request**: |
2723 | 2723 |
|
2724 |
- POST /networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/disconnect HTTP/1.1 |
|
2725 |
- Content-Type: application/json |
|
2726 |
- |
|
2727 | 2724 |
``` |
2728 |
- { |
|
2729 |
- "container":"3613f73ba0e4" |
|
2730 |
- } |
|
2725 |
+POST /networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30/disconnect HTTP/1.1 |
|
2726 |
+Content-Type: application/json |
|
2727 |
+ |
|
2728 |
+{ |
|
2729 |
+ "Container":"3613f73ba0e4" |
|
2730 |
+} |
|
2731 | 2731 |
``` |
2732 | 2732 |
|
2733 | 2733 |
**Example response**: |
2734 | 2734 |
|
2735 |
- HTTP/1.1 200 OK |
|
2735 |
+ HTTP/1.1 200 OK |
|
2736 | 2736 |
|
2737 | 2737 |
Status Codes: |
2738 | 2738 |
|
... | ... |
@@ -2741,7 +2798,7 @@ Status Codes: |
2741 | 2741 |
|
2742 | 2742 |
JSON Parameters: |
2743 | 2743 |
|
2744 |
-- **container** - container-id/name to be disconnected from a network |
|
2744 |
+- **Container** - container-id/name to be disconnected from a network |
|
2745 | 2745 |
|
2746 | 2746 |
### Remove a network |
2747 | 2747 |
|
... | ... |
@@ -2751,11 +2808,11 @@ Instruct the driver to remove the network (`id`). |
2751 | 2751 |
|
2752 | 2752 |
**Example request**: |
2753 | 2753 |
|
2754 |
- DELETE /networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30 HTTP/1.1 |
|
2754 |
+ DELETE /networks/22be93d5babb089c5aab8dbc369042fad48ff791584ca2da2100db837a1c7c30 HTTP/1.1 |
|
2755 | 2755 |
|
2756 | 2756 |
**Example response**: |
2757 | 2757 |
|
2758 |
- HTTP/1.1 204 No Content |
|
2758 |
+ HTTP/1.1 204 No Content |
|
2759 | 2759 |
|
2760 | 2760 |
Status Codes |
2761 | 2761 |
|