Jekyll automatically adds titles based on the title of the page,
so this was causing duplicate titles.
Also, made all the headings the correct level.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
| ... | ... |
@@ -16,9 +16,7 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.18 |
|
| 20 |
- |
|
| 21 |
-# 1. Brief introduction |
|
| 19 |
+## 1. Brief introduction |
|
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| 24 | 22 |
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket). |
| ... | ... |
@@ -26,11 +24,11 @@ redirect_from: |
| 26 | 26 |
or `pull`, the HTTP connection is hijacked to transport `STDOUT`, |
| 27 | 27 |
`STDIN` and `STDERR`. |
| 28 | 28 |
|
| 29 |
-# 2. Endpoints |
|
| 29 |
+## 2. Endpoints |
|
| 30 | 30 |
|
| 31 |
-## 2.1 Containers |
|
| 31 |
+### 2.1 Containers |
|
| 32 | 32 |
|
| 33 |
-### List containers |
|
| 33 |
+#### List containers |
|
| 34 | 34 |
|
| 35 | 35 |
`GET /containers/json` |
| 36 | 36 |
|
| ... | ... |
@@ -123,7 +121,7 @@ List containers |
| 123 | 123 |
- **400** – bad parameter |
| 124 | 124 |
- **500** – server error |
| 125 | 125 |
|
| 126 |
-### Create a container |
|
| 126 |
+#### Create a container |
|
| 127 | 127 |
|
| 128 | 128 |
`POST /containers/create` |
| 129 | 129 |
|
| ... | ... |
@@ -310,7 +308,7 @@ Create a container |
| 310 | 310 |
- **409** – conflict |
| 311 | 311 |
- **500** – server error |
| 312 | 312 |
|
| 313 |
-### Inspect a container |
|
| 313 |
+#### Inspect a container |
|
| 314 | 314 |
|
| 315 | 315 |
`GET /containers/(id or name)/json` |
| 316 | 316 |
|
| ... | ... |
@@ -443,7 +441,7 @@ Return low-level information on the container `id` |
| 443 | 443 |
- **404** – no such container |
| 444 | 444 |
- **500** – server error |
| 445 | 445 |
|
| 446 |
-### List processes running inside a container |
|
| 446 |
+#### List processes running inside a container |
|
| 447 | 447 |
|
| 448 | 448 |
`GET /containers/(id or name)/top` |
| 449 | 449 |
|
| ... | ... |
@@ -507,7 +505,7 @@ supported on Windows. |
| 507 | 507 |
- **404** – no such container |
| 508 | 508 |
- **500** – server error |
| 509 | 509 |
|
| 510 |
-### Get container logs |
|
| 510 |
+#### Get container logs |
|
| 511 | 511 |
|
| 512 | 512 |
`GET /containers/(id or name)/logs` |
| 513 | 513 |
|
| ... | ... |
@@ -547,7 +545,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 547 | 547 |
- **404** – no such container |
| 548 | 548 |
- **500** – server error |
| 549 | 549 |
|
| 550 |
-### Inspect changes on a container's filesystem |
|
| 550 |
+#### Inspect changes on a container's filesystem |
|
| 551 | 551 |
|
| 552 | 552 |
`GET /containers/(id or name)/changes` |
| 553 | 553 |
|
| ... | ... |
@@ -589,7 +587,7 @@ Values for `Kind`: |
| 589 | 589 |
- **404** – no such container |
| 590 | 590 |
- **500** – server error |
| 591 | 591 |
|
| 592 |
-### Export a container |
|
| 592 |
+#### Export a container |
|
| 593 | 593 |
|
| 594 | 594 |
`GET /containers/(id or name)/export` |
| 595 | 595 |
|
| ... | ... |
@@ -614,7 +612,7 @@ Export the contents of container `id` |
| 614 | 614 |
- **404** – no such container |
| 615 | 615 |
- **500** – server error |
| 616 | 616 |
|
| 617 |
-### Get container stats based on resource usage |
|
| 617 |
+#### Get container stats based on resource usage |
|
| 618 | 618 |
|
| 619 | 619 |
`GET /containers/(id or name)/stats` |
| 620 | 620 |
|
| ... | ... |
@@ -702,7 +700,7 @@ This endpoint returns a live stream of a container's resource usage statistics. |
| 702 | 702 |
- **404** – no such container |
| 703 | 703 |
- **500** – server error |
| 704 | 704 |
|
| 705 |
-### Resize a container TTY |
|
| 705 |
+#### Resize a container TTY |
|
| 706 | 706 |
|
| 707 | 707 |
`POST /containers/(id or name)/resize?h=<height>&w=<width>` |
| 708 | 708 |
|
| ... | ... |
@@ -729,7 +727,7 @@ Resize the TTY for container with `id`. You must restart the container for the |
| 729 | 729 |
- **404** – No such container |
| 730 | 730 |
- **500** – Cannot resize container |
| 731 | 731 |
|
| 732 |
-### Start a container |
|
| 732 |
+#### Start a container |
|
| 733 | 733 |
|
| 734 | 734 |
`POST /containers/(id or name)/start` |
| 735 | 735 |
|
| ... | ... |
@@ -754,7 +752,7 @@ Start the container `id` |
| 754 | 754 |
- **404** – no such container |
| 755 | 755 |
- **500** – server error |
| 756 | 756 |
|
| 757 |
-### Stop a container |
|
| 757 |
+#### Stop a container |
|
| 758 | 758 |
|
| 759 | 759 |
`POST /containers/(id or name)/stop` |
| 760 | 760 |
|
| ... | ... |
@@ -779,7 +777,7 @@ Stop the container `id` |
| 779 | 779 |
- **404** – no such container |
| 780 | 780 |
- **500** – server error |
| 781 | 781 |
|
| 782 |
-### Restart a container |
|
| 782 |
+#### Restart a container |
|
| 783 | 783 |
|
| 784 | 784 |
`POST /containers/(id or name)/restart` |
| 785 | 785 |
|
| ... | ... |
@@ -803,7 +801,7 @@ Restart the container `id` |
| 803 | 803 |
- **404** – no such container |
| 804 | 804 |
- **500** – server error |
| 805 | 805 |
|
| 806 |
-### Kill a container |
|
| 806 |
+#### Kill a container |
|
| 807 | 807 |
|
| 808 | 808 |
`POST /containers/(id or name)/kill` |
| 809 | 809 |
|
| ... | ... |
@@ -828,7 +826,7 @@ Kill the container `id` |
| 828 | 828 |
- **404** – no such container |
| 829 | 829 |
- **500** – server error |
| 830 | 830 |
|
| 831 |
-### Rename a container |
|
| 831 |
+#### Rename a container |
|
| 832 | 832 |
|
| 833 | 833 |
`POST /containers/(id or name)/rename` |
| 834 | 834 |
|
| ... | ... |
@@ -853,7 +851,7 @@ Rename the container `id` to a `new_name` |
| 853 | 853 |
- **409** - conflict name already assigned |
| 854 | 854 |
- **500** – server error |
| 855 | 855 |
|
| 856 |
-### Pause a container |
|
| 856 |
+#### Pause a container |
|
| 857 | 857 |
|
| 858 | 858 |
`POST /containers/(id or name)/pause` |
| 859 | 859 |
|
| ... | ... |
@@ -873,7 +871,7 @@ Pause the container `id` |
| 873 | 873 |
- **404** – no such container |
| 874 | 874 |
- **500** – server error |
| 875 | 875 |
|
| 876 |
-### Unpause a container |
|
| 876 |
+#### Unpause a container |
|
| 877 | 877 |
|
| 878 | 878 |
`POST /containers/(id or name)/unpause` |
| 879 | 879 |
|
| ... | ... |
@@ -893,7 +891,7 @@ Unpause the container `id` |
| 893 | 893 |
- **404** – no such container |
| 894 | 894 |
- **500** – server error |
| 895 | 895 |
|
| 896 |
-### Attach to a container |
|
| 896 |
+#### Attach to a container |
|
| 897 | 897 |
|
| 898 | 898 |
`POST /containers/(id or name)/attach` |
| 899 | 899 |
|
| ... | ... |
@@ -978,7 +976,7 @@ The simplest way to implement the Attach protocol is the following: |
| 978 | 978 |
4. Read the extracted size and output it on the correct output. |
| 979 | 979 |
5. Goto 1. |
| 980 | 980 |
|
| 981 |
-### Attach to a container (websocket) |
|
| 981 |
+#### Attach to a container (websocket) |
|
| 982 | 982 |
|
| 983 | 983 |
`GET /containers/(id or name)/attach/ws` |
| 984 | 984 |
|
| ... | ... |
@@ -1015,7 +1013,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1015 | 1015 |
- **404** – no such container |
| 1016 | 1016 |
- **500** – server error |
| 1017 | 1017 |
|
| 1018 |
-### Wait a container |
|
| 1018 |
+#### Wait a container |
|
| 1019 | 1019 |
|
| 1020 | 1020 |
`POST /containers/(id or name)/wait` |
| 1021 | 1021 |
|
| ... | ... |
@@ -1038,7 +1036,7 @@ Block until container `id` stops, then returns the exit code |
| 1038 | 1038 |
- **404** – no such container |
| 1039 | 1039 |
- **500** – server error |
| 1040 | 1040 |
|
| 1041 |
-### Remove a container |
|
| 1041 |
+#### Remove a container |
|
| 1042 | 1042 |
|
| 1043 | 1043 |
`DELETE /containers/(id or name)` |
| 1044 | 1044 |
|
| ... | ... |
@@ -1067,7 +1065,7 @@ Remove the container `id` from the filesystem |
| 1067 | 1067 |
- **409** – conflict |
| 1068 | 1068 |
- **500** – server error |
| 1069 | 1069 |
|
| 1070 |
-### Copy files or folders from a container |
|
| 1070 |
+#### Copy files or folders from a container |
|
| 1071 | 1071 |
|
| 1072 | 1072 |
`POST /containers/(id or name)/copy` |
| 1073 | 1073 |
|
| ... | ... |
@@ -1097,9 +1095,9 @@ Copy files or folders of container `id` |
| 1097 | 1097 |
- **404** – no such container |
| 1098 | 1098 |
- **500** – server error |
| 1099 | 1099 |
|
| 1100 |
-## 2.2 Images |
|
| 1100 |
+### 2.2 Images |
|
| 1101 | 1101 |
|
| 1102 |
-### List Images |
|
| 1102 |
+#### List Images |
|
| 1103 | 1103 |
|
| 1104 | 1104 |
`GET /images/json` |
| 1105 | 1105 |
|
| ... | ... |
@@ -1185,7 +1183,7 @@ references on the command line. |
| 1185 | 1185 |
- `label=key` or `label="key=value"` of an image label |
| 1186 | 1186 |
- **filter** - only return images with the specified name |
| 1187 | 1187 |
|
| 1188 |
-### Build image from a Dockerfile |
|
| 1188 |
+#### Build image from a Dockerfile |
|
| 1189 | 1189 |
|
| 1190 | 1190 |
`POST /build` |
| 1191 | 1191 |
|
| ... | ... |
@@ -1256,7 +1254,7 @@ or being killed. |
| 1256 | 1256 |
- **200** – no error |
| 1257 | 1257 |
- **500** – server error |
| 1258 | 1258 |
|
| 1259 |
-### Create an image |
|
| 1259 |
+#### Create an image |
|
| 1260 | 1260 |
|
| 1261 | 1261 |
`POST /images/create` |
| 1262 | 1262 |
|
| ... | ... |
@@ -1300,7 +1298,7 @@ a base64-encoded AuthConfig object. |
| 1300 | 1300 |
|
| 1301 | 1301 |
|
| 1302 | 1302 |
|
| 1303 |
-### Inspect an image |
|
| 1303 |
+#### Inspect an image |
|
| 1304 | 1304 |
|
| 1305 | 1305 |
`GET /images/(name)/json` |
| 1306 | 1306 |
|
| ... | ... |
@@ -1351,7 +1349,7 @@ Return low-level information on the image `name` |
| 1351 | 1351 |
- **404** – no such image |
| 1352 | 1352 |
- **500** – server error |
| 1353 | 1353 |
|
| 1354 |
-### Get the history of an image |
|
| 1354 |
+#### Get the history of an image |
|
| 1355 | 1355 |
|
| 1356 | 1356 |
`GET /images/(name)/history` |
| 1357 | 1357 |
|
| ... | ... |
@@ -1385,7 +1383,7 @@ Return the history of the image `name` |
| 1385 | 1385 |
- **404** – no such image |
| 1386 | 1386 |
- **500** – server error |
| 1387 | 1387 |
|
| 1388 |
-### Push an image on the registry |
|
| 1388 |
+#### Push an image on the registry |
|
| 1389 | 1389 |
|
| 1390 | 1390 |
`POST /images/(name)/push` |
| 1391 | 1391 |
|
| ... | ... |
@@ -1428,7 +1426,7 @@ then be used in the URL. This duplicates the command line's flow. |
| 1428 | 1428 |
- **404** – no such image |
| 1429 | 1429 |
- **500** – server error |
| 1430 | 1430 |
|
| 1431 |
-### Tag an image into a repository |
|
| 1431 |
+#### Tag an image into a repository |
|
| 1432 | 1432 |
|
| 1433 | 1433 |
`POST /images/(name)/tag` |
| 1434 | 1434 |
|
| ... | ... |
@@ -1456,7 +1454,7 @@ Tag the image `name` into a repository |
| 1456 | 1456 |
- **409** – conflict |
| 1457 | 1457 |
- **500** – server error |
| 1458 | 1458 |
|
| 1459 |
-### Remove an image |
|
| 1459 |
+#### Remove an image |
|
| 1460 | 1460 |
|
| 1461 | 1461 |
`DELETE /images/(name)` |
| 1462 | 1462 |
|
| ... | ... |
@@ -1489,7 +1487,7 @@ Remove the image `name` from the filesystem |
| 1489 | 1489 |
- **409** – conflict |
| 1490 | 1490 |
- **500** – server error |
| 1491 | 1491 |
|
| 1492 |
-### Search images |
|
| 1492 |
+#### Search images |
|
| 1493 | 1493 |
|
| 1494 | 1494 |
`GET /images/search` |
| 1495 | 1495 |
|
| ... | ... |
@@ -1542,9 +1540,9 @@ Search for an image on [Docker Hub](https://hub.docker.com). |
| 1542 | 1542 |
- **200** – no error |
| 1543 | 1543 |
- **500** – server error |
| 1544 | 1544 |
|
| 1545 |
-## 2.3 Misc |
|
| 1545 |
+### 2.3 Misc |
|
| 1546 | 1546 |
|
| 1547 |
-### Check auth configuration |
|
| 1547 |
+#### Check auth configuration |
|
| 1548 | 1548 |
|
| 1549 | 1549 |
`POST /auth` |
| 1550 | 1550 |
|
| ... | ... |
@@ -1572,7 +1570,7 @@ Get the default username and email |
| 1572 | 1572 |
- **204** – no error |
| 1573 | 1573 |
- **500** – server error |
| 1574 | 1574 |
|
| 1575 |
-### Display system-wide information |
|
| 1575 |
+#### Display system-wide information |
|
| 1576 | 1576 |
|
| 1577 | 1577 |
`GET /info` |
| 1578 | 1578 |
|
| ... | ... |
@@ -1637,7 +1635,7 @@ Display system-wide information |
| 1637 | 1637 |
- **200** – no error |
| 1638 | 1638 |
- **500** – server error |
| 1639 | 1639 |
|
| 1640 |
-### Show the docker version information |
|
| 1640 |
+#### Show the docker version information |
|
| 1641 | 1641 |
|
| 1642 | 1642 |
`GET /version` |
| 1643 | 1643 |
|
| ... | ... |
@@ -1667,7 +1665,7 @@ Show the docker version information |
| 1667 | 1667 |
- **200** – no error |
| 1668 | 1668 |
- **500** – server error |
| 1669 | 1669 |
|
| 1670 |
-### Ping the docker server |
|
| 1670 |
+#### Ping the docker server |
|
| 1671 | 1671 |
|
| 1672 | 1672 |
`GET /_ping` |
| 1673 | 1673 |
|
| ... | ... |
@@ -1689,7 +1687,7 @@ Ping the docker server |
| 1689 | 1689 |
- **200** - no error |
| 1690 | 1690 |
- **500** - server error |
| 1691 | 1691 |
|
| 1692 |
-### Create a new image from a container's changes |
|
| 1692 |
+#### Create a new image from a container's changes |
|
| 1693 | 1693 |
|
| 1694 | 1694 |
`POST /commit` |
| 1695 | 1695 |
|
| ... | ... |
@@ -1751,7 +1749,7 @@ Create a new image from a container's changes |
| 1751 | 1751 |
- **404** – no such container |
| 1752 | 1752 |
- **500** – server error |
| 1753 | 1753 |
|
| 1754 |
-### Monitor Docker's events |
|
| 1754 |
+#### Monitor Docker's events |
|
| 1755 | 1755 |
|
| 1756 | 1756 |
`GET /events` |
| 1757 | 1757 |
|
| ... | ... |
@@ -1793,7 +1791,7 @@ Docker images report the following events: |
| 1793 | 1793 |
- **200** – no error |
| 1794 | 1794 |
- **500** – server error |
| 1795 | 1795 |
|
| 1796 |
-### Get a tarball containing all images in a repository |
|
| 1796 |
+#### Get a tarball containing all images in a repository |
|
| 1797 | 1797 |
|
| 1798 | 1798 |
`GET /images/(name)/get` |
| 1799 | 1799 |
|
| ... | ... |
@@ -1823,7 +1821,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1823 | 1823 |
- **200** – no error |
| 1824 | 1824 |
- **500** – server error |
| 1825 | 1825 |
|
| 1826 |
-### Get a tarball containing all images |
|
| 1826 |
+#### Get a tarball containing all images |
|
| 1827 | 1827 |
|
| 1828 | 1828 |
`GET /images/get` |
| 1829 | 1829 |
|
| ... | ... |
@@ -1852,7 +1850,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1852 | 1852 |
- **200** – no error |
| 1853 | 1853 |
- **500** – server error |
| 1854 | 1854 |
|
| 1855 |
-### Load a tarball with a set of images and tags into docker |
|
| 1855 |
+#### Load a tarball with a set of images and tags into docker |
|
| 1856 | 1856 |
|
| 1857 | 1857 |
`POST /images/load` |
| 1858 | 1858 |
|
| ... | ... |
@@ -1875,7 +1873,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1875 | 1875 |
- **200** – no error |
| 1876 | 1876 |
- **500** – server error |
| 1877 | 1877 |
|
| 1878 |
-### Image tarball format |
|
| 1878 |
+#### Image tarball format |
|
| 1879 | 1879 |
|
| 1880 | 1880 |
An image tarball contains one directory per image layer (named using its long ID), |
| 1881 | 1881 |
each containing these files: |
| ... | ... |
@@ -1896,7 +1894,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 1896 | 1896 |
} |
| 1897 | 1897 |
``` |
| 1898 | 1898 |
|
| 1899 |
-### Exec Create |
|
| 1899 |
+#### Exec Create |
|
| 1900 | 1900 |
|
| 1901 | 1901 |
`POST /containers/(id or name)/exec` |
| 1902 | 1902 |
|
| ... | ... |
@@ -1939,7 +1937,7 @@ Sets up an exec instance in a running container `id` |
| 1939 | 1939 |
- **201** – no error |
| 1940 | 1940 |
- **404** – no such container |
| 1941 | 1941 |
|
| 1942 |
-### Exec Start |
|
| 1942 |
+#### Exec Start |
|
| 1943 | 1943 |
|
| 1944 | 1944 |
`POST /exec/(id)/start` |
| 1945 | 1945 |
|
| ... | ... |
@@ -1980,7 +1978,7 @@ interactive session with the `exec` command. |
| 1980 | 1980 |
|
| 1981 | 1981 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 1982 | 1982 |
|
| 1983 |
-### Exec Resize |
|
| 1983 |
+#### Exec Resize |
|
| 1984 | 1984 |
|
| 1985 | 1985 |
`POST /exec/(id)/resize` |
| 1986 | 1986 |
|
| ... | ... |
@@ -2007,7 +2005,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2007 | 2007 |
- **201** – no error |
| 2008 | 2008 |
- **404** – no such exec instance |
| 2009 | 2009 |
|
| 2010 |
-### Exec Inspect |
|
| 2010 |
+#### Exec Inspect |
|
| 2011 | 2011 |
|
| 2012 | 2012 |
`GET /exec/(id)/json` |
| 2013 | 2013 |
|
| ... | ... |
@@ -2112,9 +2110,9 @@ Return low-level information about the `exec` command `id`. |
| 2112 | 2112 |
- **404** – no such exec instance |
| 2113 | 2113 |
- **500** - server error |
| 2114 | 2114 |
|
| 2115 |
-# 3. Going further |
|
| 2115 |
+## 3. Going further |
|
| 2116 | 2116 |
|
| 2117 |
-## 3.1 Inside `docker run` |
|
| 2117 |
+### 3.1 Inside `docker run` |
|
| 2118 | 2118 |
|
| 2119 | 2119 |
As an example, the `docker run` command line makes the following API calls: |
| 2120 | 2120 |
|
| ... | ... |
@@ -2132,7 +2130,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 2132 | 2132 |
|
| 2133 | 2133 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 2134 | 2134 |
|
| 2135 |
-## 3.2 Hijacking |
|
| 2135 |
+### 3.2 Hijacking |
|
| 2136 | 2136 |
|
| 2137 | 2137 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 2138 | 2138 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -2148,7 +2146,7 @@ from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 2148 | 2148 |
|
| 2149 | 2149 |
This might change in the future. |
| 2150 | 2150 |
|
| 2151 |
-## 3.3 CORS Requests |
|
| 2151 |
+### 3.3 CORS Requests |
|
| 2152 | 2152 |
|
| 2153 | 2153 |
To set cross origin requests to the Engine API please give values to |
| 2154 | 2154 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |
| ... | ... |
@@ -16,8 +16,6 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.19 |
|
| 20 |
- |
|
| 21 | 19 |
## 1. Brief introduction |
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| ... | ... |
@@ -28,11 +26,11 @@ redirect_from: |
| 28 | 28 |
- When the client API version is newer than the daemon's, these calls return an HTTP |
| 29 | 29 |
`400 Bad Request` error message. |
| 30 | 30 |
|
| 31 |
-# 2. Endpoints |
|
| 31 |
+## 2. Endpoints |
|
| 32 | 32 |
|
| 33 |
-## 2.1 Containers |
|
| 33 |
+### 2.1 Containers |
|
| 34 | 34 |
|
| 35 |
-### List containers |
|
| 35 |
+#### List containers |
|
| 36 | 36 |
|
| 37 | 37 |
`GET /containers/json` |
| 38 | 38 |
|
| ... | ... |
@@ -125,7 +123,7 @@ List containers |
| 125 | 125 |
- **400** – bad parameter |
| 126 | 126 |
- **500** – server error |
| 127 | 127 |
|
| 128 |
-### Create a container |
|
| 128 |
+#### Create a container |
|
| 129 | 129 |
|
| 130 | 130 |
`POST /containers/create` |
| 131 | 131 |
|
| ... | ... |
@@ -322,7 +320,7 @@ Create a container |
| 322 | 322 |
- **409** – conflict |
| 323 | 323 |
- **500** – server error |
| 324 | 324 |
|
| 325 |
-### Inspect a container |
|
| 325 |
+#### Inspect a container |
|
| 326 | 326 |
|
| 327 | 327 |
`GET /containers/(id or name)/json` |
| 328 | 328 |
|
| ... | ... |
@@ -459,7 +457,7 @@ Return low-level information on the container `id` |
| 459 | 459 |
- **404** – no such container |
| 460 | 460 |
- **500** – server error |
| 461 | 461 |
|
| 462 |
-### List processes running inside a container |
|
| 462 |
+#### List processes running inside a container |
|
| 463 | 463 |
|
| 464 | 464 |
`GET /containers/(id or name)/top` |
| 465 | 465 |
|
| ... | ... |
@@ -523,7 +521,7 @@ supported on Windows. |
| 523 | 523 |
- **404** – no such container |
| 524 | 524 |
- **500** – server error |
| 525 | 525 |
|
| 526 |
-### Get container logs |
|
| 526 |
+#### Get container logs |
|
| 527 | 527 |
|
| 528 | 528 |
`GET /containers/(id or name)/logs` |
| 529 | 529 |
|
| ... | ... |
@@ -565,7 +563,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 565 | 565 |
- **404** – no such container |
| 566 | 566 |
- **500** – server error |
| 567 | 567 |
|
| 568 |
-### Inspect changes on a container's filesystem |
|
| 568 |
+#### Inspect changes on a container's filesystem |
|
| 569 | 569 |
|
| 570 | 570 |
`GET /containers/(id or name)/changes` |
| 571 | 571 |
|
| ... | ... |
@@ -607,7 +605,7 @@ Values for `Kind`: |
| 607 | 607 |
- **404** – no such container |
| 608 | 608 |
- **500** – server error |
| 609 | 609 |
|
| 610 |
-### Export a container |
|
| 610 |
+#### Export a container |
|
| 611 | 611 |
|
| 612 | 612 |
`GET /containers/(id or name)/export` |
| 613 | 613 |
|
| ... | ... |
@@ -632,7 +630,7 @@ Export the contents of container `id` |
| 632 | 632 |
- **404** – no such container |
| 633 | 633 |
- **500** – server error |
| 634 | 634 |
|
| 635 |
-### Get container stats based on resource usage |
|
| 635 |
+#### Get container stats based on resource usage |
|
| 636 | 636 |
|
| 637 | 637 |
`GET /containers/(id or name)/stats` |
| 638 | 638 |
|
| ... | ... |
@@ -741,7 +739,7 @@ The precpu_stats is the cpu statistic of last read, which is used for calculatin |
| 741 | 741 |
- **404** – no such container |
| 742 | 742 |
- **500** – server error |
| 743 | 743 |
|
| 744 |
-### Resize a container TTY |
|
| 744 |
+#### Resize a container TTY |
|
| 745 | 745 |
|
| 746 | 746 |
`POST /containers/(id or name)/resize?h=<height>&w=<width>` |
| 747 | 747 |
|
| ... | ... |
@@ -768,7 +766,7 @@ Resize the TTY for container with `id`. You must restart the container for the |
| 768 | 768 |
- **404** – No such container |
| 769 | 769 |
- **500** – Cannot resize container |
| 770 | 770 |
|
| 771 |
-### Start a container |
|
| 771 |
+#### Start a container |
|
| 772 | 772 |
|
| 773 | 773 |
`POST /containers/(id or name)/start` |
| 774 | 774 |
|
| ... | ... |
@@ -793,7 +791,7 @@ Start the container `id` |
| 793 | 793 |
- **404** – no such container |
| 794 | 794 |
- **500** – server error |
| 795 | 795 |
|
| 796 |
-### Stop a container |
|
| 796 |
+#### Stop a container |
|
| 797 | 797 |
|
| 798 | 798 |
`POST /containers/(id or name)/stop` |
| 799 | 799 |
|
| ... | ... |
@@ -818,7 +816,7 @@ Stop the container `id` |
| 818 | 818 |
- **404** – no such container |
| 819 | 819 |
- **500** – server error |
| 820 | 820 |
|
| 821 |
-### Restart a container |
|
| 821 |
+#### Restart a container |
|
| 822 | 822 |
|
| 823 | 823 |
`POST /containers/(id or name)/restart` |
| 824 | 824 |
|
| ... | ... |
@@ -842,7 +840,7 @@ Restart the container `id` |
| 842 | 842 |
- **404** – no such container |
| 843 | 843 |
- **500** – server error |
| 844 | 844 |
|
| 845 |
-### Kill a container |
|
| 845 |
+#### Kill a container |
|
| 846 | 846 |
|
| 847 | 847 |
`POST /containers/(id or name)/kill` |
| 848 | 848 |
|
| ... | ... |
@@ -867,7 +865,7 @@ Kill the container `id` |
| 867 | 867 |
- **404** – no such container |
| 868 | 868 |
- **500** – server error |
| 869 | 869 |
|
| 870 |
-### Rename a container |
|
| 870 |
+#### Rename a container |
|
| 871 | 871 |
|
| 872 | 872 |
`POST /containers/(id or name)/rename` |
| 873 | 873 |
|
| ... | ... |
@@ -892,7 +890,7 @@ Rename the container `id` to a `new_name` |
| 892 | 892 |
- **409** - conflict name already assigned |
| 893 | 893 |
- **500** – server error |
| 894 | 894 |
|
| 895 |
-### Pause a container |
|
| 895 |
+#### Pause a container |
|
| 896 | 896 |
|
| 897 | 897 |
`POST /containers/(id or name)/pause` |
| 898 | 898 |
|
| ... | ... |
@@ -912,7 +910,7 @@ Pause the container `id` |
| 912 | 912 |
- **404** – no such container |
| 913 | 913 |
- **500** – server error |
| 914 | 914 |
|
| 915 |
-### Unpause a container |
|
| 915 |
+#### Unpause a container |
|
| 916 | 916 |
|
| 917 | 917 |
`POST /containers/(id or name)/unpause` |
| 918 | 918 |
|
| ... | ... |
@@ -932,7 +930,7 @@ Unpause the container `id` |
| 932 | 932 |
- **404** – no such container |
| 933 | 933 |
- **500** – server error |
| 934 | 934 |
|
| 935 |
-### Attach to a container |
|
| 935 |
+#### Attach to a container |
|
| 936 | 936 |
|
| 937 | 937 |
`POST /containers/(id or name)/attach` |
| 938 | 938 |
|
| ... | ... |
@@ -1017,7 +1015,7 @@ The simplest way to implement the Attach protocol is the following: |
| 1017 | 1017 |
4. Read the extracted size and output it on the correct output. |
| 1018 | 1018 |
5. Goto 1. |
| 1019 | 1019 |
|
| 1020 |
-### Attach to a container (websocket) |
|
| 1020 |
+#### Attach to a container (websocket) |
|
| 1021 | 1021 |
|
| 1022 | 1022 |
`GET /containers/(id or name)/attach/ws` |
| 1023 | 1023 |
|
| ... | ... |
@@ -1054,7 +1052,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1054 | 1054 |
- **404** – no such container |
| 1055 | 1055 |
- **500** – server error |
| 1056 | 1056 |
|
| 1057 |
-### Wait a container |
|
| 1057 |
+#### Wait a container |
|
| 1058 | 1058 |
|
| 1059 | 1059 |
`POST /containers/(id or name)/wait` |
| 1060 | 1060 |
|
| ... | ... |
@@ -1077,7 +1075,7 @@ Block until container `id` stops, then returns the exit code |
| 1077 | 1077 |
- **404** – no such container |
| 1078 | 1078 |
- **500** – server error |
| 1079 | 1079 |
|
| 1080 |
-### Remove a container |
|
| 1080 |
+#### Remove a container |
|
| 1081 | 1081 |
|
| 1082 | 1082 |
`DELETE /containers/(id or name)` |
| 1083 | 1083 |
|
| ... | ... |
@@ -1106,7 +1104,7 @@ Remove the container `id` from the filesystem |
| 1106 | 1106 |
- **409** – conflict |
| 1107 | 1107 |
- **500** – server error |
| 1108 | 1108 |
|
| 1109 |
-### Copy files or folders from a container |
|
| 1109 |
+#### Copy files or folders from a container |
|
| 1110 | 1110 |
|
| 1111 | 1111 |
`POST /containers/(id or name)/copy` |
| 1112 | 1112 |
|
| ... | ... |
@@ -1136,9 +1134,9 @@ Copy files or folders of container `id` |
| 1136 | 1136 |
- **404** – no such container |
| 1137 | 1137 |
- **500** – server error |
| 1138 | 1138 |
|
| 1139 |
-## 2.2 Images |
|
| 1139 |
+### 2.2 Images |
|
| 1140 | 1140 |
|
| 1141 |
-### List Images |
|
| 1141 |
+#### List Images |
|
| 1142 | 1142 |
|
| 1143 | 1143 |
`GET /images/json` |
| 1144 | 1144 |
|
| ... | ... |
@@ -1229,7 +1227,7 @@ references on the command line. |
| 1229 | 1229 |
- `label=key` or `label="key=value"` of an image label |
| 1230 | 1230 |
- **filter** - only return images with the specified name |
| 1231 | 1231 |
|
| 1232 |
-### Build image from a Dockerfile |
|
| 1232 |
+#### Build image from a Dockerfile |
|
| 1233 | 1233 |
|
| 1234 | 1234 |
`POST /build` |
| 1235 | 1235 |
|
| ... | ... |
@@ -1302,7 +1300,7 @@ or being killed. |
| 1302 | 1302 |
- **200** – no error |
| 1303 | 1303 |
- **500** – server error |
| 1304 | 1304 |
|
| 1305 |
-### Create an image |
|
| 1305 |
+#### Create an image |
|
| 1306 | 1306 |
|
| 1307 | 1307 |
`POST /images/create` |
| 1308 | 1308 |
|
| ... | ... |
@@ -1346,7 +1344,7 @@ a base64-encoded AuthConfig object. |
| 1346 | 1346 |
|
| 1347 | 1347 |
|
| 1348 | 1348 |
|
| 1349 |
-### Inspect an image |
|
| 1349 |
+#### Inspect an image |
|
| 1350 | 1350 |
|
| 1351 | 1351 |
`GET /images/(name)/json` |
| 1352 | 1352 |
|
| ... | ... |
@@ -1397,7 +1395,7 @@ Return low-level information on the image `name` |
| 1397 | 1397 |
- **404** – no such image |
| 1398 | 1398 |
- **500** – server error |
| 1399 | 1399 |
|
| 1400 |
-### Get the history of an image |
|
| 1400 |
+#### Get the history of an image |
|
| 1401 | 1401 |
|
| 1402 | 1402 |
`GET /images/(name)/history` |
| 1403 | 1403 |
|
| ... | ... |
@@ -1451,7 +1449,7 @@ Return the history of the image `name` |
| 1451 | 1451 |
- **404** – no such image |
| 1452 | 1452 |
- **500** – server error |
| 1453 | 1453 |
|
| 1454 |
-### Push an image on the registry |
|
| 1454 |
+#### Push an image on the registry |
|
| 1455 | 1455 |
|
| 1456 | 1456 |
`POST /images/(name)/push` |
| 1457 | 1457 |
|
| ... | ... |
@@ -1494,7 +1492,7 @@ then be used in the URL. This duplicates the command line's flow. |
| 1494 | 1494 |
- **404** – no such image |
| 1495 | 1495 |
- **500** – server error |
| 1496 | 1496 |
|
| 1497 |
-### Tag an image into a repository |
|
| 1497 |
+#### Tag an image into a repository |
|
| 1498 | 1498 |
|
| 1499 | 1499 |
`POST /images/(name)/tag` |
| 1500 | 1500 |
|
| ... | ... |
@@ -1522,7 +1520,7 @@ Tag the image `name` into a repository |
| 1522 | 1522 |
- **409** – conflict |
| 1523 | 1523 |
- **500** – server error |
| 1524 | 1524 |
|
| 1525 |
-### Remove an image |
|
| 1525 |
+#### Remove an image |
|
| 1526 | 1526 |
|
| 1527 | 1527 |
`DELETE /images/(name)` |
| 1528 | 1528 |
|
| ... | ... |
@@ -1555,7 +1553,7 @@ Remove the image `name` from the filesystem |
| 1555 | 1555 |
- **409** – conflict |
| 1556 | 1556 |
- **500** – server error |
| 1557 | 1557 |
|
| 1558 |
-### Search images |
|
| 1558 |
+#### Search images |
|
| 1559 | 1559 |
|
| 1560 | 1560 |
`GET /images/search` |
| 1561 | 1561 |
|
| ... | ... |
@@ -1614,9 +1612,9 @@ be deprecated and replaced by the `is_automated` property. |
| 1614 | 1614 |
- **200** – no error |
| 1615 | 1615 |
- **500** – server error |
| 1616 | 1616 |
|
| 1617 |
-## 2.3 Misc |
|
| 1617 |
+### 2.3 Misc |
|
| 1618 | 1618 |
|
| 1619 |
-### Check auth configuration |
|
| 1619 |
+#### Check auth configuration |
|
| 1620 | 1620 |
|
| 1621 | 1621 |
`POST /auth` |
| 1622 | 1622 |
|
| ... | ... |
@@ -1644,7 +1642,7 @@ Get the default username and email |
| 1644 | 1644 |
- **204** – no error |
| 1645 | 1645 |
- **500** – server error |
| 1646 | 1646 |
|
| 1647 |
-### Display system-wide information |
|
| 1647 |
+#### Display system-wide information |
|
| 1648 | 1648 |
|
| 1649 | 1649 |
`GET /info` |
| 1650 | 1650 |
|
| ... | ... |
@@ -1713,7 +1711,7 @@ Display system-wide information |
| 1713 | 1713 |
- **200** – no error |
| 1714 | 1714 |
- **500** – server error |
| 1715 | 1715 |
|
| 1716 |
-### Show the docker version information |
|
| 1716 |
+#### Show the docker version information |
|
| 1717 | 1717 |
|
| 1718 | 1718 |
`GET /version` |
| 1719 | 1719 |
|
| ... | ... |
@@ -1743,7 +1741,7 @@ Show the docker version information |
| 1743 | 1743 |
- **200** – no error |
| 1744 | 1744 |
- **500** – server error |
| 1745 | 1745 |
|
| 1746 |
-### Ping the docker server |
|
| 1746 |
+#### Ping the docker server |
|
| 1747 | 1747 |
|
| 1748 | 1748 |
`GET /_ping` |
| 1749 | 1749 |
|
| ... | ... |
@@ -1765,7 +1763,7 @@ Ping the docker server |
| 1765 | 1765 |
- **200** - no error |
| 1766 | 1766 |
- **500** - server error |
| 1767 | 1767 |
|
| 1768 |
-### Create a new image from a container's changes |
|
| 1768 |
+#### Create a new image from a container's changes |
|
| 1769 | 1769 |
|
| 1770 | 1770 |
`POST /commit` |
| 1771 | 1771 |
|
| ... | ... |
@@ -1831,7 +1829,7 @@ Create a new image from a container's changes |
| 1831 | 1831 |
- **404** – no such container |
| 1832 | 1832 |
- **500** – server error |
| 1833 | 1833 |
|
| 1834 |
-### Monitor Docker's events |
|
| 1834 |
+#### Monitor Docker's events |
|
| 1835 | 1835 |
|
| 1836 | 1836 |
`GET /events` |
| 1837 | 1837 |
|
| ... | ... |
@@ -1873,7 +1871,7 @@ Docker images report the following events: |
| 1873 | 1873 |
- **200** – no error |
| 1874 | 1874 |
- **500** – server error |
| 1875 | 1875 |
|
| 1876 |
-### Get a tarball containing all images in a repository |
|
| 1876 |
+#### Get a tarball containing all images in a repository |
|
| 1877 | 1877 |
|
| 1878 | 1878 |
`GET /images/(name)/get` |
| 1879 | 1879 |
|
| ... | ... |
@@ -1903,7 +1901,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1903 | 1903 |
- **200** – no error |
| 1904 | 1904 |
- **500** – server error |
| 1905 | 1905 |
|
| 1906 |
-### Get a tarball containing all images |
|
| 1906 |
+#### Get a tarball containing all images |
|
| 1907 | 1907 |
|
| 1908 | 1908 |
`GET /images/get` |
| 1909 | 1909 |
|
| ... | ... |
@@ -1932,7 +1930,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1932 | 1932 |
- **200** – no error |
| 1933 | 1933 |
- **500** – server error |
| 1934 | 1934 |
|
| 1935 |
-### Load a tarball with a set of images and tags into docker |
|
| 1935 |
+#### Load a tarball with a set of images and tags into docker |
|
| 1936 | 1936 |
|
| 1937 | 1937 |
`POST /images/load` |
| 1938 | 1938 |
|
| ... | ... |
@@ -1955,7 +1953,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 1955 | 1955 |
- **200** – no error |
| 1956 | 1956 |
- **500** – server error |
| 1957 | 1957 |
|
| 1958 |
-### Image tarball format |
|
| 1958 |
+#### Image tarball format |
|
| 1959 | 1959 |
|
| 1960 | 1960 |
An image tarball contains one directory per image layer (named using its long ID), |
| 1961 | 1961 |
each containing these files: |
| ... | ... |
@@ -1976,7 +1974,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 1976 | 1976 |
} |
| 1977 | 1977 |
``` |
| 1978 | 1978 |
|
| 1979 |
-### Exec Create |
|
| 1979 |
+#### Exec Create |
|
| 1980 | 1980 |
|
| 1981 | 1981 |
`POST /containers/(id or name)/exec` |
| 1982 | 1982 |
|
| ... | ... |
@@ -2022,7 +2020,7 @@ Sets up an exec instance in a running container `id` |
| 2022 | 2022 |
- **201** – no error |
| 2023 | 2023 |
- **404** – no such container |
| 2024 | 2024 |
|
| 2025 |
-### Exec Start |
|
| 2025 |
+#### Exec Start |
|
| 2026 | 2026 |
|
| 2027 | 2027 |
`POST /exec/(id)/start` |
| 2028 | 2028 |
|
| ... | ... |
@@ -2063,7 +2061,7 @@ interactive session with the `exec` command. |
| 2063 | 2063 |
|
| 2064 | 2064 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 2065 | 2065 |
|
| 2066 |
-### Exec Resize |
|
| 2066 |
+#### Exec Resize |
|
| 2067 | 2067 |
|
| 2068 | 2068 |
`POST /exec/(id)/resize` |
| 2069 | 2069 |
|
| ... | ... |
@@ -2090,7 +2088,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2090 | 2090 |
- **201** – no error |
| 2091 | 2091 |
- **404** – no such exec instance |
| 2092 | 2092 |
|
| 2093 |
-### Exec Inspect |
|
| 2093 |
+#### Exec Inspect |
|
| 2094 | 2094 |
|
| 2095 | 2095 |
`GET /exec/(id)/json` |
| 2096 | 2096 |
|
| ... | ... |
@@ -2195,9 +2193,9 @@ Return low-level information about the `exec` command `id`. |
| 2195 | 2195 |
- **404** – no such exec instance |
| 2196 | 2196 |
- **500** - server error |
| 2197 | 2197 |
|
| 2198 |
-# 3. Going further |
|
| 2198 |
+## 3. Going further |
|
| 2199 | 2199 |
|
| 2200 |
-## 3.1 Inside `docker run` |
|
| 2200 |
+### 3.1 Inside `docker run` |
|
| 2201 | 2201 |
|
| 2202 | 2202 |
As an example, the `docker run` command line makes the following API calls: |
| 2203 | 2203 |
|
| ... | ... |
@@ -2215,7 +2213,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 2215 | 2215 |
|
| 2216 | 2216 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 2217 | 2217 |
|
| 2218 |
-## 3.2 Hijacking |
|
| 2218 |
+### 3.2 Hijacking |
|
| 2219 | 2219 |
|
| 2220 | 2220 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 2221 | 2221 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -2230,7 +2228,7 @@ When Docker daemon detects the `Upgrade` header, it switches its status code |
| 2230 | 2230 |
from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 2231 | 2231 |
|
| 2232 | 2232 |
|
| 2233 |
-## 3.3 CORS Requests |
|
| 2233 |
+### 3.3 CORS Requests |
|
| 2234 | 2234 |
|
| 2235 | 2235 |
To set cross origin requests to the Engine API please give values to |
| 2236 | 2236 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |
| ... | ... |
@@ -16,9 +16,7 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.20 |
|
| 20 |
- |
|
| 21 |
-# 1. Brief introduction |
|
| 19 |
+## 1. Brief introduction |
|
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| 24 | 22 |
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket). |
| ... | ... |
@@ -26,11 +24,11 @@ redirect_from: |
| 26 | 26 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 27 | 27 |
`stdin` and `stderr`. |
| 28 | 28 |
|
| 29 |
-# 2. Endpoints |
|
| 29 |
+## 2. Endpoints |
|
| 30 | 30 |
|
| 31 |
-## 2.1 Containers |
|
| 31 |
+### 2.1 Containers |
|
| 32 | 32 |
|
| 33 |
-### List containers |
|
| 33 |
+#### List containers |
|
| 34 | 34 |
|
| 35 | 35 |
`GET /containers/json` |
| 36 | 36 |
|
| ... | ... |
@@ -123,7 +121,7 @@ List containers |
| 123 | 123 |
- **400** – bad parameter |
| 124 | 124 |
- **500** – server error |
| 125 | 125 |
|
| 126 |
-### Create a container |
|
| 126 |
+#### Create a container |
|
| 127 | 127 |
|
| 128 | 128 |
`POST /containers/create` |
| 129 | 129 |
|
| ... | ... |
@@ -324,7 +322,7 @@ Create a container |
| 324 | 324 |
- **409** – conflict |
| 325 | 325 |
- **500** – server error |
| 326 | 326 |
|
| 327 |
-### Inspect a container |
|
| 327 |
+#### Inspect a container |
|
| 328 | 328 |
|
| 329 | 329 |
`GET /containers/(id or name)/json` |
| 330 | 330 |
|
| ... | ... |
@@ -466,7 +464,7 @@ Return low-level information on the container `id` |
| 466 | 466 |
- **404** – no such container |
| 467 | 467 |
- **500** – server error |
| 468 | 468 |
|
| 469 |
-### List processes running inside a container |
|
| 469 |
+#### List processes running inside a container |
|
| 470 | 470 |
|
| 471 | 471 |
`GET /containers/(id or name)/top` |
| 472 | 472 |
|
| ... | ... |
@@ -530,7 +528,7 @@ supported on Windows. |
| 530 | 530 |
- **404** – no such container |
| 531 | 531 |
- **500** – server error |
| 532 | 532 |
|
| 533 |
-### Get container logs |
|
| 533 |
+#### Get container logs |
|
| 534 | 534 |
|
| 535 | 535 |
`GET /containers/(id or name)/logs` |
| 536 | 536 |
|
| ... | ... |
@@ -572,7 +570,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 572 | 572 |
- **404** – no such container |
| 573 | 573 |
- **500** – server error |
| 574 | 574 |
|
| 575 |
-### Inspect changes on a container's filesystem |
|
| 575 |
+#### Inspect changes on a container's filesystem |
|
| 576 | 576 |
|
| 577 | 577 |
`GET /containers/(id or name)/changes` |
| 578 | 578 |
|
| ... | ... |
@@ -614,7 +612,7 @@ Values for `Kind`: |
| 614 | 614 |
- **404** – no such container |
| 615 | 615 |
- **500** – server error |
| 616 | 616 |
|
| 617 |
-### Export a container |
|
| 617 |
+#### Export a container |
|
| 618 | 618 |
|
| 619 | 619 |
`GET /containers/(id or name)/export` |
| 620 | 620 |
|
| ... | ... |
@@ -639,7 +637,7 @@ Export the contents of container `id` |
| 639 | 639 |
- **404** – no such container |
| 640 | 640 |
- **500** – server error |
| 641 | 641 |
|
| 642 |
-### Get container stats based on resource usage |
|
| 642 |
+#### Get container stats based on resource usage |
|
| 643 | 643 |
|
| 644 | 644 |
`GET /containers/(id or name)/stats` |
| 645 | 645 |
|
| ... | ... |
@@ -748,7 +746,7 @@ The precpu_stats is the cpu statistic of last read, which is used for calculatin |
| 748 | 748 |
- **404** – no such container |
| 749 | 749 |
- **500** – server error |
| 750 | 750 |
|
| 751 |
-### Resize a container TTY |
|
| 751 |
+#### Resize a container TTY |
|
| 752 | 752 |
|
| 753 | 753 |
`POST /containers/(id or name)/resize?h=<height>&w=<width>` |
| 754 | 754 |
|
| ... | ... |
@@ -775,7 +773,7 @@ Resize the TTY for container with `id`. You must restart the container for the |
| 775 | 775 |
- **404** – No such container |
| 776 | 776 |
- **500** – Cannot resize container |
| 777 | 777 |
|
| 778 |
-### Start a container |
|
| 778 |
+#### Start a container |
|
| 779 | 779 |
|
| 780 | 780 |
`POST /containers/(id or name)/start` |
| 781 | 781 |
|
| ... | ... |
@@ -800,7 +798,7 @@ Start the container `id` |
| 800 | 800 |
- **404** – no such container |
| 801 | 801 |
- **500** – server error |
| 802 | 802 |
|
| 803 |
-### Stop a container |
|
| 803 |
+#### Stop a container |
|
| 804 | 804 |
|
| 805 | 805 |
`POST /containers/(id or name)/stop` |
| 806 | 806 |
|
| ... | ... |
@@ -825,7 +823,7 @@ Stop the container `id` |
| 825 | 825 |
- **404** – no such container |
| 826 | 826 |
- **500** – server error |
| 827 | 827 |
|
| 828 |
-### Restart a container |
|
| 828 |
+#### Restart a container |
|
| 829 | 829 |
|
| 830 | 830 |
`POST /containers/(id or name)/restart` |
| 831 | 831 |
|
| ... | ... |
@@ -849,7 +847,7 @@ Restart the container `id` |
| 849 | 849 |
- **404** – no such container |
| 850 | 850 |
- **500** – server error |
| 851 | 851 |
|
| 852 |
-### Kill a container |
|
| 852 |
+#### Kill a container |
|
| 853 | 853 |
|
| 854 | 854 |
`POST /containers/(id or name)/kill` |
| 855 | 855 |
|
| ... | ... |
@@ -874,7 +872,7 @@ Kill the container `id` |
| 874 | 874 |
- **404** – no such container |
| 875 | 875 |
- **500** – server error |
| 876 | 876 |
|
| 877 |
-### Rename a container |
|
| 877 |
+#### Rename a container |
|
| 878 | 878 |
|
| 879 | 879 |
`POST /containers/(id or name)/rename` |
| 880 | 880 |
|
| ... | ... |
@@ -899,7 +897,7 @@ Rename the container `id` to a `new_name` |
| 899 | 899 |
- **409** - conflict name already assigned |
| 900 | 900 |
- **500** – server error |
| 901 | 901 |
|
| 902 |
-### Pause a container |
|
| 902 |
+#### Pause a container |
|
| 903 | 903 |
|
| 904 | 904 |
`POST /containers/(id or name)/pause` |
| 905 | 905 |
|
| ... | ... |
@@ -919,7 +917,7 @@ Pause the container `id` |
| 919 | 919 |
- **404** – no such container |
| 920 | 920 |
- **500** – server error |
| 921 | 921 |
|
| 922 |
-### Unpause a container |
|
| 922 |
+#### Unpause a container |
|
| 923 | 923 |
|
| 924 | 924 |
`POST /containers/(id or name)/unpause` |
| 925 | 925 |
|
| ... | ... |
@@ -939,7 +937,7 @@ Unpause the container `id` |
| 939 | 939 |
- **404** – no such container |
| 940 | 940 |
- **500** – server error |
| 941 | 941 |
|
| 942 |
-### Attach to a container |
|
| 942 |
+#### Attach to a container |
|
| 943 | 943 |
|
| 944 | 944 |
`POST /containers/(id or name)/attach` |
| 945 | 945 |
|
| ... | ... |
@@ -1024,7 +1022,7 @@ The simplest way to implement the Attach protocol is the following: |
| 1024 | 1024 |
4. Read the extracted size and output it on the correct output. |
| 1025 | 1025 |
5. Goto 1. |
| 1026 | 1026 |
|
| 1027 |
-### Attach to a container (websocket) |
|
| 1027 |
+#### Attach to a container (websocket) |
|
| 1028 | 1028 |
|
| 1029 | 1029 |
`GET /containers/(id or name)/attach/ws` |
| 1030 | 1030 |
|
| ... | ... |
@@ -1061,7 +1059,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1061 | 1061 |
- **404** – no such container |
| 1062 | 1062 |
- **500** – server error |
| 1063 | 1063 |
|
| 1064 |
-### Wait a container |
|
| 1064 |
+#### Wait a container |
|
| 1065 | 1065 |
|
| 1066 | 1066 |
`POST /containers/(id or name)/wait` |
| 1067 | 1067 |
|
| ... | ... |
@@ -1084,7 +1082,7 @@ Block until container `id` stops, then returns the exit code |
| 1084 | 1084 |
- **404** – no such container |
| 1085 | 1085 |
- **500** – server error |
| 1086 | 1086 |
|
| 1087 |
-### Remove a container |
|
| 1087 |
+#### Remove a container |
|
| 1088 | 1088 |
|
| 1089 | 1089 |
`DELETE /containers/(id or name)` |
| 1090 | 1090 |
|
| ... | ... |
@@ -1113,7 +1111,7 @@ Remove the container `id` from the filesystem |
| 1113 | 1113 |
- **409** – conflict |
| 1114 | 1114 |
- **500** – server error |
| 1115 | 1115 |
|
| 1116 |
-### Copy files or folders from a container |
|
| 1116 |
+#### Copy files or folders from a container |
|
| 1117 | 1117 |
|
| 1118 | 1118 |
`POST /containers/(id or name)/copy` |
| 1119 | 1119 |
|
| ... | ... |
@@ -1145,14 +1143,14 @@ Copy files or folders of container `id` |
| 1145 | 1145 |
- **404** – no such container |
| 1146 | 1146 |
- **500** – server error |
| 1147 | 1147 |
|
| 1148 |
-### Retrieving information about files and folders in a container |
|
| 1148 |
+#### Retrieving information about files and folders in a container |
|
| 1149 | 1149 |
|
| 1150 | 1150 |
`HEAD /containers/(id or name)/archive` |
| 1151 | 1151 |
|
| 1152 | 1152 |
See the description of the `X-Docker-Container-Path-Stat` header in the |
| 1153 | 1153 |
following section. |
| 1154 | 1154 |
|
| 1155 |
-### Get an archive of a filesystem resource in a container |
|
| 1155 |
+#### Get an archive of a filesystem resource in a container |
|
| 1156 | 1156 |
|
| 1157 | 1157 |
`GET /containers/(id or name)/archive` |
| 1158 | 1158 |
|
| ... | ... |
@@ -1217,7 +1215,7 @@ desired. |
| 1217 | 1217 |
- no such file or directory (**path** does not exist) |
| 1218 | 1218 |
- **500** - server error |
| 1219 | 1219 |
|
| 1220 |
-### Extract an archive of files or folders to a directory in a container |
|
| 1220 |
+#### Extract an archive of files or folders to a directory in a container |
|
| 1221 | 1221 |
|
| 1222 | 1222 |
`PUT /containers/(id or name)/archive` |
| 1223 | 1223 |
|
| ... | ... |
@@ -1265,9 +1263,9 @@ Upload a tar archive to be extracted to a path in the filesystem of container |
| 1265 | 1265 |
- no such file or directory (**path** resource does not exist) |
| 1266 | 1266 |
- **500** – server error |
| 1267 | 1267 |
|
| 1268 |
-## 2.2 Images |
|
| 1268 |
+### 2.2 Images |
|
| 1269 | 1269 |
|
| 1270 |
-### List Images |
|
| 1270 |
+#### List Images |
|
| 1271 | 1271 |
|
| 1272 | 1272 |
`GET /images/json` |
| 1273 | 1273 |
|
| ... | ... |
@@ -1358,7 +1356,7 @@ references on the command line. |
| 1358 | 1358 |
- `label=key` or `label="key=value"` of an image label |
| 1359 | 1359 |
- **filter** - only return images with the specified name |
| 1360 | 1360 |
|
| 1361 |
-### Build image from a Dockerfile |
|
| 1361 |
+#### Build image from a Dockerfile |
|
| 1362 | 1362 |
|
| 1363 | 1363 |
`POST /build` |
| 1364 | 1364 |
|
| ... | ... |
@@ -1456,7 +1454,7 @@ or being killed. |
| 1456 | 1456 |
- **200** – no error |
| 1457 | 1457 |
- **500** – server error |
| 1458 | 1458 |
|
| 1459 |
-### Create an image |
|
| 1459 |
+#### Create an image |
|
| 1460 | 1460 |
|
| 1461 | 1461 |
`POST /images/create` |
| 1462 | 1462 |
|
| ... | ... |
@@ -1500,7 +1498,7 @@ a base64-encoded AuthConfig object. |
| 1500 | 1500 |
|
| 1501 | 1501 |
|
| 1502 | 1502 |
|
| 1503 |
-### Inspect an image |
|
| 1503 |
+#### Inspect an image |
|
| 1504 | 1504 |
|
| 1505 | 1505 |
`GET /images/(name)/json` |
| 1506 | 1506 |
|
| ... | ... |
@@ -1551,7 +1549,7 @@ Return low-level information on the image `name` |
| 1551 | 1551 |
- **404** – no such image |
| 1552 | 1552 |
- **500** – server error |
| 1553 | 1553 |
|
| 1554 |
-### Get the history of an image |
|
| 1554 |
+#### Get the history of an image |
|
| 1555 | 1555 |
|
| 1556 | 1556 |
`GET /images/(name)/history` |
| 1557 | 1557 |
|
| ... | ... |
@@ -1605,7 +1603,7 @@ Return the history of the image `name` |
| 1605 | 1605 |
- **404** – no such image |
| 1606 | 1606 |
- **500** – server error |
| 1607 | 1607 |
|
| 1608 |
-### Push an image on the registry |
|
| 1608 |
+#### Push an image on the registry |
|
| 1609 | 1609 |
|
| 1610 | 1610 |
`POST /images/(name)/push` |
| 1611 | 1611 |
|
| ... | ... |
@@ -1648,7 +1646,7 @@ then be used in the URL. This duplicates the command line's flow. |
| 1648 | 1648 |
- **404** – no such image |
| 1649 | 1649 |
- **500** – server error |
| 1650 | 1650 |
|
| 1651 |
-### Tag an image into a repository |
|
| 1651 |
+#### Tag an image into a repository |
|
| 1652 | 1652 |
|
| 1653 | 1653 |
`POST /images/(name)/tag` |
| 1654 | 1654 |
|
| ... | ... |
@@ -1676,7 +1674,7 @@ Tag the image `name` into a repository |
| 1676 | 1676 |
- **409** – conflict |
| 1677 | 1677 |
- **500** – server error |
| 1678 | 1678 |
|
| 1679 |
-### Remove an image |
|
| 1679 |
+#### Remove an image |
|
| 1680 | 1680 |
|
| 1681 | 1681 |
`DELETE /images/(name)` |
| 1682 | 1682 |
|
| ... | ... |
@@ -1709,7 +1707,7 @@ Remove the image `name` from the filesystem |
| 1709 | 1709 |
- **409** – conflict |
| 1710 | 1710 |
- **500** – server error |
| 1711 | 1711 |
|
| 1712 |
-### Search images |
|
| 1712 |
+#### Search images |
|
| 1713 | 1713 |
|
| 1714 | 1714 |
`GET /images/search` |
| 1715 | 1715 |
|
| ... | ... |
@@ -1762,9 +1760,9 @@ Search for an image on [Docker Hub](https://hub.docker.com). |
| 1762 | 1762 |
- **200** – no error |
| 1763 | 1763 |
- **500** – server error |
| 1764 | 1764 |
|
| 1765 |
-## 2.3 Misc |
|
| 1765 |
+### 2.3 Misc |
|
| 1766 | 1766 |
|
| 1767 |
-### Check auth configuration |
|
| 1767 |
+#### Check auth configuration |
|
| 1768 | 1768 |
|
| 1769 | 1769 |
`POST /auth` |
| 1770 | 1770 |
|
| ... | ... |
@@ -1792,7 +1790,7 @@ Get the default username and email |
| 1792 | 1792 |
- **204** – no error |
| 1793 | 1793 |
- **500** – server error |
| 1794 | 1794 |
|
| 1795 |
-### Display system-wide information |
|
| 1795 |
+#### Display system-wide information |
|
| 1796 | 1796 |
|
| 1797 | 1797 |
`GET /info` |
| 1798 | 1798 |
|
| ... | ... |
@@ -1861,7 +1859,7 @@ Display system-wide information |
| 1861 | 1861 |
- **200** – no error |
| 1862 | 1862 |
- **500** – server error |
| 1863 | 1863 |
|
| 1864 |
-### Show the docker version information |
|
| 1864 |
+#### Show the docker version information |
|
| 1865 | 1865 |
|
| 1866 | 1866 |
`GET /version` |
| 1867 | 1867 |
|
| ... | ... |
@@ -1892,7 +1890,7 @@ Show the docker version information |
| 1892 | 1892 |
- **200** – no error |
| 1893 | 1893 |
- **500** – server error |
| 1894 | 1894 |
|
| 1895 |
-### Ping the docker server |
|
| 1895 |
+#### Ping the docker server |
|
| 1896 | 1896 |
|
| 1897 | 1897 |
`GET /_ping` |
| 1898 | 1898 |
|
| ... | ... |
@@ -1914,7 +1912,7 @@ Ping the docker server |
| 1914 | 1914 |
- **200** - no error |
| 1915 | 1915 |
- **500** - server error |
| 1916 | 1916 |
|
| 1917 |
-### Create a new image from a container's changes |
|
| 1917 |
+#### Create a new image from a container's changes |
|
| 1918 | 1918 |
|
| 1919 | 1919 |
`POST /commit` |
| 1920 | 1920 |
|
| ... | ... |
@@ -1986,7 +1984,7 @@ Create a new image from a container's changes |
| 1986 | 1986 |
- **404** – no such container |
| 1987 | 1987 |
- **500** – server error |
| 1988 | 1988 |
|
| 1989 |
-### Monitor Docker's events |
|
| 1989 |
+#### Monitor Docker's events |
|
| 1990 | 1990 |
|
| 1991 | 1991 |
`GET /events` |
| 1992 | 1992 |
|
| ... | ... |
@@ -2028,7 +2026,7 @@ Docker images report the following events: |
| 2028 | 2028 |
- **200** – no error |
| 2029 | 2029 |
- **500** – server error |
| 2030 | 2030 |
|
| 2031 |
-### Get a tarball containing all images in a repository |
|
| 2031 |
+#### Get a tarball containing all images in a repository |
|
| 2032 | 2032 |
|
| 2033 | 2033 |
`GET /images/(name)/get` |
| 2034 | 2034 |
|
| ... | ... |
@@ -2058,7 +2056,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2058 | 2058 |
- **200** – no error |
| 2059 | 2059 |
- **500** – server error |
| 2060 | 2060 |
|
| 2061 |
-### Get a tarball containing all images |
|
| 2061 |
+#### Get a tarball containing all images |
|
| 2062 | 2062 |
|
| 2063 | 2063 |
`GET /images/get` |
| 2064 | 2064 |
|
| ... | ... |
@@ -2087,7 +2085,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2087 | 2087 |
- **200** – no error |
| 2088 | 2088 |
- **500** – server error |
| 2089 | 2089 |
|
| 2090 |
-### Load a tarball with a set of images and tags into docker |
|
| 2090 |
+#### Load a tarball with a set of images and tags into docker |
|
| 2091 | 2091 |
|
| 2092 | 2092 |
`POST /images/load` |
| 2093 | 2093 |
|
| ... | ... |
@@ -2110,7 +2108,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2110 | 2110 |
- **200** – no error |
| 2111 | 2111 |
- **500** – server error |
| 2112 | 2112 |
|
| 2113 |
-### Image tarball format |
|
| 2113 |
+#### Image tarball format |
|
| 2114 | 2114 |
|
| 2115 | 2115 |
An image tarball contains one directory per image layer (named using its long ID), |
| 2116 | 2116 |
each containing these files: |
| ... | ... |
@@ -2131,7 +2129,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 2131 | 2131 |
} |
| 2132 | 2132 |
``` |
| 2133 | 2133 |
|
| 2134 |
-### Exec Create |
|
| 2134 |
+#### Exec Create |
|
| 2135 | 2135 |
|
| 2136 | 2136 |
`POST /containers/(id or name)/exec` |
| 2137 | 2137 |
|
| ... | ... |
@@ -2177,7 +2175,7 @@ Sets up an exec instance in a running container `id` |
| 2177 | 2177 |
- **201** – no error |
| 2178 | 2178 |
- **404** – no such container |
| 2179 | 2179 |
|
| 2180 |
-### Exec Start |
|
| 2180 |
+#### Exec Start |
|
| 2181 | 2181 |
|
| 2182 | 2182 |
`POST /exec/(id)/start` |
| 2183 | 2183 |
|
| ... | ... |
@@ -2218,7 +2216,7 @@ interactive session with the `exec` command. |
| 2218 | 2218 |
|
| 2219 | 2219 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 2220 | 2220 |
|
| 2221 |
-### Exec Resize |
|
| 2221 |
+#### Exec Resize |
|
| 2222 | 2222 |
|
| 2223 | 2223 |
`POST /exec/(id)/resize` |
| 2224 | 2224 |
|
| ... | ... |
@@ -2245,7 +2243,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2245 | 2245 |
- **201** – no error |
| 2246 | 2246 |
- **404** – no such exec instance |
| 2247 | 2247 |
|
| 2248 |
-### Exec Inspect |
|
| 2248 |
+#### Exec Inspect |
|
| 2249 | 2249 |
|
| 2250 | 2250 |
`GET /exec/(id)/json` |
| 2251 | 2251 |
|
| ... | ... |
@@ -2348,9 +2346,9 @@ Return low-level information about the `exec` command `id`. |
| 2348 | 2348 |
- **404** – no such exec instance |
| 2349 | 2349 |
- **500** - server error |
| 2350 | 2350 |
|
| 2351 |
-# 3. Going further |
|
| 2351 |
+## 3. Going further |
|
| 2352 | 2352 |
|
| 2353 |
-## 3.1 Inside `docker run` |
|
| 2353 |
+### 3.1 Inside `docker run` |
|
| 2354 | 2354 |
|
| 2355 | 2355 |
As an example, the `docker run` command line makes the following API calls: |
| 2356 | 2356 |
|
| ... | ... |
@@ -2368,7 +2366,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 2368 | 2368 |
|
| 2369 | 2369 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 2370 | 2370 |
|
| 2371 |
-## 3.2 Hijacking |
|
| 2371 |
+### 3.2 Hijacking |
|
| 2372 | 2372 |
|
| 2373 | 2373 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 2374 | 2374 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -2383,7 +2381,7 @@ When Docker daemon detects the `Upgrade` header, it switches its status code |
| 2383 | 2383 |
from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 2384 | 2384 |
|
| 2385 | 2385 |
|
| 2386 |
-## 3.3 CORS Requests |
|
| 2386 |
+### 3.3 CORS Requests |
|
| 2387 | 2387 |
|
| 2388 | 2388 |
To set cross origin requests to the Engine API please give values to |
| 2389 | 2389 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |
| ... | ... |
@@ -16,8 +16,6 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.21 |
|
| 20 |
- |
|
| 21 | 19 |
## 1. Brief introduction |
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| ... | ... |
@@ -28,11 +26,11 @@ redirect_from: |
| 28 | 28 |
- When the client API version is newer than the daemon's, these calls return an HTTP |
| 29 | 29 |
`400 Bad Request` error message. |
| 30 | 30 |
|
| 31 |
-# 2. Endpoints |
|
| 31 |
+## 2. Endpoints |
|
| 32 | 32 |
|
| 33 |
-## 2.1 Containers |
|
| 33 |
+### 2.1 Containers |
|
| 34 | 34 |
|
| 35 |
-### List containers |
|
| 35 |
+#### List containers |
|
| 36 | 36 |
|
| 37 | 37 |
`GET /containers/json` |
| 38 | 38 |
|
| ... | ... |
@@ -129,7 +127,7 @@ List containers |
| 129 | 129 |
- **400** – bad parameter |
| 130 | 130 |
- **500** – server error |
| 131 | 131 |
|
| 132 |
-### Create a container |
|
| 132 |
+#### Create a container |
|
| 133 | 133 |
|
| 134 | 134 |
`POST /containers/create` |
| 135 | 135 |
|
| ... | ... |
@@ -347,7 +345,7 @@ Create a container |
| 347 | 347 |
- **409** – conflict |
| 348 | 348 |
- **500** – server error |
| 349 | 349 |
|
| 350 |
-### Inspect a container |
|
| 350 |
+#### Inspect a container |
|
| 351 | 351 |
|
| 352 | 352 |
`GET /containers/(id or name)/json` |
| 353 | 353 |
|
| ... | ... |
@@ -537,7 +535,7 @@ Return low-level information on the container `id` |
| 537 | 537 |
- **404** – no such container |
| 538 | 538 |
- **500** – server error |
| 539 | 539 |
|
| 540 |
-### List processes running inside a container |
|
| 540 |
+#### List processes running inside a container |
|
| 541 | 541 |
|
| 542 | 542 |
`GET /containers/(id or name)/top` |
| 543 | 543 |
|
| ... | ... |
@@ -601,7 +599,7 @@ supported on Windows. |
| 601 | 601 |
- **404** – no such container |
| 602 | 602 |
- **500** – server error |
| 603 | 603 |
|
| 604 |
-### Get container logs |
|
| 604 |
+#### Get container logs |
|
| 605 | 605 |
|
| 606 | 606 |
`GET /containers/(id or name)/logs` |
| 607 | 607 |
|
| ... | ... |
@@ -643,7 +641,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 643 | 643 |
- **404** – no such container |
| 644 | 644 |
- **500** – server error |
| 645 | 645 |
|
| 646 |
-### Inspect changes on a container's filesystem |
|
| 646 |
+#### Inspect changes on a container's filesystem |
|
| 647 | 647 |
|
| 648 | 648 |
`GET /containers/(id or name)/changes` |
| 649 | 649 |
|
| ... | ... |
@@ -685,7 +683,7 @@ Values for `Kind`: |
| 685 | 685 |
- **404** – no such container |
| 686 | 686 |
- **500** – server error |
| 687 | 687 |
|
| 688 |
-### Export a container |
|
| 688 |
+#### Export a container |
|
| 689 | 689 |
|
| 690 | 690 |
`GET /containers/(id or name)/export` |
| 691 | 691 |
|
| ... | ... |
@@ -710,7 +708,7 @@ Export the contents of container `id` |
| 710 | 710 |
- **404** – no such container |
| 711 | 711 |
- **500** – server error |
| 712 | 712 |
|
| 713 |
-### Get container stats based on resource usage |
|
| 713 |
+#### Get container stats based on resource usage |
|
| 714 | 714 |
|
| 715 | 715 |
`GET /containers/(id or name)/stats` |
| 716 | 716 |
|
| ... | ... |
@@ -831,7 +829,7 @@ The precpu_stats is the cpu statistic of last read, which is used for calculatin |
| 831 | 831 |
- **404** – no such container |
| 832 | 832 |
- **500** – server error |
| 833 | 833 |
|
| 834 |
-### Resize a container TTY |
|
| 834 |
+#### Resize a container TTY |
|
| 835 | 835 |
|
| 836 | 836 |
`POST /containers/(id or name)/resize` |
| 837 | 837 |
|
| ... | ... |
@@ -858,7 +856,7 @@ Resize the TTY for container with `id`. The unit is number of characters. You m |
| 858 | 858 |
- **404** – No such container |
| 859 | 859 |
- **500** – Cannot resize container |
| 860 | 860 |
|
| 861 |
-### Start a container |
|
| 861 |
+#### Start a container |
|
| 862 | 862 |
|
| 863 | 863 |
`POST /containers/(id or name)/start` |
| 864 | 864 |
|
| ... | ... |
@@ -883,7 +881,7 @@ Start the container `id` |
| 883 | 883 |
- **404** – no such container |
| 884 | 884 |
- **500** – server error |
| 885 | 885 |
|
| 886 |
-### Stop a container |
|
| 886 |
+#### Stop a container |
|
| 887 | 887 |
|
| 888 | 888 |
`POST /containers/(id or name)/stop` |
| 889 | 889 |
|
| ... | ... |
@@ -908,7 +906,7 @@ Stop the container `id` |
| 908 | 908 |
- **404** – no such container |
| 909 | 909 |
- **500** – server error |
| 910 | 910 |
|
| 911 |
-### Restart a container |
|
| 911 |
+#### Restart a container |
|
| 912 | 912 |
|
| 913 | 913 |
`POST /containers/(id or name)/restart` |
| 914 | 914 |
|
| ... | ... |
@@ -932,7 +930,7 @@ Restart the container `id` |
| 932 | 932 |
- **404** – no such container |
| 933 | 933 |
- **500** – server error |
| 934 | 934 |
|
| 935 |
-### Kill a container |
|
| 935 |
+#### Kill a container |
|
| 936 | 936 |
|
| 937 | 937 |
`POST /containers/(id or name)/kill` |
| 938 | 938 |
|
| ... | ... |
@@ -957,7 +955,7 @@ Kill the container `id` |
| 957 | 957 |
- **404** – no such container |
| 958 | 958 |
- **500** – server error |
| 959 | 959 |
|
| 960 |
-### Rename a container |
|
| 960 |
+#### Rename a container |
|
| 961 | 961 |
|
| 962 | 962 |
`POST /containers/(id or name)/rename` |
| 963 | 963 |
|
| ... | ... |
@@ -982,7 +980,7 @@ Rename the container `id` to a `new_name` |
| 982 | 982 |
- **409** - conflict name already assigned |
| 983 | 983 |
- **500** – server error |
| 984 | 984 |
|
| 985 |
-### Pause a container |
|
| 985 |
+#### Pause a container |
|
| 986 | 986 |
|
| 987 | 987 |
`POST /containers/(id or name)/pause` |
| 988 | 988 |
|
| ... | ... |
@@ -1002,7 +1000,7 @@ Pause the container `id` |
| 1002 | 1002 |
- **404** – no such container |
| 1003 | 1003 |
- **500** – server error |
| 1004 | 1004 |
|
| 1005 |
-### Unpause a container |
|
| 1005 |
+#### Unpause a container |
|
| 1006 | 1006 |
|
| 1007 | 1007 |
`POST /containers/(id or name)/unpause` |
| 1008 | 1008 |
|
| ... | ... |
@@ -1022,7 +1020,7 @@ Unpause the container `id` |
| 1022 | 1022 |
- **404** – no such container |
| 1023 | 1023 |
- **500** – server error |
| 1024 | 1024 |
|
| 1025 |
-### Attach to a container |
|
| 1025 |
+#### Attach to a container |
|
| 1026 | 1026 |
|
| 1027 | 1027 |
`POST /containers/(id or name)/attach` |
| 1028 | 1028 |
|
| ... | ... |
@@ -1107,7 +1105,7 @@ The simplest way to implement the Attach protocol is the following: |
| 1107 | 1107 |
4. Read the extracted size and output it on the correct output. |
| 1108 | 1108 |
5. Goto 1. |
| 1109 | 1109 |
|
| 1110 |
-### Attach to a container (websocket) |
|
| 1110 |
+#### Attach to a container (websocket) |
|
| 1111 | 1111 |
|
| 1112 | 1112 |
`GET /containers/(id or name)/attach/ws` |
| 1113 | 1113 |
|
| ... | ... |
@@ -1144,7 +1142,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1144 | 1144 |
- **404** – no such container |
| 1145 | 1145 |
- **500** – server error |
| 1146 | 1146 |
|
| 1147 |
-### Wait a container |
|
| 1147 |
+#### Wait a container |
|
| 1148 | 1148 |
|
| 1149 | 1149 |
`POST /containers/(id or name)/wait` |
| 1150 | 1150 |
|
| ... | ... |
@@ -1167,7 +1165,7 @@ Block until container `id` stops, then returns the exit code |
| 1167 | 1167 |
- **404** – no such container |
| 1168 | 1168 |
- **500** – server error |
| 1169 | 1169 |
|
| 1170 |
-### Remove a container |
|
| 1170 |
+#### Remove a container |
|
| 1171 | 1171 |
|
| 1172 | 1172 |
`DELETE /containers/(id or name)` |
| 1173 | 1173 |
|
| ... | ... |
@@ -1196,7 +1194,7 @@ Remove the container `id` from the filesystem |
| 1196 | 1196 |
- **409** – conflict |
| 1197 | 1197 |
- **500** – server error |
| 1198 | 1198 |
|
| 1199 |
-### Copy files or folders from a container |
|
| 1199 |
+#### Copy files or folders from a container |
|
| 1200 | 1200 |
|
| 1201 | 1201 |
`POST /containers/(id or name)/copy` |
| 1202 | 1202 |
|
| ... | ... |
@@ -1228,14 +1226,14 @@ Copy files or folders of container `id` |
| 1228 | 1228 |
- **404** – no such container |
| 1229 | 1229 |
- **500** – server error |
| 1230 | 1230 |
|
| 1231 |
-### Retrieving information about files and folders in a container |
|
| 1231 |
+#### Retrieving information about files and folders in a container |
|
| 1232 | 1232 |
|
| 1233 | 1233 |
`HEAD /containers/(id or name)/archive` |
| 1234 | 1234 |
|
| 1235 | 1235 |
See the description of the `X-Docker-Container-Path-Stat` header in the |
| 1236 | 1236 |
following section. |
| 1237 | 1237 |
|
| 1238 |
-### Get an archive of a filesystem resource in a container |
|
| 1238 |
+#### Get an archive of a filesystem resource in a container |
|
| 1239 | 1239 |
|
| 1240 | 1240 |
`GET /containers/(id or name)/archive` |
| 1241 | 1241 |
|
| ... | ... |
@@ -1300,7 +1298,7 @@ desired. |
| 1300 | 1300 |
- no such file or directory (**path** does not exist) |
| 1301 | 1301 |
- **500** - server error |
| 1302 | 1302 |
|
| 1303 |
-### Extract an archive of files or folders to a directory in a container |
|
| 1303 |
+#### Extract an archive of files or folders to a directory in a container |
|
| 1304 | 1304 |
|
| 1305 | 1305 |
`PUT /containers/(id or name)/archive` |
| 1306 | 1306 |
|
| ... | ... |
@@ -1348,9 +1346,9 @@ Upload a tar archive to be extracted to a path in the filesystem of container |
| 1348 | 1348 |
- no such file or directory (**path** resource does not exist) |
| 1349 | 1349 |
- **500** – server error |
| 1350 | 1350 |
|
| 1351 |
-## 2.2 Images |
|
| 1351 |
+### 2.2 Images |
|
| 1352 | 1352 |
|
| 1353 |
-### List Images |
|
| 1353 |
+#### List Images |
|
| 1354 | 1354 |
|
| 1355 | 1355 |
`GET /images/json` |
| 1356 | 1356 |
|
| ... | ... |
@@ -1441,7 +1439,7 @@ references on the command line. |
| 1441 | 1441 |
- `label=key` or `label="key=value"` of an image label |
| 1442 | 1442 |
- **filter** - only return images with the specified name |
| 1443 | 1443 |
|
| 1444 |
-### Build image from a Dockerfile |
|
| 1444 |
+#### Build image from a Dockerfile |
|
| 1445 | 1445 |
|
| 1446 | 1446 |
`POST /build` |
| 1447 | 1447 |
|
| ... | ... |
@@ -1545,7 +1543,7 @@ or being killed. |
| 1545 | 1545 |
- **200** – no error |
| 1546 | 1546 |
- **500** – server error |
| 1547 | 1547 |
|
| 1548 |
-### Create an image |
|
| 1548 |
+#### Create an image |
|
| 1549 | 1549 |
|
| 1550 | 1550 |
`POST /images/create` |
| 1551 | 1551 |
|
| ... | ... |
@@ -1593,7 +1591,7 @@ a base64-encoded AuthConfig object. |
| 1593 | 1593 |
|
| 1594 | 1594 |
|
| 1595 | 1595 |
|
| 1596 |
-### Inspect an image |
|
| 1596 |
+#### Inspect an image |
|
| 1597 | 1597 |
|
| 1598 | 1598 |
`GET /images/(name)/json` |
| 1599 | 1599 |
|
| ... | ... |
@@ -1704,7 +1702,7 @@ Return low-level information on the image `name` |
| 1704 | 1704 |
- **404** – no such image |
| 1705 | 1705 |
- **500** – server error |
| 1706 | 1706 |
|
| 1707 |
-### Get the history of an image |
|
| 1707 |
+#### Get the history of an image |
|
| 1708 | 1708 |
|
| 1709 | 1709 |
`GET /images/(name)/history` |
| 1710 | 1710 |
|
| ... | ... |
@@ -1758,7 +1756,7 @@ Return the history of the image `name` |
| 1758 | 1758 |
- **404** – no such image |
| 1759 | 1759 |
- **500** – server error |
| 1760 | 1760 |
|
| 1761 |
-### Push an image on the registry |
|
| 1761 |
+#### Push an image on the registry |
|
| 1762 | 1762 |
|
| 1763 | 1763 |
`POST /images/(name)/push` |
| 1764 | 1764 |
|
| ... | ... |
@@ -1801,7 +1799,7 @@ then be used in the URL. This duplicates the command line's flow. |
| 1801 | 1801 |
- **404** – no such image |
| 1802 | 1802 |
- **500** – server error |
| 1803 | 1803 |
|
| 1804 |
-### Tag an image into a repository |
|
| 1804 |
+#### Tag an image into a repository |
|
| 1805 | 1805 |
|
| 1806 | 1806 |
`POST /images/(name)/tag` |
| 1807 | 1807 |
|
| ... | ... |
@@ -1829,7 +1827,7 @@ Tag the image `name` into a repository |
| 1829 | 1829 |
- **409** – conflict |
| 1830 | 1830 |
- **500** – server error |
| 1831 | 1831 |
|
| 1832 |
-### Remove an image |
|
| 1832 |
+#### Remove an image |
|
| 1833 | 1833 |
|
| 1834 | 1834 |
`DELETE /images/(name)` |
| 1835 | 1835 |
|
| ... | ... |
@@ -1862,7 +1860,7 @@ Remove the image `name` from the filesystem |
| 1862 | 1862 |
- **409** – conflict |
| 1863 | 1863 |
- **500** – server error |
| 1864 | 1864 |
|
| 1865 |
-### Search images |
|
| 1865 |
+#### Search images |
|
| 1866 | 1866 |
|
| 1867 | 1867 |
`GET /images/search` |
| 1868 | 1868 |
|
| ... | ... |
@@ -1915,9 +1913,9 @@ Search for an image on [Docker Hub](https://hub.docker.com). |
| 1915 | 1915 |
- **200** – no error |
| 1916 | 1916 |
- **500** – server error |
| 1917 | 1917 |
|
| 1918 |
-## 2.3 Misc |
|
| 1918 |
+### 2.3 Misc |
|
| 1919 | 1919 |
|
| 1920 |
-### Check auth configuration |
|
| 1920 |
+#### Check auth configuration |
|
| 1921 | 1921 |
|
| 1922 | 1922 |
`POST /auth` |
| 1923 | 1923 |
|
| ... | ... |
@@ -1945,7 +1943,7 @@ Get the default username and email |
| 1945 | 1945 |
- **204** – no error |
| 1946 | 1946 |
- **500** – server error |
| 1947 | 1947 |
|
| 1948 |
-### Display system-wide information |
|
| 1948 |
+#### Display system-wide information |
|
| 1949 | 1949 |
|
| 1950 | 1950 |
`GET /info` |
| 1951 | 1951 |
|
| ... | ... |
@@ -2016,7 +2014,7 @@ Display system-wide information |
| 2016 | 2016 |
- **200** – no error |
| 2017 | 2017 |
- **500** – server error |
| 2018 | 2018 |
|
| 2019 |
-### Show the docker version information |
|
| 2019 |
+#### Show the docker version information |
|
| 2020 | 2020 |
|
| 2021 | 2021 |
`GET /version` |
| 2022 | 2022 |
|
| ... | ... |
@@ -2047,7 +2045,7 @@ Show the docker version information |
| 2047 | 2047 |
- **200** – no error |
| 2048 | 2048 |
- **500** – server error |
| 2049 | 2049 |
|
| 2050 |
-### Ping the docker server |
|
| 2050 |
+#### Ping the docker server |
|
| 2051 | 2051 |
|
| 2052 | 2052 |
`GET /_ping` |
| 2053 | 2053 |
|
| ... | ... |
@@ -2069,7 +2067,7 @@ Ping the docker server |
| 2069 | 2069 |
- **200** - no error |
| 2070 | 2070 |
- **500** - server error |
| 2071 | 2071 |
|
| 2072 |
-### Create a new image from a container's changes |
|
| 2072 |
+#### Create a new image from a container's changes |
|
| 2073 | 2073 |
|
| 2074 | 2074 |
`POST /commit` |
| 2075 | 2075 |
|
| ... | ... |
@@ -2141,7 +2139,7 @@ Create a new image from a container's changes |
| 2141 | 2141 |
- **404** – no such container |
| 2142 | 2142 |
- **500** – server error |
| 2143 | 2143 |
|
| 2144 |
-### Monitor Docker's events |
|
| 2144 |
+#### Monitor Docker's events |
|
| 2145 | 2145 |
|
| 2146 | 2146 |
`GET /events` |
| 2147 | 2147 |
|
| ... | ... |
@@ -2184,7 +2182,7 @@ Docker images report the following events: |
| 2184 | 2184 |
- **200** – no error |
| 2185 | 2185 |
- **500** – server error |
| 2186 | 2186 |
|
| 2187 |
-### Get a tarball containing all images in a repository |
|
| 2187 |
+#### Get a tarball containing all images in a repository |
|
| 2188 | 2188 |
|
| 2189 | 2189 |
`GET /images/(name)/get` |
| 2190 | 2190 |
|
| ... | ... |
@@ -2214,7 +2212,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2214 | 2214 |
- **200** – no error |
| 2215 | 2215 |
- **500** – server error |
| 2216 | 2216 |
|
| 2217 |
-### Get a tarball containing all images |
|
| 2217 |
+#### Get a tarball containing all images |
|
| 2218 | 2218 |
|
| 2219 | 2219 |
`GET /images/get` |
| 2220 | 2220 |
|
| ... | ... |
@@ -2243,7 +2241,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2243 | 2243 |
- **200** – no error |
| 2244 | 2244 |
- **500** – server error |
| 2245 | 2245 |
|
| 2246 |
-### Load a tarball with a set of images and tags into docker |
|
| 2246 |
+#### Load a tarball with a set of images and tags into docker |
|
| 2247 | 2247 |
|
| 2248 | 2248 |
`POST /images/load` |
| 2249 | 2249 |
|
| ... | ... |
@@ -2266,7 +2264,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2266 | 2266 |
- **200** – no error |
| 2267 | 2267 |
- **500** – server error |
| 2268 | 2268 |
|
| 2269 |
-### Image tarball format |
|
| 2269 |
+#### Image tarball format |
|
| 2270 | 2270 |
|
| 2271 | 2271 |
An image tarball contains one directory per image layer (named using its long ID), |
| 2272 | 2272 |
each containing these files: |
| ... | ... |
@@ -2287,7 +2285,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 2287 | 2287 |
} |
| 2288 | 2288 |
``` |
| 2289 | 2289 |
|
| 2290 |
-### Exec Create |
|
| 2290 |
+#### Exec Create |
|
| 2291 | 2291 |
|
| 2292 | 2292 |
`POST /containers/(id or name)/exec` |
| 2293 | 2293 |
|
| ... | ... |
@@ -2337,7 +2335,7 @@ Sets up an exec instance in a running container `id` |
| 2337 | 2337 |
- **409** - container is paused |
| 2338 | 2338 |
- **500** - server error |
| 2339 | 2339 |
|
| 2340 |
-### Exec Start |
|
| 2340 |
+#### Exec Start |
|
| 2341 | 2341 |
|
| 2342 | 2342 |
`POST /exec/(id)/start` |
| 2343 | 2343 |
|
| ... | ... |
@@ -2379,7 +2377,7 @@ interactive session with the `exec` command. |
| 2379 | 2379 |
|
| 2380 | 2380 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 2381 | 2381 |
|
| 2382 |
-### Exec Resize |
|
| 2382 |
+#### Exec Resize |
|
| 2383 | 2383 |
|
| 2384 | 2384 |
`POST /exec/(id)/resize` |
| 2385 | 2385 |
|
| ... | ... |
@@ -2406,7 +2404,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2406 | 2406 |
- **201** – no error |
| 2407 | 2407 |
- **404** – no such exec instance |
| 2408 | 2408 |
|
| 2409 |
-### Exec Inspect |
|
| 2409 |
+#### Exec Inspect |
|
| 2410 | 2410 |
|
| 2411 | 2411 |
`GET /exec/(id)/json` |
| 2412 | 2412 |
|
| ... | ... |
@@ -2532,9 +2530,9 @@ Return low-level information about the `exec` command `id`. |
| 2532 | 2532 |
- **404** – no such exec instance |
| 2533 | 2533 |
- **500** - server error |
| 2534 | 2534 |
|
| 2535 |
-## 2.4 Volumes |
|
| 2535 |
+### 2.4 Volumes |
|
| 2536 | 2536 |
|
| 2537 |
-### List volumes |
|
| 2537 |
+#### List volumes |
|
| 2538 | 2538 |
|
| 2539 | 2539 |
`GET /volumes` |
| 2540 | 2540 |
|
| ... | ... |
@@ -2566,7 +2564,7 @@ Return low-level information about the `exec` command `id`. |
| 2566 | 2566 |
- **200** - no error |
| 2567 | 2567 |
- **500** - server error |
| 2568 | 2568 |
|
| 2569 |
-### Create a volume |
|
| 2569 |
+#### Create a volume |
|
| 2570 | 2570 |
|
| 2571 | 2571 |
`POST /volumes/create` |
| 2572 | 2572 |
|
| ... | ... |
@@ -2604,7 +2602,7 @@ Create a volume |
| 2604 | 2604 |
- **DriverOpts** - A mapping of driver options and values. These options are |
| 2605 | 2605 |
passed directly to the driver and are driver specific. |
| 2606 | 2606 |
|
| 2607 |
-### Inspect a volume |
|
| 2607 |
+#### Inspect a volume |
|
| 2608 | 2608 |
|
| 2609 | 2609 |
`GET /volumes/(name)` |
| 2610 | 2610 |
|
| ... | ... |
@@ -2631,7 +2629,7 @@ Return low-level information on the volume `name` |
| 2631 | 2631 |
- **404** - no such volume |
| 2632 | 2632 |
- **500** - server error |
| 2633 | 2633 |
|
| 2634 |
-### Remove a volume |
|
| 2634 |
+#### Remove a volume |
|
| 2635 | 2635 |
|
| 2636 | 2636 |
`DELETE /volumes/(name)` |
| 2637 | 2637 |
|
| ... | ... |
@@ -2652,9 +2650,9 @@ Instruct the driver to remove the volume (`name`). |
| 2652 | 2652 |
- **409** - volume is in use and cannot be removed |
| 2653 | 2653 |
- **500** - server error |
| 2654 | 2654 |
|
| 2655 |
-## 2.5 Networks |
|
| 2655 |
+### 2.5 Networks |
|
| 2656 | 2656 |
|
| 2657 |
-### List networks |
|
| 2657 |
+#### List networks |
|
| 2658 | 2658 |
|
| 2659 | 2659 |
`GET /networks` |
| 2660 | 2660 |
|
| ... | ... |
@@ -2735,7 +2733,7 @@ Content-Type: application/json |
| 2735 | 2735 |
- **200** - no error |
| 2736 | 2736 |
- **500** - server error |
| 2737 | 2737 |
|
| 2738 |
-### Inspect network |
|
| 2738 |
+#### Inspect network |
|
| 2739 | 2739 |
|
| 2740 | 2740 |
`GET /networks/<network-id>` |
| 2741 | 2741 |
|
| ... | ... |
@@ -2786,7 +2784,7 @@ Content-Type: application/json |
| 2786 | 2786 |
- **200** - no error |
| 2787 | 2787 |
- **404** - network not found |
| 2788 | 2788 |
|
| 2789 |
-### Create a network |
|
| 2789 |
+#### Create a network |
|
| 2790 | 2790 |
|
| 2791 | 2791 |
`POST /networks/create` |
| 2792 | 2792 |
|
| ... | ... |
@@ -2844,7 +2842,7 @@ Content-Type: application/json |
| 2844 | 2844 |
`{"Subnet": <CIDR>, "IPRange": <CIDR>, "Gateway": <IP address>, "AuxAddress": <device_name:IP address>}`
|
| 2845 | 2845 |
- **Options** - Network specific options to be used by the drivers |
| 2846 | 2846 |
|
| 2847 |
-### Connect a container to a network |
|
| 2847 |
+#### Connect a container to a network |
|
| 2848 | 2848 |
|
| 2849 | 2849 |
`POST /networks/(id)/connect` |
| 2850 | 2850 |
|
| ... | ... |
@@ -2875,7 +2873,7 @@ Content-Type: application/json |
| 2875 | 2875 |
|
| 2876 | 2876 |
- **container** - container-id/name to be connected to the network |
| 2877 | 2877 |
|
| 2878 |
-### Disconnect a container from a network |
|
| 2878 |
+#### Disconnect a container from a network |
|
| 2879 | 2879 |
|
| 2880 | 2880 |
`POST /networks/(id)/disconnect` |
| 2881 | 2881 |
|
| ... | ... |
@@ -2906,7 +2904,7 @@ Content-Type: application/json |
| 2906 | 2906 |
|
| 2907 | 2907 |
- **Container** - container-id/name to be disconnected from a network |
| 2908 | 2908 |
|
| 2909 |
-### Remove a network |
|
| 2909 |
+#### Remove a network |
|
| 2910 | 2910 |
|
| 2911 | 2911 |
`DELETE /networks/(id)` |
| 2912 | 2912 |
|
| ... | ... |
@@ -2926,9 +2924,9 @@ Instruct the driver to remove the network (`id`). |
| 2926 | 2926 |
- **404** - no such network |
| 2927 | 2927 |
- **500** - server error |
| 2928 | 2928 |
|
| 2929 |
-# 3. Going further |
|
| 2929 |
+## 3. Going further |
|
| 2930 | 2930 |
|
| 2931 |
-## 3.1 Inside `docker run` |
|
| 2931 |
+### 3.1 Inside `docker run` |
|
| 2932 | 2932 |
|
| 2933 | 2933 |
As an example, the `docker run` command line makes the following API calls: |
| 2934 | 2934 |
|
| ... | ... |
@@ -2946,7 +2944,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 2946 | 2946 |
|
| 2947 | 2947 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 2948 | 2948 |
|
| 2949 |
-## 3.2 Hijacking |
|
| 2949 |
+### 3.2 Hijacking |
|
| 2950 | 2950 |
|
| 2951 | 2951 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 2952 | 2952 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -2961,7 +2959,7 @@ When Docker daemon detects the `Upgrade` header, it switches its status code |
| 2961 | 2961 |
from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 2962 | 2962 |
|
| 2963 | 2963 |
|
| 2964 |
-## 3.3 CORS Requests |
|
| 2964 |
+### 3.3 CORS Requests |
|
| 2965 | 2965 |
|
| 2966 | 2966 |
To set cross origin requests to the Engine API please give values to |
| 2967 | 2967 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |
| ... | ... |
@@ -16,9 +16,7 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.22 |
|
| 20 |
- |
|
| 21 |
-# 1. Brief introduction |
|
| 19 |
+## 1. Brief introduction |
|
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| 24 | 22 |
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket). |
| ... | ... |
@@ -26,11 +24,11 @@ redirect_from: |
| 26 | 26 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 27 | 27 |
`stdin` and `stderr`. |
| 28 | 28 |
|
| 29 |
-# 2. Endpoints |
|
| 29 |
+## 2. Endpoints |
|
| 30 | 30 |
|
| 31 |
-## 2.1 Containers |
|
| 31 |
+### 2.1 Containers |
|
| 32 | 32 |
|
| 33 |
-### List containers |
|
| 33 |
+#### List containers |
|
| 34 | 34 |
|
| 35 | 35 |
`GET /containers/json` |
| 36 | 36 |
|
| ... | ... |
@@ -212,7 +210,7 @@ List containers |
| 212 | 212 |
- **400** – bad parameter |
| 213 | 213 |
- **500** – server error |
| 214 | 214 |
|
| 215 |
-### Create a container |
|
| 215 |
+#### Create a container |
|
| 216 | 216 |
|
| 217 | 217 |
`POST /containers/create` |
| 218 | 218 |
|
| ... | ... |
@@ -460,7 +458,7 @@ Create a container |
| 460 | 460 |
- **409** – conflict |
| 461 | 461 |
- **500** – server error |
| 462 | 462 |
|
| 463 |
-### Inspect a container |
|
| 463 |
+#### Inspect a container |
|
| 464 | 464 |
|
| 465 | 465 |
`GET /containers/(id or name)/json` |
| 466 | 466 |
|
| ... | ... |
@@ -663,7 +661,7 @@ Return low-level information on the container `id` |
| 663 | 663 |
- **404** – no such container |
| 664 | 664 |
- **500** – server error |
| 665 | 665 |
|
| 666 |
-### List processes running inside a container |
|
| 666 |
+#### List processes running inside a container |
|
| 667 | 667 |
|
| 668 | 668 |
`GET /containers/(id or name)/top` |
| 669 | 669 |
|
| ... | ... |
@@ -727,7 +725,7 @@ supported on Windows. |
| 727 | 727 |
- **404** – no such container |
| 728 | 728 |
- **500** – server error |
| 729 | 729 |
|
| 730 |
-### Get container logs |
|
| 730 |
+#### Get container logs |
|
| 731 | 731 |
|
| 732 | 732 |
`GET /containers/(id or name)/logs` |
| 733 | 733 |
|
| ... | ... |
@@ -769,7 +767,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 769 | 769 |
- **404** – no such container |
| 770 | 770 |
- **500** – server error |
| 771 | 771 |
|
| 772 |
-### Inspect changes on a container's filesystem |
|
| 772 |
+#### Inspect changes on a container's filesystem |
|
| 773 | 773 |
|
| 774 | 774 |
`GET /containers/(id or name)/changes` |
| 775 | 775 |
|
| ... | ... |
@@ -811,7 +809,7 @@ Values for `Kind`: |
| 811 | 811 |
- **404** – no such container |
| 812 | 812 |
- **500** – server error |
| 813 | 813 |
|
| 814 |
-### Export a container |
|
| 814 |
+#### Export a container |
|
| 815 | 815 |
|
| 816 | 816 |
`GET /containers/(id or name)/export` |
| 817 | 817 |
|
| ... | ... |
@@ -836,7 +834,7 @@ Export the contents of container `id` |
| 836 | 836 |
- **404** – no such container |
| 837 | 837 |
- **500** – server error |
| 838 | 838 |
|
| 839 |
-### Get container stats based on resource usage |
|
| 839 |
+#### Get container stats based on resource usage |
|
| 840 | 840 |
|
| 841 | 841 |
`GET /containers/(id or name)/stats` |
| 842 | 842 |
|
| ... | ... |
@@ -957,7 +955,7 @@ The precpu_stats is the cpu statistic of last read, which is used for calculatin |
| 957 | 957 |
- **404** – no such container |
| 958 | 958 |
- **500** – server error |
| 959 | 959 |
|
| 960 |
-### Resize a container TTY |
|
| 960 |
+#### Resize a container TTY |
|
| 961 | 961 |
|
| 962 | 962 |
`POST /containers/(id or name)/resize` |
| 963 | 963 |
|
| ... | ... |
@@ -984,7 +982,7 @@ Resize the TTY for container with `id`. The unit is number of characters. You m |
| 984 | 984 |
- **404** – No such container |
| 985 | 985 |
- **500** – Cannot resize container |
| 986 | 986 |
|
| 987 |
-### Start a container |
|
| 987 |
+#### Start a container |
|
| 988 | 988 |
|
| 989 | 989 |
`POST /containers/(id or name)/start` |
| 990 | 990 |
|
| ... | ... |
@@ -1015,7 +1013,7 @@ Start the container `id` |
| 1015 | 1015 |
- **404** – no such container |
| 1016 | 1016 |
- **500** – server error |
| 1017 | 1017 |
|
| 1018 |
-### Stop a container |
|
| 1018 |
+#### Stop a container |
|
| 1019 | 1019 |
|
| 1020 | 1020 |
`POST /containers/(id or name)/stop` |
| 1021 | 1021 |
|
| ... | ... |
@@ -1040,7 +1038,7 @@ Stop the container `id` |
| 1040 | 1040 |
- **404** – no such container |
| 1041 | 1041 |
- **500** – server error |
| 1042 | 1042 |
|
| 1043 |
-### Restart a container |
|
| 1043 |
+#### Restart a container |
|
| 1044 | 1044 |
|
| 1045 | 1045 |
`POST /containers/(id or name)/restart` |
| 1046 | 1046 |
|
| ... | ... |
@@ -1064,7 +1062,7 @@ Restart the container `id` |
| 1064 | 1064 |
- **404** – no such container |
| 1065 | 1065 |
- **500** – server error |
| 1066 | 1066 |
|
| 1067 |
-### Kill a container |
|
| 1067 |
+#### Kill a container |
|
| 1068 | 1068 |
|
| 1069 | 1069 |
`POST /containers/(id or name)/kill` |
| 1070 | 1070 |
|
| ... | ... |
@@ -1089,7 +1087,7 @@ Kill the container `id` |
| 1089 | 1089 |
- **404** – no such container |
| 1090 | 1090 |
- **500** – server error |
| 1091 | 1091 |
|
| 1092 |
-### Update a container |
|
| 1092 |
+#### Update a container |
|
| 1093 | 1093 |
|
| 1094 | 1094 |
`POST /containers/(id or name)/update` |
| 1095 | 1095 |
|
| ... | ... |
@@ -1129,7 +1127,7 @@ Update resource configs of one or more containers. |
| 1129 | 1129 |
- **404** – no such container |
| 1130 | 1130 |
- **500** – server error |
| 1131 | 1131 |
|
| 1132 |
-### Rename a container |
|
| 1132 |
+#### Rename a container |
|
| 1133 | 1133 |
|
| 1134 | 1134 |
`POST /containers/(id or name)/rename` |
| 1135 | 1135 |
|
| ... | ... |
@@ -1154,7 +1152,7 @@ Rename the container `id` to a `new_name` |
| 1154 | 1154 |
- **409** - conflict name already assigned |
| 1155 | 1155 |
- **500** – server error |
| 1156 | 1156 |
|
| 1157 |
-### Pause a container |
|
| 1157 |
+#### Pause a container |
|
| 1158 | 1158 |
|
| 1159 | 1159 |
`POST /containers/(id or name)/pause` |
| 1160 | 1160 |
|
| ... | ... |
@@ -1174,7 +1172,7 @@ Pause the container `id` |
| 1174 | 1174 |
- **404** – no such container |
| 1175 | 1175 |
- **500** – server error |
| 1176 | 1176 |
|
| 1177 |
-### Unpause a container |
|
| 1177 |
+#### Unpause a container |
|
| 1178 | 1178 |
|
| 1179 | 1179 |
`POST /containers/(id or name)/unpause` |
| 1180 | 1180 |
|
| ... | ... |
@@ -1194,7 +1192,7 @@ Unpause the container `id` |
| 1194 | 1194 |
- **404** – no such container |
| 1195 | 1195 |
- **500** – server error |
| 1196 | 1196 |
|
| 1197 |
-### Attach to a container |
|
| 1197 |
+#### Attach to a container |
|
| 1198 | 1198 |
|
| 1199 | 1199 |
`POST /containers/(id or name)/attach` |
| 1200 | 1200 |
|
| ... | ... |
@@ -1283,7 +1281,7 @@ The simplest way to implement the Attach protocol is the following: |
| 1283 | 1283 |
4. Read the extracted size and output it on the correct output. |
| 1284 | 1284 |
5. Goto 1. |
| 1285 | 1285 |
|
| 1286 |
-### Attach to a container (websocket) |
|
| 1286 |
+#### Attach to a container (websocket) |
|
| 1287 | 1287 |
|
| 1288 | 1288 |
`GET /containers/(id or name)/attach/ws` |
| 1289 | 1289 |
|
| ... | ... |
@@ -1323,7 +1321,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1323 | 1323 |
- **404** – no such container |
| 1324 | 1324 |
- **500** – server error |
| 1325 | 1325 |
|
| 1326 |
-### Wait a container |
|
| 1326 |
+#### Wait a container |
|
| 1327 | 1327 |
|
| 1328 | 1328 |
`POST /containers/(id or name)/wait` |
| 1329 | 1329 |
|
| ... | ... |
@@ -1346,7 +1344,7 @@ Block until container `id` stops, then returns the exit code |
| 1346 | 1346 |
- **404** – no such container |
| 1347 | 1347 |
- **500** – server error |
| 1348 | 1348 |
|
| 1349 |
-### Remove a container |
|
| 1349 |
+#### Remove a container |
|
| 1350 | 1350 |
|
| 1351 | 1351 |
`DELETE /containers/(id or name)` |
| 1352 | 1352 |
|
| ... | ... |
@@ -1375,7 +1373,7 @@ Remove the container `id` from the filesystem |
| 1375 | 1375 |
- **409** – conflict |
| 1376 | 1376 |
- **500** – server error |
| 1377 | 1377 |
|
| 1378 |
-### Copy files or folders from a container |
|
| 1378 |
+#### Copy files or folders from a container |
|
| 1379 | 1379 |
|
| 1380 | 1380 |
`POST /containers/(id or name)/copy` |
| 1381 | 1381 |
|
| ... | ... |
@@ -1407,14 +1405,14 @@ Copy files or folders of container `id` |
| 1407 | 1407 |
- **404** – no such container |
| 1408 | 1408 |
- **500** – server error |
| 1409 | 1409 |
|
| 1410 |
-### Retrieving information about files and folders in a container |
|
| 1410 |
+#### Retrieving information about files and folders in a container |
|
| 1411 | 1411 |
|
| 1412 | 1412 |
`HEAD /containers/(id or name)/archive` |
| 1413 | 1413 |
|
| 1414 | 1414 |
See the description of the `X-Docker-Container-Path-Stat` header in the |
| 1415 | 1415 |
following section. |
| 1416 | 1416 |
|
| 1417 |
-### Get an archive of a filesystem resource in a container |
|
| 1417 |
+#### Get an archive of a filesystem resource in a container |
|
| 1418 | 1418 |
|
| 1419 | 1419 |
`GET /containers/(id or name)/archive` |
| 1420 | 1420 |
|
| ... | ... |
@@ -1479,7 +1477,7 @@ desired. |
| 1479 | 1479 |
- no such file or directory (**path** does not exist) |
| 1480 | 1480 |
- **500** - server error |
| 1481 | 1481 |
|
| 1482 |
-### Extract an archive of files or folders to a directory in a container |
|
| 1482 |
+#### Extract an archive of files or folders to a directory in a container |
|
| 1483 | 1483 |
|
| 1484 | 1484 |
`PUT /containers/(id or name)/archive` |
| 1485 | 1485 |
|
| ... | ... |
@@ -1527,9 +1525,9 @@ Upload a tar archive to be extracted to a path in the filesystem of container |
| 1527 | 1527 |
- no such file or directory (**path** resource does not exist) |
| 1528 | 1528 |
- **500** – server error |
| 1529 | 1529 |
|
| 1530 |
-## 2.2 Images |
|
| 1530 |
+### 2.2 Images |
|
| 1531 | 1531 |
|
| 1532 |
-### List Images |
|
| 1532 |
+#### List Images |
|
| 1533 | 1533 |
|
| 1534 | 1534 |
`GET /images/json` |
| 1535 | 1535 |
|
| ... | ... |
@@ -1620,7 +1618,7 @@ references on the command line. |
| 1620 | 1620 |
- `label=key` or `label="key=value"` of an image label |
| 1621 | 1621 |
- **filter** - only return images with the specified name |
| 1622 | 1622 |
|
| 1623 |
-### Build image from a Dockerfile |
|
| 1623 |
+#### Build image from a Dockerfile |
|
| 1624 | 1624 |
|
| 1625 | 1625 |
`POST /build` |
| 1626 | 1626 |
|
| ... | ... |
@@ -1725,7 +1723,7 @@ or being killed. |
| 1725 | 1725 |
- **200** – no error |
| 1726 | 1726 |
- **500** – server error |
| 1727 | 1727 |
|
| 1728 |
-### Create an image |
|
| 1728 |
+#### Create an image |
|
| 1729 | 1729 |
|
| 1730 | 1730 |
`POST /images/create` |
| 1731 | 1731 |
|
| ... | ... |
@@ -1791,7 +1789,7 @@ a base64-encoded AuthConfig object. |
| 1791 | 1791 |
|
| 1792 | 1792 |
|
| 1793 | 1793 |
|
| 1794 |
-### Inspect an image |
|
| 1794 |
+#### Inspect an image |
|
| 1795 | 1795 |
|
| 1796 | 1796 |
`GET /images/(name)/json` |
| 1797 | 1797 |
|
| ... | ... |
@@ -1902,7 +1900,7 @@ Return low-level information on the image `name` |
| 1902 | 1902 |
- **404** – no such image |
| 1903 | 1903 |
- **500** – server error |
| 1904 | 1904 |
|
| 1905 |
-### Get the history of an image |
|
| 1905 |
+#### Get the history of an image |
|
| 1906 | 1906 |
|
| 1907 | 1907 |
`GET /images/(name)/history` |
| 1908 | 1908 |
|
| ... | ... |
@@ -1956,7 +1954,7 @@ Return the history of the image `name` |
| 1956 | 1956 |
- **404** – no such image |
| 1957 | 1957 |
- **500** – server error |
| 1958 | 1958 |
|
| 1959 |
-### Push an image on the registry |
|
| 1959 |
+#### Push an image on the registry |
|
| 1960 | 1960 |
|
| 1961 | 1961 |
`POST /images/(name)/push` |
| 1962 | 1962 |
|
| ... | ... |
@@ -2018,7 +2016,7 @@ The push is cancelled if the HTTP connection is closed. |
| 2018 | 2018 |
- **404** – no such image |
| 2019 | 2019 |
- **500** – server error |
| 2020 | 2020 |
|
| 2021 |
-### Tag an image into a repository |
|
| 2021 |
+#### Tag an image into a repository |
|
| 2022 | 2022 |
|
| 2023 | 2023 |
`POST /images/(name)/tag` |
| 2024 | 2024 |
|
| ... | ... |
@@ -2046,7 +2044,7 @@ Tag the image `name` into a repository |
| 2046 | 2046 |
- **409** – conflict |
| 2047 | 2047 |
- **500** – server error |
| 2048 | 2048 |
|
| 2049 |
-### Remove an image |
|
| 2049 |
+#### Remove an image |
|
| 2050 | 2050 |
|
| 2051 | 2051 |
`DELETE /images/(name)` |
| 2052 | 2052 |
|
| ... | ... |
@@ -2079,7 +2077,7 @@ Remove the image `name` from the filesystem |
| 2079 | 2079 |
- **409** – conflict |
| 2080 | 2080 |
- **500** – server error |
| 2081 | 2081 |
|
| 2082 |
-### Search images |
|
| 2082 |
+#### Search images |
|
| 2083 | 2083 |
|
| 2084 | 2084 |
`GET /images/search` |
| 2085 | 2085 |
|
| ... | ... |
@@ -2132,9 +2130,9 @@ Search for an image on [Docker Hub](https://hub.docker.com). |
| 2132 | 2132 |
- **200** – no error |
| 2133 | 2133 |
- **500** – server error |
| 2134 | 2134 |
|
| 2135 |
-## 2.3 Misc |
|
| 2135 |
+### 2.3 Misc |
|
| 2136 | 2136 |
|
| 2137 |
-### Check auth configuration |
|
| 2137 |
+#### Check auth configuration |
|
| 2138 | 2138 |
|
| 2139 | 2139 |
`POST /auth` |
| 2140 | 2140 |
|
| ... | ... |
@@ -2162,7 +2160,7 @@ Get the default username and email |
| 2162 | 2162 |
- **204** – no error |
| 2163 | 2163 |
- **500** – server error |
| 2164 | 2164 |
|
| 2165 |
-### Display system-wide information |
|
| 2165 |
+#### Display system-wide information |
|
| 2166 | 2166 |
|
| 2167 | 2167 |
`GET /info` |
| 2168 | 2168 |
|
| ... | ... |
@@ -2249,7 +2247,7 @@ Display system-wide information |
| 2249 | 2249 |
- **200** – no error |
| 2250 | 2250 |
- **500** – server error |
| 2251 | 2251 |
|
| 2252 |
-### Show the docker version information |
|
| 2252 |
+#### Show the docker version information |
|
| 2253 | 2253 |
|
| 2254 | 2254 |
`GET /version` |
| 2255 | 2255 |
|
| ... | ... |
@@ -2281,7 +2279,7 @@ Show the docker version information |
| 2281 | 2281 |
- **200** – no error |
| 2282 | 2282 |
- **500** – server error |
| 2283 | 2283 |
|
| 2284 |
-### Ping the docker server |
|
| 2284 |
+#### Ping the docker server |
|
| 2285 | 2285 |
|
| 2286 | 2286 |
`GET /_ping` |
| 2287 | 2287 |
|
| ... | ... |
@@ -2303,7 +2301,7 @@ Ping the docker server |
| 2303 | 2303 |
- **200** - no error |
| 2304 | 2304 |
- **500** - server error |
| 2305 | 2305 |
|
| 2306 |
-### Create a new image from a container's changes |
|
| 2306 |
+#### Create a new image from a container's changes |
|
| 2307 | 2307 |
|
| 2308 | 2308 |
`POST /commit` |
| 2309 | 2309 |
|
| ... | ... |
@@ -2375,7 +2373,7 @@ Create a new image from a container's changes |
| 2375 | 2375 |
- **404** – no such container |
| 2376 | 2376 |
- **500** – server error |
| 2377 | 2377 |
|
| 2378 |
-### Monitor Docker's events |
|
| 2378 |
+#### Monitor Docker's events |
|
| 2379 | 2379 |
|
| 2380 | 2380 |
`GET /events` |
| 2381 | 2381 |
|
| ... | ... |
@@ -2575,7 +2573,7 @@ Docker networks report the following events: |
| 2575 | 2575 |
- **200** – no error |
| 2576 | 2576 |
- **500** – server error |
| 2577 | 2577 |
|
| 2578 |
-### Get a tarball containing all images in a repository |
|
| 2578 |
+#### Get a tarball containing all images in a repository |
|
| 2579 | 2579 |
|
| 2580 | 2580 |
`GET /images/(name)/get` |
| 2581 | 2581 |
|
| ... | ... |
@@ -2605,7 +2603,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2605 | 2605 |
- **200** – no error |
| 2606 | 2606 |
- **500** – server error |
| 2607 | 2607 |
|
| 2608 |
-### Get a tarball containing all images |
|
| 2608 |
+#### Get a tarball containing all images |
|
| 2609 | 2609 |
|
| 2610 | 2610 |
`GET /images/get` |
| 2611 | 2611 |
|
| ... | ... |
@@ -2634,7 +2632,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2634 | 2634 |
- **200** – no error |
| 2635 | 2635 |
- **500** – server error |
| 2636 | 2636 |
|
| 2637 |
-### Load a tarball with a set of images and tags into docker |
|
| 2637 |
+#### Load a tarball with a set of images and tags into docker |
|
| 2638 | 2638 |
|
| 2639 | 2639 |
`POST /images/load` |
| 2640 | 2640 |
|
| ... | ... |
@@ -2657,7 +2655,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2657 | 2657 |
- **200** – no error |
| 2658 | 2658 |
- **500** – server error |
| 2659 | 2659 |
|
| 2660 |
-### Image tarball format |
|
| 2660 |
+#### Image tarball format |
|
| 2661 | 2661 |
|
| 2662 | 2662 |
An image tarball contains one directory per image layer (named using its long ID), |
| 2663 | 2663 |
each containing these files: |
| ... | ... |
@@ -2678,7 +2676,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 2678 | 2678 |
} |
| 2679 | 2679 |
``` |
| 2680 | 2680 |
|
| 2681 |
-### Exec Create |
|
| 2681 |
+#### Exec Create |
|
| 2682 | 2682 |
|
| 2683 | 2683 |
`POST /containers/(id or name)/exec` |
| 2684 | 2684 |
|
| ... | ... |
@@ -2732,7 +2730,7 @@ Sets up an exec instance in a running container `id` |
| 2732 | 2732 |
- **409** - container is paused |
| 2733 | 2733 |
- **500** - server error |
| 2734 | 2734 |
|
| 2735 |
-### Exec Start |
|
| 2735 |
+#### Exec Start |
|
| 2736 | 2736 |
|
| 2737 | 2737 |
`POST /exec/(id)/start` |
| 2738 | 2738 |
|
| ... | ... |
@@ -2774,7 +2772,7 @@ interactive session with the `exec` command. |
| 2774 | 2774 |
|
| 2775 | 2775 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 2776 | 2776 |
|
| 2777 |
-### Exec Resize |
|
| 2777 |
+#### Exec Resize |
|
| 2778 | 2778 |
|
| 2779 | 2779 |
`POST /exec/(id)/resize` |
| 2780 | 2780 |
|
| ... | ... |
@@ -2801,7 +2799,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2801 | 2801 |
- **201** – no error |
| 2802 | 2802 |
- **404** – no such exec instance |
| 2803 | 2803 |
|
| 2804 |
-### Exec Inspect |
|
| 2804 |
+#### Exec Inspect |
|
| 2805 | 2805 |
|
| 2806 | 2806 |
`GET /exec/(id)/json` |
| 2807 | 2807 |
|
| ... | ... |
@@ -2844,9 +2842,9 @@ Return low-level information about the `exec` command `id`. |
| 2844 | 2844 |
- **404** – no such exec instance |
| 2845 | 2845 |
- **500** - server error |
| 2846 | 2846 |
|
| 2847 |
-## 2.4 Volumes |
|
| 2847 |
+### 2.4 Volumes |
|
| 2848 | 2848 |
|
| 2849 |
-### List volumes |
|
| 2849 |
+#### List volumes |
|
| 2850 | 2850 |
|
| 2851 | 2851 |
`GET /volumes` |
| 2852 | 2852 |
|
| ... | ... |
@@ -2879,7 +2877,7 @@ Return low-level information about the `exec` command `id`. |
| 2879 | 2879 |
- **200** - no error |
| 2880 | 2880 |
- **500** - server error |
| 2881 | 2881 |
|
| 2882 |
-### Create a volume |
|
| 2882 |
+#### Create a volume |
|
| 2883 | 2883 |
|
| 2884 | 2884 |
`POST /volumes/create` |
| 2885 | 2885 |
|
| ... | ... |
@@ -2917,7 +2915,7 @@ Create a volume |
| 2917 | 2917 |
- **DriverOpts** - A mapping of driver options and values. These options are |
| 2918 | 2918 |
passed directly to the driver and are driver specific. |
| 2919 | 2919 |
|
| 2920 |
-### Inspect a volume |
|
| 2920 |
+#### Inspect a volume |
|
| 2921 | 2921 |
|
| 2922 | 2922 |
`GET /volumes/(name)` |
| 2923 | 2923 |
|
| ... | ... |
@@ -2944,7 +2942,7 @@ Return low-level information on the volume `name` |
| 2944 | 2944 |
- **404** - no such volume |
| 2945 | 2945 |
- **500** - server error |
| 2946 | 2946 |
|
| 2947 |
-### Remove a volume |
|
| 2947 |
+#### Remove a volume |
|
| 2948 | 2948 |
|
| 2949 | 2949 |
`DELETE /volumes/(name)` |
| 2950 | 2950 |
|
| ... | ... |
@@ -2965,9 +2963,9 @@ Instruct the driver to remove the volume (`name`). |
| 2965 | 2965 |
- **409** - volume is in use and cannot be removed |
| 2966 | 2966 |
- **500** - server error |
| 2967 | 2967 |
|
| 2968 |
-## 2.5 Networks |
|
| 2968 |
+### 2.5 Networks |
|
| 2969 | 2969 |
|
| 2970 |
-### List networks |
|
| 2970 |
+#### List networks |
|
| 2971 | 2971 |
|
| 2972 | 2972 |
`GET /networks` |
| 2973 | 2973 |
|
| ... | ... |
@@ -3051,7 +3049,7 @@ Content-Type: application/json |
| 3051 | 3051 |
- **200** - no error |
| 3052 | 3052 |
- **500** - server error |
| 3053 | 3053 |
|
| 3054 |
-### Inspect network |
|
| 3054 |
+#### Inspect network |
|
| 3055 | 3055 |
|
| 3056 | 3056 |
`GET /networks/<network-id>` |
| 3057 | 3057 |
|
| ... | ... |
@@ -3107,7 +3105,7 @@ Content-Type: application/json |
| 3107 | 3107 |
- **200** - no error |
| 3108 | 3108 |
- **404** - network not found |
| 3109 | 3109 |
|
| 3110 |
-### Create a network |
|
| 3110 |
+#### Create a network |
|
| 3111 | 3111 |
|
| 3112 | 3112 |
`POST /networks/create` |
| 3113 | 3113 |
|
| ... | ... |
@@ -3174,7 +3172,7 @@ Content-Type: application/json |
| 3174 | 3174 |
- **Options** - Driver-specific options, specified as a map: `{"option":"value" [,"option2":"value2"]}`
|
| 3175 | 3175 |
- **Options** - Network specific options to be used by the drivers |
| 3176 | 3176 |
|
| 3177 |
-### Connect a container to a network |
|
| 3177 |
+#### Connect a container to a network |
|
| 3178 | 3178 |
|
| 3179 | 3179 |
`POST /networks/(id)/connect` |
| 3180 | 3180 |
|
| ... | ... |
@@ -3211,7 +3209,7 @@ Content-Type: application/json |
| 3211 | 3211 |
|
| 3212 | 3212 |
- **container** - container-id/name to be connected to the network |
| 3213 | 3213 |
|
| 3214 |
-### Disconnect a container from a network |
|
| 3214 |
+#### Disconnect a container from a network |
|
| 3215 | 3215 |
|
| 3216 | 3216 |
`POST /networks/(id)/disconnect` |
| 3217 | 3217 |
|
| ... | ... |
@@ -3244,7 +3242,7 @@ Content-Type: application/json |
| 3244 | 3244 |
- **Container** - container-id/name to be disconnected from a network |
| 3245 | 3245 |
- **Force** - Force the container to disconnect from a network |
| 3246 | 3246 |
|
| 3247 |
-### Remove a network |
|
| 3247 |
+#### Remove a network |
|
| 3248 | 3248 |
|
| 3249 | 3249 |
`DELETE /networks/(id)` |
| 3250 | 3250 |
|
| ... | ... |
@@ -3264,9 +3262,9 @@ Instruct the driver to remove the network (`id`). |
| 3264 | 3264 |
- **404** - no such network |
| 3265 | 3265 |
- **500** - server error |
| 3266 | 3266 |
|
| 3267 |
-# 3. Going further |
|
| 3267 |
+## 3. Going further |
|
| 3268 | 3268 |
|
| 3269 |
-## 3.1 Inside `docker run` |
|
| 3269 |
+### 3.1 Inside `docker run` |
|
| 3270 | 3270 |
|
| 3271 | 3271 |
As an example, the `docker run` command line makes the following API calls: |
| 3272 | 3272 |
|
| ... | ... |
@@ -3284,7 +3282,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 3284 | 3284 |
|
| 3285 | 3285 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 3286 | 3286 |
|
| 3287 |
-## 3.2 Hijacking |
|
| 3287 |
+### 3.2 Hijacking |
|
| 3288 | 3288 |
|
| 3289 | 3289 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 3290 | 3290 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -3299,7 +3297,7 @@ When Docker daemon detects the `Upgrade` header, it switches its status code |
| 3299 | 3299 |
from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 3300 | 3300 |
|
| 3301 | 3301 |
|
| 3302 |
-## 3.3 CORS Requests |
|
| 3302 |
+### 3.3 CORS Requests |
|
| 3303 | 3303 |
|
| 3304 | 3304 |
To set cross origin requests to the Engine API please give values to |
| 3305 | 3305 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |
| ... | ... |
@@ -16,8 +16,6 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.23 |
|
| 20 |
- |
|
| 21 | 19 |
## 1. Brief introduction |
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| ... | ... |
@@ -28,11 +26,11 @@ redirect_from: |
| 28 | 28 |
- When the client API version is newer than the daemon's, these calls return an HTTP |
| 29 | 29 |
`400 Bad Request` error message. |
| 30 | 30 |
|
| 31 |
-# 2. Endpoints |
|
| 31 |
+## 2. Endpoints |
|
| 32 | 32 |
|
| 33 |
-## 2.1 Containers |
|
| 33 |
+### 2.1 Containers |
|
| 34 | 34 |
|
| 35 |
-### List containers |
|
| 35 |
+#### List containers |
|
| 36 | 36 |
|
| 37 | 37 |
`GET /containers/json` |
| 38 | 38 |
|
| ... | ... |
@@ -236,7 +234,7 @@ List containers |
| 236 | 236 |
- **400** – bad parameter |
| 237 | 237 |
- **500** – server error |
| 238 | 238 |
|
| 239 |
-### Create a container |
|
| 239 |
+#### Create a container |
|
| 240 | 240 |
|
| 241 | 241 |
`POST /containers/create` |
| 242 | 242 |
|
| ... | ... |
@@ -488,7 +486,7 @@ Create a container |
| 488 | 488 |
- **409** – conflict |
| 489 | 489 |
- **500** – server error |
| 490 | 490 |
|
| 491 |
-### Inspect a container |
|
| 491 |
+#### Inspect a container |
|
| 492 | 492 |
|
| 493 | 493 |
`GET /containers/(id or name)/json` |
| 494 | 494 |
|
| ... | ... |
@@ -691,7 +689,7 @@ Return low-level information on the container `id` |
| 691 | 691 |
- **404** – no such container |
| 692 | 692 |
- **500** – server error |
| 693 | 693 |
|
| 694 |
-### List processes running inside a container |
|
| 694 |
+#### List processes running inside a container |
|
| 695 | 695 |
|
| 696 | 696 |
`GET /containers/(id or name)/top` |
| 697 | 697 |
|
| ... | ... |
@@ -755,7 +753,7 @@ supported on Windows. |
| 755 | 755 |
- **404** – no such container |
| 756 | 756 |
- **500** – server error |
| 757 | 757 |
|
| 758 |
-### Get container logs |
|
| 758 |
+#### Get container logs |
|
| 759 | 759 |
|
| 760 | 760 |
`GET /containers/(id or name)/logs` |
| 761 | 761 |
|
| ... | ... |
@@ -797,7 +795,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 797 | 797 |
- **404** – no such container |
| 798 | 798 |
- **500** – server error |
| 799 | 799 |
|
| 800 |
-### Inspect changes on a container's filesystem |
|
| 800 |
+#### Inspect changes on a container's filesystem |
|
| 801 | 801 |
|
| 802 | 802 |
`GET /containers/(id or name)/changes` |
| 803 | 803 |
|
| ... | ... |
@@ -839,7 +837,7 @@ Values for `Kind`: |
| 839 | 839 |
- **404** – no such container |
| 840 | 840 |
- **500** – server error |
| 841 | 841 |
|
| 842 |
-### Export a container |
|
| 842 |
+#### Export a container |
|
| 843 | 843 |
|
| 844 | 844 |
`GET /containers/(id or name)/export` |
| 845 | 845 |
|
| ... | ... |
@@ -864,7 +862,7 @@ Export the contents of container `id` |
| 864 | 864 |
- **404** – no such container |
| 865 | 865 |
- **500** – server error |
| 866 | 866 |
|
| 867 |
-### Get container stats based on resource usage |
|
| 867 |
+#### Get container stats based on resource usage |
|
| 868 | 868 |
|
| 869 | 869 |
`GET /containers/(id or name)/stats` |
| 870 | 870 |
|
| ... | ... |
@@ -988,7 +986,7 @@ The precpu_stats is the cpu statistic of last read, which is used for calculatin |
| 988 | 988 |
- **404** – no such container |
| 989 | 989 |
- **500** – server error |
| 990 | 990 |
|
| 991 |
-### Resize a container TTY |
|
| 991 |
+#### Resize a container TTY |
|
| 992 | 992 |
|
| 993 | 993 |
`POST /containers/(id or name)/resize` |
| 994 | 994 |
|
| ... | ... |
@@ -1015,7 +1013,7 @@ Resize the TTY for container with `id`. The unit is number of characters. You m |
| 1015 | 1015 |
- **404** – No such container |
| 1016 | 1016 |
- **500** – Cannot resize container |
| 1017 | 1017 |
|
| 1018 |
-### Start a container |
|
| 1018 |
+#### Start a container |
|
| 1019 | 1019 |
|
| 1020 | 1020 |
`POST /containers/(id or name)/start` |
| 1021 | 1021 |
|
| ... | ... |
@@ -1046,7 +1044,7 @@ Start the container `id` |
| 1046 | 1046 |
- **404** – no such container |
| 1047 | 1047 |
- **500** – server error |
| 1048 | 1048 |
|
| 1049 |
-### Stop a container |
|
| 1049 |
+#### Stop a container |
|
| 1050 | 1050 |
|
| 1051 | 1051 |
`POST /containers/(id or name)/stop` |
| 1052 | 1052 |
|
| ... | ... |
@@ -1071,7 +1069,7 @@ Stop the container `id` |
| 1071 | 1071 |
- **404** – no such container |
| 1072 | 1072 |
- **500** – server error |
| 1073 | 1073 |
|
| 1074 |
-### Restart a container |
|
| 1074 |
+#### Restart a container |
|
| 1075 | 1075 |
|
| 1076 | 1076 |
`POST /containers/(id or name)/restart` |
| 1077 | 1077 |
|
| ... | ... |
@@ -1095,7 +1093,7 @@ Restart the container `id` |
| 1095 | 1095 |
- **404** – no such container |
| 1096 | 1096 |
- **500** – server error |
| 1097 | 1097 |
|
| 1098 |
-### Kill a container |
|
| 1098 |
+#### Kill a container |
|
| 1099 | 1099 |
|
| 1100 | 1100 |
`POST /containers/(id or name)/kill` |
| 1101 | 1101 |
|
| ... | ... |
@@ -1120,7 +1118,7 @@ Kill the container `id` |
| 1120 | 1120 |
- **404** – no such container |
| 1121 | 1121 |
- **500** – server error |
| 1122 | 1122 |
|
| 1123 |
-### Update a container |
|
| 1123 |
+#### Update a container |
|
| 1124 | 1124 |
|
| 1125 | 1125 |
`POST /containers/(id or name)/update` |
| 1126 | 1126 |
|
| ... | ... |
@@ -1164,7 +1162,7 @@ Update configuration of one or more containers. |
| 1164 | 1164 |
- **404** – no such container |
| 1165 | 1165 |
- **500** – server error |
| 1166 | 1166 |
|
| 1167 |
-### Rename a container |
|
| 1167 |
+#### Rename a container |
|
| 1168 | 1168 |
|
| 1169 | 1169 |
`POST /containers/(id or name)/rename` |
| 1170 | 1170 |
|
| ... | ... |
@@ -1189,7 +1187,7 @@ Rename the container `id` to a `new_name` |
| 1189 | 1189 |
- **409** - conflict name already assigned |
| 1190 | 1190 |
- **500** – server error |
| 1191 | 1191 |
|
| 1192 |
-### Pause a container |
|
| 1192 |
+#### Pause a container |
|
| 1193 | 1193 |
|
| 1194 | 1194 |
`POST /containers/(id or name)/pause` |
| 1195 | 1195 |
|
| ... | ... |
@@ -1209,7 +1207,7 @@ Pause the container `id` |
| 1209 | 1209 |
- **404** – no such container |
| 1210 | 1210 |
- **500** – server error |
| 1211 | 1211 |
|
| 1212 |
-### Unpause a container |
|
| 1212 |
+#### Unpause a container |
|
| 1213 | 1213 |
|
| 1214 | 1214 |
`POST /containers/(id or name)/unpause` |
| 1215 | 1215 |
|
| ... | ... |
@@ -1229,7 +1227,7 @@ Unpause the container `id` |
| 1229 | 1229 |
- **404** – no such container |
| 1230 | 1230 |
- **500** – server error |
| 1231 | 1231 |
|
| 1232 |
-### Attach to a container |
|
| 1232 |
+#### Attach to a container |
|
| 1233 | 1233 |
|
| 1234 | 1234 |
`POST /containers/(id or name)/attach` |
| 1235 | 1235 |
|
| ... | ... |
@@ -1318,7 +1316,7 @@ The simplest way to implement the Attach protocol is the following: |
| 1318 | 1318 |
4. Read the extracted size and output it on the correct output. |
| 1319 | 1319 |
5. Goto 1. |
| 1320 | 1320 |
|
| 1321 |
-### Attach to a container (websocket) |
|
| 1321 |
+#### Attach to a container (websocket) |
|
| 1322 | 1322 |
|
| 1323 | 1323 |
`GET /containers/(id or name)/attach/ws` |
| 1324 | 1324 |
|
| ... | ... |
@@ -1358,7 +1356,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1358 | 1358 |
- **404** – no such container |
| 1359 | 1359 |
- **500** – server error |
| 1360 | 1360 |
|
| 1361 |
-### Wait a container |
|
| 1361 |
+#### Wait a container |
|
| 1362 | 1362 |
|
| 1363 | 1363 |
`POST /containers/(id or name)/wait` |
| 1364 | 1364 |
|
| ... | ... |
@@ -1381,7 +1379,7 @@ Block until container `id` stops, then returns the exit code |
| 1381 | 1381 |
- **404** – no such container |
| 1382 | 1382 |
- **500** – server error |
| 1383 | 1383 |
|
| 1384 |
-### Remove a container |
|
| 1384 |
+#### Remove a container |
|
| 1385 | 1385 |
|
| 1386 | 1386 |
`DELETE /containers/(id or name)` |
| 1387 | 1387 |
|
| ... | ... |
@@ -1410,7 +1408,7 @@ Remove the container `id` from the filesystem |
| 1410 | 1410 |
- **409** – conflict |
| 1411 | 1411 |
- **500** – server error |
| 1412 | 1412 |
|
| 1413 |
-### Copy files or folders from a container |
|
| 1413 |
+#### Copy files or folders from a container |
|
| 1414 | 1414 |
|
| 1415 | 1415 |
`POST /containers/(id or name)/copy` |
| 1416 | 1416 |
|
| ... | ... |
@@ -1442,14 +1440,14 @@ Copy files or folders of container `id` |
| 1442 | 1442 |
- **404** – no such container |
| 1443 | 1443 |
- **500** – server error |
| 1444 | 1444 |
|
| 1445 |
-### Retrieving information about files and folders in a container |
|
| 1445 |
+#### Retrieving information about files and folders in a container |
|
| 1446 | 1446 |
|
| 1447 | 1447 |
`HEAD /containers/(id or name)/archive` |
| 1448 | 1448 |
|
| 1449 | 1449 |
See the description of the `X-Docker-Container-Path-Stat` header in the |
| 1450 | 1450 |
following section. |
| 1451 | 1451 |
|
| 1452 |
-### Get an archive of a filesystem resource in a container |
|
| 1452 |
+#### Get an archive of a filesystem resource in a container |
|
| 1453 | 1453 |
|
| 1454 | 1454 |
`GET /containers/(id or name)/archive` |
| 1455 | 1455 |
|
| ... | ... |
@@ -1514,7 +1512,7 @@ desired. |
| 1514 | 1514 |
- no such file or directory (**path** does not exist) |
| 1515 | 1515 |
- **500** - server error |
| 1516 | 1516 |
|
| 1517 |
-### Extract an archive of files or folders to a directory in a container |
|
| 1517 |
+#### Extract an archive of files or folders to a directory in a container |
|
| 1518 | 1518 |
|
| 1519 | 1519 |
`PUT /containers/(id or name)/archive` |
| 1520 | 1520 |
|
| ... | ... |
@@ -1562,9 +1560,9 @@ Upload a tar archive to be extracted to a path in the filesystem of container |
| 1562 | 1562 |
- no such file or directory (**path** resource does not exist) |
| 1563 | 1563 |
- **500** – server error |
| 1564 | 1564 |
|
| 1565 |
-## 2.2 Images |
|
| 1565 |
+### 2.2 Images |
|
| 1566 | 1566 |
|
| 1567 |
-### List Images |
|
| 1567 |
+#### List Images |
|
| 1568 | 1568 |
|
| 1569 | 1569 |
`GET /images/json` |
| 1570 | 1570 |
|
| ... | ... |
@@ -1655,7 +1653,7 @@ references on the command line. |
| 1655 | 1655 |
- `label=key` or `label="key=value"` of an image label |
| 1656 | 1656 |
- **filter** - only return images with the specified name |
| 1657 | 1657 |
|
| 1658 |
-### Build image from a Dockerfile |
|
| 1658 |
+#### Build image from a Dockerfile |
|
| 1659 | 1659 |
|
| 1660 | 1660 |
`POST /build` |
| 1661 | 1661 |
|
| ... | ... |
@@ -1761,7 +1759,7 @@ or being killed. |
| 1761 | 1761 |
- **200** – no error |
| 1762 | 1762 |
- **500** – server error |
| 1763 | 1763 |
|
| 1764 |
-### Create an image |
|
| 1764 |
+#### Create an image |
|
| 1765 | 1765 |
|
| 1766 | 1766 |
`POST /images/create` |
| 1767 | 1767 |
|
| ... | ... |
@@ -1827,7 +1825,7 @@ a base64-encoded AuthConfig object. |
| 1827 | 1827 |
|
| 1828 | 1828 |
|
| 1829 | 1829 |
|
| 1830 |
-### Inspect an image |
|
| 1830 |
+#### Inspect an image |
|
| 1831 | 1831 |
|
| 1832 | 1832 |
`GET /images/(name)/json` |
| 1833 | 1833 |
|
| ... | ... |
@@ -1945,7 +1943,7 @@ Return low-level information on the image `name` |
| 1945 | 1945 |
- **404** – no such image |
| 1946 | 1946 |
- **500** – server error |
| 1947 | 1947 |
|
| 1948 |
-### Get the history of an image |
|
| 1948 |
+#### Get the history of an image |
|
| 1949 | 1949 |
|
| 1950 | 1950 |
`GET /images/(name)/history` |
| 1951 | 1951 |
|
| ... | ... |
@@ -1999,7 +1997,7 @@ Return the history of the image `name` |
| 1999 | 1999 |
- **404** – no such image |
| 2000 | 2000 |
- **500** – server error |
| 2001 | 2001 |
|
| 2002 |
-### Push an image on the registry |
|
| 2002 |
+#### Push an image on the registry |
|
| 2003 | 2003 |
|
| 2004 | 2004 |
`POST /images/(name)/push` |
| 2005 | 2005 |
|
| ... | ... |
@@ -2061,7 +2059,7 @@ The push is cancelled if the HTTP connection is closed. |
| 2061 | 2061 |
- **404** – no such image |
| 2062 | 2062 |
- **500** – server error |
| 2063 | 2063 |
|
| 2064 |
-### Tag an image into a repository |
|
| 2064 |
+#### Tag an image into a repository |
|
| 2065 | 2065 |
|
| 2066 | 2066 |
`POST /images/(name)/tag` |
| 2067 | 2067 |
|
| ... | ... |
@@ -2089,7 +2087,7 @@ Tag the image `name` into a repository |
| 2089 | 2089 |
- **409** – conflict |
| 2090 | 2090 |
- **500** – server error |
| 2091 | 2091 |
|
| 2092 |
-### Remove an image |
|
| 2092 |
+#### Remove an image |
|
| 2093 | 2093 |
|
| 2094 | 2094 |
`DELETE /images/(name)` |
| 2095 | 2095 |
|
| ... | ... |
@@ -2122,7 +2120,7 @@ Remove the image `name` from the filesystem |
| 2122 | 2122 |
- **409** – conflict |
| 2123 | 2123 |
- **500** – server error |
| 2124 | 2124 |
|
| 2125 |
-### Search images |
|
| 2125 |
+#### Search images |
|
| 2126 | 2126 |
|
| 2127 | 2127 |
`GET /images/search` |
| 2128 | 2128 |
|
| ... | ... |
@@ -2175,9 +2173,9 @@ Search for an image on [Docker Hub](https://hub.docker.com). |
| 2175 | 2175 |
- **200** – no error |
| 2176 | 2176 |
- **500** – server error |
| 2177 | 2177 |
|
| 2178 |
-## 2.3 Misc |
|
| 2178 |
+### 2.3 Misc |
|
| 2179 | 2179 |
|
| 2180 |
-### Check auth configuration |
|
| 2180 |
+#### Check auth configuration |
|
| 2181 | 2181 |
|
| 2182 | 2182 |
`POST /auth` |
| 2183 | 2183 |
|
| ... | ... |
@@ -2210,7 +2208,7 @@ if available, for accessing the registry without password. |
| 2210 | 2210 |
- **204** – no error |
| 2211 | 2211 |
- **500** – server error |
| 2212 | 2212 |
|
| 2213 |
-### Display system-wide information |
|
| 2213 |
+#### Display system-wide information |
|
| 2214 | 2214 |
|
| 2215 | 2215 |
`GET /info` |
| 2216 | 2216 |
|
| ... | ... |
@@ -2299,7 +2297,7 @@ Display system-wide information |
| 2299 | 2299 |
- **200** – no error |
| 2300 | 2300 |
- **500** – server error |
| 2301 | 2301 |
|
| 2302 |
-### Show the docker version information |
|
| 2302 |
+#### Show the docker version information |
|
| 2303 | 2303 |
|
| 2304 | 2304 |
`GET /version` |
| 2305 | 2305 |
|
| ... | ... |
@@ -2331,7 +2329,7 @@ Show the docker version information |
| 2331 | 2331 |
- **200** – no error |
| 2332 | 2332 |
- **500** – server error |
| 2333 | 2333 |
|
| 2334 |
-### Ping the docker server |
|
| 2334 |
+#### Ping the docker server |
|
| 2335 | 2335 |
|
| 2336 | 2336 |
`GET /_ping` |
| 2337 | 2337 |
|
| ... | ... |
@@ -2353,7 +2351,7 @@ Ping the docker server |
| 2353 | 2353 |
- **200** - no error |
| 2354 | 2354 |
- **500** - server error |
| 2355 | 2355 |
|
| 2356 |
-### Create a new image from a container's changes |
|
| 2356 |
+#### Create a new image from a container's changes |
|
| 2357 | 2357 |
|
| 2358 | 2358 |
`POST /commit` |
| 2359 | 2359 |
|
| ... | ... |
@@ -2425,7 +2423,7 @@ Create a new image from a container's changes |
| 2425 | 2425 |
- **404** – no such container |
| 2426 | 2426 |
- **500** – server error |
| 2427 | 2427 |
|
| 2428 |
-### Monitor Docker's events |
|
| 2428 |
+#### Monitor Docker's events |
|
| 2429 | 2429 |
|
| 2430 | 2430 |
`GET /events` |
| 2431 | 2431 |
|
| ... | ... |
@@ -2625,7 +2623,7 @@ Docker networks report the following events: |
| 2625 | 2625 |
- **200** – no error |
| 2626 | 2626 |
- **500** – server error |
| 2627 | 2627 |
|
| 2628 |
-### Get a tarball containing all images in a repository |
|
| 2628 |
+#### Get a tarball containing all images in a repository |
|
| 2629 | 2629 |
|
| 2630 | 2630 |
`GET /images/(name)/get` |
| 2631 | 2631 |
|
| ... | ... |
@@ -2655,7 +2653,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2655 | 2655 |
- **200** – no error |
| 2656 | 2656 |
- **500** – server error |
| 2657 | 2657 |
|
| 2658 |
-### Get a tarball containing all images |
|
| 2658 |
+#### Get a tarball containing all images |
|
| 2659 | 2659 |
|
| 2660 | 2660 |
`GET /images/get` |
| 2661 | 2661 |
|
| ... | ... |
@@ -2684,7 +2682,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2684 | 2684 |
- **200** – no error |
| 2685 | 2685 |
- **500** – server error |
| 2686 | 2686 |
|
| 2687 |
-### Load a tarball with a set of images and tags into docker |
|
| 2687 |
+#### Load a tarball with a set of images and tags into docker |
|
| 2688 | 2688 |
|
| 2689 | 2689 |
`POST /images/load` |
| 2690 | 2690 |
|
| ... | ... |
@@ -2733,7 +2731,7 @@ action completes. |
| 2733 | 2733 |
- **200** – no error |
| 2734 | 2734 |
- **500** – server error |
| 2735 | 2735 |
|
| 2736 |
-### Image tarball format |
|
| 2736 |
+#### Image tarball format |
|
| 2737 | 2737 |
|
| 2738 | 2738 |
An image tarball contains one directory per image layer (named using its long ID), |
| 2739 | 2739 |
each containing these files: |
| ... | ... |
@@ -2754,7 +2752,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 2754 | 2754 |
} |
| 2755 | 2755 |
``` |
| 2756 | 2756 |
|
| 2757 |
-### Exec Create |
|
| 2757 |
+#### Exec Create |
|
| 2758 | 2758 |
|
| 2759 | 2759 |
`POST /containers/(id or name)/exec` |
| 2760 | 2760 |
|
| ... | ... |
@@ -2808,7 +2806,7 @@ Sets up an exec instance in a running container `id` |
| 2808 | 2808 |
- **409** - container is paused |
| 2809 | 2809 |
- **500** - server error |
| 2810 | 2810 |
|
| 2811 |
-### Exec Start |
|
| 2811 |
+#### Exec Start |
|
| 2812 | 2812 |
|
| 2813 | 2813 |
`POST /exec/(id)/start` |
| 2814 | 2814 |
|
| ... | ... |
@@ -2850,7 +2848,7 @@ interactive session with the `exec` command. |
| 2850 | 2850 |
|
| 2851 | 2851 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 2852 | 2852 |
|
| 2853 |
-### Exec Resize |
|
| 2853 |
+#### Exec Resize |
|
| 2854 | 2854 |
|
| 2855 | 2855 |
`POST /exec/(id)/resize` |
| 2856 | 2856 |
|
| ... | ... |
@@ -2877,7 +2875,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2877 | 2877 |
- **201** – no error |
| 2878 | 2878 |
- **404** – no such exec instance |
| 2879 | 2879 |
|
| 2880 |
-### Exec Inspect |
|
| 2880 |
+#### Exec Inspect |
|
| 2881 | 2881 |
|
| 2882 | 2882 |
`GET /exec/(id)/json` |
| 2883 | 2883 |
|
| ... | ... |
@@ -2920,9 +2918,9 @@ Return low-level information about the `exec` command `id`. |
| 2920 | 2920 |
- **404** – no such exec instance |
| 2921 | 2921 |
- **500** - server error |
| 2922 | 2922 |
|
| 2923 |
-## 2.4 Volumes |
|
| 2923 |
+### 2.4 Volumes |
|
| 2924 | 2924 |
|
| 2925 |
-### List volumes |
|
| 2925 |
+#### List volumes |
|
| 2926 | 2926 |
|
| 2927 | 2927 |
`GET /volumes` |
| 2928 | 2928 |
|
| ... | ... |
@@ -2955,7 +2953,7 @@ Return low-level information about the `exec` command `id`. |
| 2955 | 2955 |
- **200** - no error |
| 2956 | 2956 |
- **500** - server error |
| 2957 | 2957 |
|
| 2958 |
-### Create a volume |
|
| 2958 |
+#### Create a volume |
|
| 2959 | 2959 |
|
| 2960 | 2960 |
`POST /volumes/create` |
| 2961 | 2961 |
|
| ... | ... |
@@ -3002,7 +3000,7 @@ Create a volume |
| 3002 | 3002 |
passed directly to the driver and are driver specific. |
| 3003 | 3003 |
- **Labels** - Labels to set on the volume, specified as a map: `{"key":"value","key2":"value2"}`
|
| 3004 | 3004 |
|
| 3005 |
-### Inspect a volume |
|
| 3005 |
+#### Inspect a volume |
|
| 3006 | 3006 |
|
| 3007 | 3007 |
`GET /volumes/(name)` |
| 3008 | 3008 |
|
| ... | ... |
@@ -3033,7 +3031,7 @@ Return low-level information on the volume `name` |
| 3033 | 3033 |
- **404** - no such volume |
| 3034 | 3034 |
- **500** - server error |
| 3035 | 3035 |
|
| 3036 |
-### Remove a volume |
|
| 3036 |
+#### Remove a volume |
|
| 3037 | 3037 |
|
| 3038 | 3038 |
`DELETE /volumes/(name)` |
| 3039 | 3039 |
|
| ... | ... |
@@ -3054,9 +3052,9 @@ Instruct the driver to remove the volume (`name`). |
| 3054 | 3054 |
- **409** - volume is in use and cannot be removed |
| 3055 | 3055 |
- **500** - server error |
| 3056 | 3056 |
|
| 3057 |
-## 3.5 Networks |
|
| 3057 |
+### 3.5 Networks |
|
| 3058 | 3058 |
|
| 3059 |
-### List networks |
|
| 3059 |
+#### List networks |
|
| 3060 | 3060 |
|
| 3061 | 3061 |
`GET /networks` |
| 3062 | 3062 |
|
| ... | ... |
@@ -3146,7 +3144,7 @@ Content-Type: application/json |
| 3146 | 3146 |
- **200** - no error |
| 3147 | 3147 |
- **500** - server error |
| 3148 | 3148 |
|
| 3149 |
-### Inspect network |
|
| 3149 |
+#### Inspect network |
|
| 3150 | 3150 |
|
| 3151 | 3151 |
`GET /networks/<network-id>` |
| 3152 | 3152 |
|
| ... | ... |
@@ -3208,7 +3206,7 @@ Content-Type: application/json |
| 3208 | 3208 |
- **200** - no error |
| 3209 | 3209 |
- **404** - network not found |
| 3210 | 3210 |
|
| 3211 |
-### Create a network |
|
| 3211 |
+#### Create a network |
|
| 3212 | 3212 |
|
| 3213 | 3213 |
`POST /networks/create` |
| 3214 | 3214 |
|
| ... | ... |
@@ -3291,7 +3289,7 @@ Content-Type: application/json |
| 3291 | 3291 |
- **Options** - Network specific options to be used by the drivers |
| 3292 | 3292 |
- **Labels** - Labels to set on the network, specified as a map: `{"key":"value" [,"key2":"value2"]}`
|
| 3293 | 3293 |
|
| 3294 |
-### Connect a container to a network |
|
| 3294 |
+#### Connect a container to a network |
|
| 3295 | 3295 |
|
| 3296 | 3296 |
`POST /networks/(id)/connect` |
| 3297 | 3297 |
|
| ... | ... |
@@ -3328,7 +3326,7 @@ Content-Type: application/json |
| 3328 | 3328 |
|
| 3329 | 3329 |
- **container** - container-id/name to be connected to the network |
| 3330 | 3330 |
|
| 3331 |
-### Disconnect a container from a network |
|
| 3331 |
+#### Disconnect a container from a network |
|
| 3332 | 3332 |
|
| 3333 | 3333 |
`POST /networks/(id)/disconnect` |
| 3334 | 3334 |
|
| ... | ... |
@@ -3361,7 +3359,7 @@ Content-Type: application/json |
| 3361 | 3361 |
- **Container** - container-id/name to be disconnected from a network |
| 3362 | 3362 |
- **Force** - Force the container to disconnect from a network |
| 3363 | 3363 |
|
| 3364 |
-### Remove a network |
|
| 3364 |
+#### Remove a network |
|
| 3365 | 3365 |
|
| 3366 | 3366 |
`DELETE /networks/(id)` |
| 3367 | 3367 |
|
| ... | ... |
@@ -3381,9 +3379,9 @@ Instruct the driver to remove the network (`id`). |
| 3381 | 3381 |
- **404** - no such network |
| 3382 | 3382 |
- **500** - server error |
| 3383 | 3383 |
|
| 3384 |
-# 3. Going further |
|
| 3384 |
+## 3. Going further |
|
| 3385 | 3385 |
|
| 3386 |
-## 3.1 Inside `docker run` |
|
| 3386 |
+### 3.1 Inside `docker run` |
|
| 3387 | 3387 |
|
| 3388 | 3388 |
As an example, the `docker run` command line makes the following API calls: |
| 3389 | 3389 |
|
| ... | ... |
@@ -3401,7 +3399,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 3401 | 3401 |
|
| 3402 | 3402 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 3403 | 3403 |
|
| 3404 |
-## 3.2 Hijacking |
|
| 3404 |
+### 3.2 Hijacking |
|
| 3405 | 3405 |
|
| 3406 | 3406 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 3407 | 3407 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -3416,7 +3414,7 @@ When Docker daemon detects the `Upgrade` header, it switches its status code |
| 3416 | 3416 |
from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 3417 | 3417 |
|
| 3418 | 3418 |
|
| 3419 |
-## 3.3 CORS Requests |
|
| 3419 |
+### 3.3 CORS Requests |
|
| 3420 | 3420 |
|
| 3421 | 3421 |
To set cross origin requests to the Engine API please give values to |
| 3422 | 3422 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |
| ... | ... |
@@ -16,9 +16,7 @@ redirect_from: |
| 16 | 16 |
will be rejected. |
| 17 | 17 |
--> |
| 18 | 18 |
|
| 19 |
-# Docker Engine API v1.24 |
|
| 20 |
- |
|
| 21 |
-# 1. Brief introduction |
|
| 19 |
+## 1. Brief introduction |
|
| 22 | 20 |
|
| 23 | 21 |
- The daemon listens on `unix:///var/run/docker.sock` but you can |
| 24 | 22 |
[Bind Docker to another host/port or a Unix socket](../commandline/dockerd.md#bind-docker-to-another-host-port-or-a-unix-socket). |
| ... | ... |
@@ -26,7 +24,7 @@ redirect_from: |
| 26 | 26 |
or `pull`, the HTTP connection is hijacked to transport `stdout`, |
| 27 | 27 |
`stdin` and `stderr`. |
| 28 | 28 |
|
| 29 |
-# 2. Errors |
|
| 29 |
+## 2. Errors |
|
| 30 | 30 |
|
| 31 | 31 |
The Engine API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: |
| 32 | 32 |
|
| ... | ... |
@@ -36,11 +34,11 @@ The Engine API uses standard HTTP status codes to indicate the success or failur |
| 36 | 36 |
|
| 37 | 37 |
The status codes that are returned for each endpoint are specified in the endpoint documentation below. |
| 38 | 38 |
|
| 39 |
-# 3. Endpoints |
|
| 39 |
+## 3. Endpoints |
|
| 40 | 40 |
|
| 41 |
-## 3.1 Containers |
|
| 41 |
+### 3.1 Containers |
|
| 42 | 42 |
|
| 43 |
-### List containers |
|
| 43 |
+#### List containers |
|
| 44 | 44 |
|
| 45 | 45 |
`GET /containers/json` |
| 46 | 46 |
|
| ... | ... |
@@ -245,7 +243,7 @@ List containers |
| 245 | 245 |
- **400** – bad parameter |
| 246 | 246 |
- **500** – server error |
| 247 | 247 |
|
| 248 |
-### Create a container |
|
| 248 |
+#### Create a container |
|
| 249 | 249 |
|
| 250 | 250 |
`POST /containers/create` |
| 251 | 251 |
|
| ... | ... |
@@ -511,7 +509,7 @@ Create a container |
| 511 | 511 |
- **409** – conflict |
| 512 | 512 |
- **500** – server error |
| 513 | 513 |
|
| 514 |
-### Inspect a container |
|
| 514 |
+#### Inspect a container |
|
| 515 | 515 |
|
| 516 | 516 |
`GET /containers/(id or name)/json` |
| 517 | 517 |
|
| ... | ... |
@@ -721,7 +719,7 @@ Return low-level information on the container `id` |
| 721 | 721 |
- **404** – no such container |
| 722 | 722 |
- **500** – server error |
| 723 | 723 |
|
| 724 |
-### List processes running inside a container |
|
| 724 |
+#### List processes running inside a container |
|
| 725 | 725 |
|
| 726 | 726 |
`GET /containers/(id or name)/top` |
| 727 | 727 |
|
| ... | ... |
@@ -785,7 +783,7 @@ supported on Windows. |
| 785 | 785 |
- **404** – no such container |
| 786 | 786 |
- **500** – server error |
| 787 | 787 |
|
| 788 |
-### Get container logs |
|
| 788 |
+#### Get container logs |
|
| 789 | 789 |
|
| 790 | 790 |
`GET /containers/(id or name)/logs` |
| 791 | 791 |
|
| ... | ... |
@@ -828,7 +826,7 @@ Get `stdout` and `stderr` logs from the container ``id`` |
| 828 | 828 |
- **404** – no such container |
| 829 | 829 |
- **500** – server error |
| 830 | 830 |
|
| 831 |
-### Inspect changes on a container's filesystem |
|
| 831 |
+#### Inspect changes on a container's filesystem |
|
| 832 | 832 |
|
| 833 | 833 |
`GET /containers/(id or name)/changes` |
| 834 | 834 |
|
| ... | ... |
@@ -870,7 +868,7 @@ Values for `Kind`: |
| 870 | 870 |
- **404** – no such container |
| 871 | 871 |
- **500** – server error |
| 872 | 872 |
|
| 873 |
-### Export a container |
|
| 873 |
+#### Export a container |
|
| 874 | 874 |
|
| 875 | 875 |
`GET /containers/(id or name)/export` |
| 876 | 876 |
|
| ... | ... |
@@ -895,7 +893,7 @@ Export the contents of container `id` |
| 895 | 895 |
- **404** – no such container |
| 896 | 896 |
- **500** – server error |
| 897 | 897 |
|
| 898 |
-### Get container stats based on resource usage |
|
| 898 |
+#### Get container stats based on resource usage |
|
| 899 | 899 |
|
| 900 | 900 |
`GET /containers/(id or name)/stats` |
| 901 | 901 |
|
| ... | ... |
@@ -1019,7 +1017,7 @@ The precpu_stats is the cpu statistic of last read, which is used for calculatin |
| 1019 | 1019 |
- **404** – no such container |
| 1020 | 1020 |
- **500** – server error |
| 1021 | 1021 |
|
| 1022 |
-### Resize a container TTY |
|
| 1022 |
+#### Resize a container TTY |
|
| 1023 | 1023 |
|
| 1024 | 1024 |
`POST /containers/(id or name)/resize` |
| 1025 | 1025 |
|
| ... | ... |
@@ -1046,7 +1044,7 @@ Resize the TTY for container with `id`. The unit is number of characters. You m |
| 1046 | 1046 |
- **404** – No such container |
| 1047 | 1047 |
- **500** – Cannot resize container |
| 1048 | 1048 |
|
| 1049 |
-### Start a container |
|
| 1049 |
+#### Start a container |
|
| 1050 | 1050 |
|
| 1051 | 1051 |
`POST /containers/(id or name)/start` |
| 1052 | 1052 |
|
| ... | ... |
@@ -1073,7 +1071,7 @@ Start the container `id` |
| 1073 | 1073 |
- **404** – no such container |
| 1074 | 1074 |
- **500** – server error |
| 1075 | 1075 |
|
| 1076 |
-### Stop a container |
|
| 1076 |
+#### Stop a container |
|
| 1077 | 1077 |
|
| 1078 | 1078 |
`POST /containers/(id or name)/stop` |
| 1079 | 1079 |
|
| ... | ... |
@@ -1098,7 +1096,7 @@ Stop the container `id` |
| 1098 | 1098 |
- **404** – no such container |
| 1099 | 1099 |
- **500** – server error |
| 1100 | 1100 |
|
| 1101 |
-### Restart a container |
|
| 1101 |
+#### Restart a container |
|
| 1102 | 1102 |
|
| 1103 | 1103 |
`POST /containers/(id or name)/restart` |
| 1104 | 1104 |
|
| ... | ... |
@@ -1122,7 +1120,7 @@ Restart the container `id` |
| 1122 | 1122 |
- **404** – no such container |
| 1123 | 1123 |
- **500** – server error |
| 1124 | 1124 |
|
| 1125 |
-### Kill a container |
|
| 1125 |
+#### Kill a container |
|
| 1126 | 1126 |
|
| 1127 | 1127 |
`POST /containers/(id or name)/kill` |
| 1128 | 1128 |
|
| ... | ... |
@@ -1147,7 +1145,7 @@ Kill the container `id` |
| 1147 | 1147 |
- **404** – no such container |
| 1148 | 1148 |
- **500** – server error |
| 1149 | 1149 |
|
| 1150 |
-### Update a container |
|
| 1150 |
+#### Update a container |
|
| 1151 | 1151 |
|
| 1152 | 1152 |
`POST /containers/(id or name)/update` |
| 1153 | 1153 |
|
| ... | ... |
@@ -1191,7 +1189,7 @@ Update configuration of one or more containers. |
| 1191 | 1191 |
- **404** – no such container |
| 1192 | 1192 |
- **500** – server error |
| 1193 | 1193 |
|
| 1194 |
-### Rename a container |
|
| 1194 |
+#### Rename a container |
|
| 1195 | 1195 |
|
| 1196 | 1196 |
`POST /containers/(id or name)/rename` |
| 1197 | 1197 |
|
| ... | ... |
@@ -1216,7 +1214,7 @@ Rename the container `id` to a `new_name` |
| 1216 | 1216 |
- **409** - conflict name already assigned |
| 1217 | 1217 |
- **500** – server error |
| 1218 | 1218 |
|
| 1219 |
-### Pause a container |
|
| 1219 |
+#### Pause a container |
|
| 1220 | 1220 |
|
| 1221 | 1221 |
`POST /containers/(id or name)/pause` |
| 1222 | 1222 |
|
| ... | ... |
@@ -1236,7 +1234,7 @@ Pause the container `id` |
| 1236 | 1236 |
- **404** – no such container |
| 1237 | 1237 |
- **500** – server error |
| 1238 | 1238 |
|
| 1239 |
-### Unpause a container |
|
| 1239 |
+#### Unpause a container |
|
| 1240 | 1240 |
|
| 1241 | 1241 |
`POST /containers/(id or name)/unpause` |
| 1242 | 1242 |
|
| ... | ... |
@@ -1256,7 +1254,7 @@ Unpause the container `id` |
| 1256 | 1256 |
- **404** – no such container |
| 1257 | 1257 |
- **500** – server error |
| 1258 | 1258 |
|
| 1259 |
-### Attach to a container |
|
| 1259 |
+#### Attach to a container |
|
| 1260 | 1260 |
|
| 1261 | 1261 |
`POST /containers/(id or name)/attach` |
| 1262 | 1262 |
|
| ... | ... |
@@ -1345,7 +1343,7 @@ The simplest way to implement the Attach protocol is the following: |
| 1345 | 1345 |
4. Read the extracted size and output it on the correct output. |
| 1346 | 1346 |
5. Goto 1. |
| 1347 | 1347 |
|
| 1348 |
-### Attach to a container (websocket) |
|
| 1348 |
+#### Attach to a container (websocket) |
|
| 1349 | 1349 |
|
| 1350 | 1350 |
`GET /containers/(id or name)/attach/ws` |
| 1351 | 1351 |
|
| ... | ... |
@@ -1385,7 +1383,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet |
| 1385 | 1385 |
- **404** – no such container |
| 1386 | 1386 |
- **500** – server error |
| 1387 | 1387 |
|
| 1388 |
-### Wait a container |
|
| 1388 |
+#### Wait a container |
|
| 1389 | 1389 |
|
| 1390 | 1390 |
`POST /containers/(id or name)/wait` |
| 1391 | 1391 |
|
| ... | ... |
@@ -1408,7 +1406,7 @@ Block until container `id` stops, then returns the exit code |
| 1408 | 1408 |
- **404** – no such container |
| 1409 | 1409 |
- **500** – server error |
| 1410 | 1410 |
|
| 1411 |
-### Remove a container |
|
| 1411 |
+#### Remove a container |
|
| 1412 | 1412 |
|
| 1413 | 1413 |
`DELETE /containers/(id or name)` |
| 1414 | 1414 |
|
| ... | ... |
@@ -1437,14 +1435,14 @@ Remove the container `id` from the filesystem |
| 1437 | 1437 |
- **409** – conflict |
| 1438 | 1438 |
- **500** – server error |
| 1439 | 1439 |
|
| 1440 |
-### Retrieving information about files and folders in a container |
|
| 1440 |
+#### Retrieving information about files and folders in a container |
|
| 1441 | 1441 |
|
| 1442 | 1442 |
`HEAD /containers/(id or name)/archive` |
| 1443 | 1443 |
|
| 1444 | 1444 |
See the description of the `X-Docker-Container-Path-Stat` header in the |
| 1445 | 1445 |
following section. |
| 1446 | 1446 |
|
| 1447 |
-### Get an archive of a filesystem resource in a container |
|
| 1447 |
+#### Get an archive of a filesystem resource in a container |
|
| 1448 | 1448 |
|
| 1449 | 1449 |
`GET /containers/(id or name)/archive` |
| 1450 | 1450 |
|
| ... | ... |
@@ -1509,7 +1507,7 @@ desired. |
| 1509 | 1509 |
- no such file or directory (**path** does not exist) |
| 1510 | 1510 |
- **500** - server error |
| 1511 | 1511 |
|
| 1512 |
-### Extract an archive of files or folders to a directory in a container |
|
| 1512 |
+#### Extract an archive of files or folders to a directory in a container |
|
| 1513 | 1513 |
|
| 1514 | 1514 |
`PUT /containers/(id or name)/archive` |
| 1515 | 1515 |
|
| ... | ... |
@@ -1557,9 +1555,9 @@ Upload a tar archive to be extracted to a path in the filesystem of container |
| 1557 | 1557 |
- no such file or directory (**path** resource does not exist) |
| 1558 | 1558 |
- **500** – server error |
| 1559 | 1559 |
|
| 1560 |
-## 3.2 Images |
|
| 1560 |
+### 3.2 Images |
|
| 1561 | 1561 |
|
| 1562 |
-### List Images |
|
| 1562 |
+#### List Images |
|
| 1563 | 1563 |
|
| 1564 | 1564 |
`GET /images/json` |
| 1565 | 1565 |
|
| ... | ... |
@@ -1652,7 +1650,7 @@ references on the command line. |
| 1652 | 1652 |
- `since`=(`<image-name>[:<tag>]`, `<image id>` or `<image@digest>`) |
| 1653 | 1653 |
- **filter** - only return images with the specified name |
| 1654 | 1654 |
|
| 1655 |
-### Build image from a Dockerfile |
|
| 1655 |
+#### Build image from a Dockerfile |
|
| 1656 | 1656 |
|
| 1657 | 1657 |
`POST /build` |
| 1658 | 1658 |
|
| ... | ... |
@@ -1758,7 +1756,7 @@ or being killed. |
| 1758 | 1758 |
- **200** – no error |
| 1759 | 1759 |
- **500** – server error |
| 1760 | 1760 |
|
| 1761 |
-### Create an image |
|
| 1761 |
+#### Create an image |
|
| 1762 | 1762 |
|
| 1763 | 1763 |
`POST /images/create` |
| 1764 | 1764 |
|
| ... | ... |
@@ -1824,7 +1822,7 @@ a base64-encoded AuthConfig object. |
| 1824 | 1824 |
|
| 1825 | 1825 |
|
| 1826 | 1826 |
|
| 1827 |
-### Inspect an image |
|
| 1827 |
+#### Inspect an image |
|
| 1828 | 1828 |
|
| 1829 | 1829 |
`GET /images/(name)/json` |
| 1830 | 1830 |
|
| ... | ... |
@@ -1942,7 +1940,7 @@ Return low-level information on the image `name` |
| 1942 | 1942 |
- **404** – no such image |
| 1943 | 1943 |
- **500** – server error |
| 1944 | 1944 |
|
| 1945 |
-### Get the history of an image |
|
| 1945 |
+#### Get the history of an image |
|
| 1946 | 1946 |
|
| 1947 | 1947 |
`GET /images/(name)/history` |
| 1948 | 1948 |
|
| ... | ... |
@@ -1996,7 +1994,7 @@ Return the history of the image `name` |
| 1996 | 1996 |
- **404** – no such image |
| 1997 | 1997 |
- **500** – server error |
| 1998 | 1998 |
|
| 1999 |
-### Push an image on the registry |
|
| 1999 |
+#### Push an image on the registry |
|
| 2000 | 2000 |
|
| 2001 | 2001 |
`POST /images/(name)/push` |
| 2002 | 2002 |
|
| ... | ... |
@@ -2058,7 +2056,7 @@ The push is cancelled if the HTTP connection is closed. |
| 2058 | 2058 |
- **404** – no such image |
| 2059 | 2059 |
- **500** – server error |
| 2060 | 2060 |
|
| 2061 |
-### Tag an image into a repository |
|
| 2061 |
+#### Tag an image into a repository |
|
| 2062 | 2062 |
|
| 2063 | 2063 |
`POST /images/(name)/tag` |
| 2064 | 2064 |
|
| ... | ... |
@@ -2085,7 +2083,7 @@ Tag the image `name` into a repository |
| 2085 | 2085 |
- **409** – conflict |
| 2086 | 2086 |
- **500** – server error |
| 2087 | 2087 |
|
| 2088 |
-### Remove an image |
|
| 2088 |
+#### Remove an image |
|
| 2089 | 2089 |
|
| 2090 | 2090 |
`DELETE /images/(name)` |
| 2091 | 2091 |
|
| ... | ... |
@@ -2118,7 +2116,7 @@ Remove the image `name` from the filesystem |
| 2118 | 2118 |
- **409** – conflict |
| 2119 | 2119 |
- **500** – server error |
| 2120 | 2120 |
|
| 2121 |
-### Search images |
|
| 2121 |
+#### Search images |
|
| 2122 | 2122 |
|
| 2123 | 2123 |
`GET /images/search` |
| 2124 | 2124 |
|
| ... | ... |
@@ -2176,9 +2174,9 @@ Search for an image on [Docker Hub](https://hub.docker.com). |
| 2176 | 2176 |
- **200** – no error |
| 2177 | 2177 |
- **500** – server error |
| 2178 | 2178 |
|
| 2179 |
-## 3.3 Misc |
|
| 2179 |
+### 3.3 Misc |
|
| 2180 | 2180 |
|
| 2181 |
-### Check auth configuration |
|
| 2181 |
+#### Check auth configuration |
|
| 2182 | 2182 |
|
| 2183 | 2183 |
`POST /auth` |
| 2184 | 2184 |
|
| ... | ... |
@@ -2211,7 +2209,7 @@ if available, for accessing the registry without password. |
| 2211 | 2211 |
- **204** – no error |
| 2212 | 2212 |
- **500** – server error |
| 2213 | 2213 |
|
| 2214 |
-### Display system-wide information |
|
| 2214 |
+#### Display system-wide information |
|
| 2215 | 2215 |
|
| 2216 | 2216 |
`GET /info` |
| 2217 | 2217 |
|
| ... | ... |
@@ -2304,7 +2302,7 @@ Display system-wide information |
| 2304 | 2304 |
- **200** – no error |
| 2305 | 2305 |
- **500** – server error |
| 2306 | 2306 |
|
| 2307 |
-### Show the docker version information |
|
| 2307 |
+#### Show the docker version information |
|
| 2308 | 2308 |
|
| 2309 | 2309 |
`GET /version` |
| 2310 | 2310 |
|
| ... | ... |
@@ -2336,7 +2334,7 @@ Show the docker version information |
| 2336 | 2336 |
- **200** – no error |
| 2337 | 2337 |
- **500** – server error |
| 2338 | 2338 |
|
| 2339 |
-### Ping the docker server |
|
| 2339 |
+#### Ping the docker server |
|
| 2340 | 2340 |
|
| 2341 | 2341 |
`GET /_ping` |
| 2342 | 2342 |
|
| ... | ... |
@@ -2358,7 +2356,7 @@ Ping the docker server |
| 2358 | 2358 |
- **200** - no error |
| 2359 | 2359 |
- **500** - server error |
| 2360 | 2360 |
|
| 2361 |
-### Create a new image from a container's changes |
|
| 2361 |
+#### Create a new image from a container's changes |
|
| 2362 | 2362 |
|
| 2363 | 2363 |
`POST /commit` |
| 2364 | 2364 |
|
| ... | ... |
@@ -2430,7 +2428,7 @@ Create a new image from a container's changes |
| 2430 | 2430 |
- **404** – no such container |
| 2431 | 2431 |
- **500** – server error |
| 2432 | 2432 |
|
| 2433 |
-### Monitor Docker's events |
|
| 2433 |
+#### Monitor Docker's events |
|
| 2434 | 2434 |
|
| 2435 | 2435 |
`GET /events` |
| 2436 | 2436 |
|
| ... | ... |
@@ -2635,7 +2633,7 @@ Docker daemon report the following event: |
| 2635 | 2635 |
- **200** – no error |
| 2636 | 2636 |
- **500** – server error |
| 2637 | 2637 |
|
| 2638 |
-### Get a tarball containing all images in a repository |
|
| 2638 |
+#### Get a tarball containing all images in a repository |
|
| 2639 | 2639 |
|
| 2640 | 2640 |
`GET /images/(name)/get` |
| 2641 | 2641 |
|
| ... | ... |
@@ -2665,7 +2663,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2665 | 2665 |
- **200** – no error |
| 2666 | 2666 |
- **500** – server error |
| 2667 | 2667 |
|
| 2668 |
-### Get a tarball containing all images |
|
| 2668 |
+#### Get a tarball containing all images |
|
| 2669 | 2669 |
|
| 2670 | 2670 |
`GET /images/get` |
| 2671 | 2671 |
|
| ... | ... |
@@ -2694,7 +2692,7 @@ See the [image tarball format](#image-tarball-format) for more details. |
| 2694 | 2694 |
- **200** – no error |
| 2695 | 2695 |
- **500** – server error |
| 2696 | 2696 |
|
| 2697 |
-### Load a tarball with a set of images and tags into docker |
|
| 2697 |
+#### Load a tarball with a set of images and tags into docker |
|
| 2698 | 2698 |
|
| 2699 | 2699 |
`POST /images/load` |
| 2700 | 2700 |
|
| ... | ... |
@@ -2743,7 +2741,7 @@ action completes. |
| 2743 | 2743 |
- **200** – no error |
| 2744 | 2744 |
- **500** – server error |
| 2745 | 2745 |
|
| 2746 |
-### Image tarball format |
|
| 2746 |
+#### Image tarball format |
|
| 2747 | 2747 |
|
| 2748 | 2748 |
An image tarball contains one directory per image layer (named using its long ID), |
| 2749 | 2749 |
each containing these files: |
| ... | ... |
@@ -2764,7 +2762,7 @@ the root that contains a list of repository and tag names mapped to layer IDs. |
| 2764 | 2764 |
} |
| 2765 | 2765 |
``` |
| 2766 | 2766 |
|
| 2767 |
-### Exec Create |
|
| 2767 |
+#### Exec Create |
|
| 2768 | 2768 |
|
| 2769 | 2769 |
`POST /containers/(id or name)/exec` |
| 2770 | 2770 |
|
| ... | ... |
@@ -2818,7 +2816,7 @@ Sets up an exec instance in a running container `id` |
| 2818 | 2818 |
- **409** - container is paused |
| 2819 | 2819 |
- **500** - server error |
| 2820 | 2820 |
|
| 2821 |
-### Exec Start |
|
| 2821 |
+#### Exec Start |
|
| 2822 | 2822 |
|
| 2823 | 2823 |
`POST /exec/(id)/start` |
| 2824 | 2824 |
|
| ... | ... |
@@ -2860,7 +2858,7 @@ interactive session with the `exec` command. |
| 2860 | 2860 |
|
| 2861 | 2861 |
Similar to the stream behavior of `POST /containers/(id or name)/attach` API |
| 2862 | 2862 |
|
| 2863 |
-### Exec Resize |
|
| 2863 |
+#### Exec Resize |
|
| 2864 | 2864 |
|
| 2865 | 2865 |
`POST /exec/(id)/resize` |
| 2866 | 2866 |
|
| ... | ... |
@@ -2887,7 +2885,7 @@ This API is valid only if `tty` was specified as part of creating and starting t |
| 2887 | 2887 |
- **201** – no error |
| 2888 | 2888 |
- **404** – no such exec instance |
| 2889 | 2889 |
|
| 2890 |
-### Exec Inspect |
|
| 2890 |
+#### Exec Inspect |
|
| 2891 | 2891 |
|
| 2892 | 2892 |
`GET /exec/(id)/json` |
| 2893 | 2893 |
|
| ... | ... |
@@ -2930,9 +2928,9 @@ Return low-level information about the `exec` command `id`. |
| 2930 | 2930 |
- **404** – no such exec instance |
| 2931 | 2931 |
- **500** - server error |
| 2932 | 2932 |
|
| 2933 |
-## 3.4 Volumes |
|
| 2933 |
+### 3.4 Volumes |
|
| 2934 | 2934 |
|
| 2935 |
-### List volumes |
|
| 2935 |
+#### List volumes |
|
| 2936 | 2936 |
|
| 2937 | 2937 |
`GET /volumes` |
| 2938 | 2938 |
|
| ... | ... |
@@ -2970,7 +2968,7 @@ Return low-level information about the `exec` command `id`. |
| 2970 | 2970 |
- **200** - no error |
| 2971 | 2971 |
- **500** - server error |
| 2972 | 2972 |
|
| 2973 |
-### Create a volume |
|
| 2973 |
+#### Create a volume |
|
| 2974 | 2974 |
|
| 2975 | 2975 |
`POST /volumes/create` |
| 2976 | 2976 |
|
| ... | ... |
@@ -3027,7 +3025,7 @@ Create a volume |
| 3027 | 3027 |
Refer to the [inspect a volume](#inspect-a-volume) section or details about the |
| 3028 | 3028 |
JSON fields returned in the response. |
| 3029 | 3029 |
|
| 3030 |
-### Inspect a volume |
|
| 3030 |
+#### Inspect a volume |
|
| 3031 | 3031 |
|
| 3032 | 3032 |
`GET /volumes/(name)` |
| 3033 | 3033 |
|
| ... | ... |
@@ -3079,7 +3077,7 @@ response. |
| 3079 | 3079 |
- **Scope** - Scope describes the level at which the volume exists, can be one of |
| 3080 | 3080 |
`global` for cluster-wide or `local` for machine level. The default is `local`. |
| 3081 | 3081 |
|
| 3082 |
-### Remove a volume |
|
| 3082 |
+#### Remove a volume |
|
| 3083 | 3083 |
|
| 3084 | 3084 |
`DELETE /volumes/(name)` |
| 3085 | 3085 |
|
| ... | ... |
@@ -3100,9 +3098,9 @@ Instruct the driver to remove the volume (`name`). |
| 3100 | 3100 |
- **409** - volume is in use and cannot be removed |
| 3101 | 3101 |
- **500** - server error |
| 3102 | 3102 |
|
| 3103 |
-## 3.5 Networks |
|
| 3103 |
+### 3.5 Networks |
|
| 3104 | 3104 |
|
| 3105 |
-### List networks |
|
| 3105 |
+#### List networks |
|
| 3106 | 3106 |
|
| 3107 | 3107 |
`GET /networks` |
| 3108 | 3108 |
|
| ... | ... |
@@ -3194,7 +3192,7 @@ Content-Type: application/json |
| 3194 | 3194 |
- **200** - no error |
| 3195 | 3195 |
- **500** - server error |
| 3196 | 3196 |
|
| 3197 |
-### Inspect network |
|
| 3197 |
+#### Inspect network |
|
| 3198 | 3198 |
|
| 3199 | 3199 |
`GET /networks/<network-id>` |
| 3200 | 3200 |
|
| ... | ... |
@@ -3256,7 +3254,7 @@ Content-Type: application/json |
| 3256 | 3256 |
- **200** - no error |
| 3257 | 3257 |
- **404** - network not found |
| 3258 | 3258 |
|
| 3259 |
-### Create a network |
|
| 3259 |
+#### Create a network |
|
| 3260 | 3260 |
|
| 3261 | 3261 |
`POST /networks/create` |
| 3262 | 3262 |
|
| ... | ... |
@@ -3339,7 +3337,7 @@ Content-Type: application/json |
| 3339 | 3339 |
- **Options** - Network specific options to be used by the drivers |
| 3340 | 3340 |
- **Labels** - Labels to set on the network, specified as a map: `{"key":"value" [,"key2":"value2"]}`
|
| 3341 | 3341 |
|
| 3342 |
-### Connect a container to a network |
|
| 3342 |
+#### Connect a container to a network |
|
| 3343 | 3343 |
|
| 3344 | 3344 |
`POST /networks/(id)/connect` |
| 3345 | 3345 |
|
| ... | ... |
@@ -3377,7 +3375,7 @@ Content-Type: application/json |
| 3377 | 3377 |
|
| 3378 | 3378 |
- **container** - container-id/name to be connected to the network |
| 3379 | 3379 |
|
| 3380 |
-### Disconnect a container from a network |
|
| 3380 |
+#### Disconnect a container from a network |
|
| 3381 | 3381 |
|
| 3382 | 3382 |
`POST /networks/(id)/disconnect` |
| 3383 | 3383 |
|
| ... | ... |
@@ -3411,7 +3409,7 @@ Content-Type: application/json |
| 3411 | 3411 |
- **Container** - container-id/name to be disconnected from a network |
| 3412 | 3412 |
- **Force** - Force the container to disconnect from a network |
| 3413 | 3413 |
|
| 3414 |
-### Remove a network |
|
| 3414 |
+#### Remove a network |
|
| 3415 | 3415 |
|
| 3416 | 3416 |
`DELETE /networks/(id)` |
| 3417 | 3417 |
|
| ... | ... |
@@ -3431,9 +3429,9 @@ Instruct the driver to remove the network (`id`). |
| 3431 | 3431 |
- **404** - no such network |
| 3432 | 3432 |
- **500** - server error |
| 3433 | 3433 |
|
| 3434 |
-## 3.6 Plugins (experimental) |
|
| 3434 |
+### 3.6 Plugins (experimental) |
|
| 3435 | 3435 |
|
| 3436 |
-### List plugins |
|
| 3436 |
+#### List plugins |
|
| 3437 | 3437 |
|
| 3438 | 3438 |
`GET /plugins` |
| 3439 | 3439 |
|
| ... | ... |
@@ -3563,7 +3561,7 @@ Content-Type: application/json |
| 3563 | 3563 |
- **200** - no error |
| 3564 | 3564 |
- **500** - server error |
| 3565 | 3565 |
|
| 3566 |
-### Install a plugin |
|
| 3566 |
+#### Install a plugin |
|
| 3567 | 3567 |
|
| 3568 | 3568 |
`POST /plugins/pull?name=<plugin name>` |
| 3569 | 3569 |
|
| ... | ... |
@@ -3625,7 +3623,7 @@ Content-Length: 175 |
| 3625 | 3625 |
name must have at least one component |
| 3626 | 3626 |
- **500** - plugin already exists |
| 3627 | 3627 |
|
| 3628 |
-### Inspect a plugin |
|
| 3628 |
+#### Inspect a plugin |
|
| 3629 | 3629 |
|
| 3630 | 3630 |
`GET /plugins/(plugin name)` |
| 3631 | 3631 |
|
| ... | ... |
@@ -3758,7 +3756,7 @@ Content-Type: application/json |
| 3758 | 3758 |
- **200** - no error |
| 3759 | 3759 |
- **404** - plugin not installed |
| 3760 | 3760 |
|
| 3761 |
-### Enable a plugin |
|
| 3761 |
+#### Enable a plugin |
|
| 3762 | 3762 |
|
| 3763 | 3763 |
`POST /plugins/(plugin name)/enable` |
| 3764 | 3764 |
|
| ... | ... |
@@ -3786,7 +3784,7 @@ Content-Type: text/plain; charset=utf-8 |
| 3786 | 3786 |
- **200** - no error |
| 3787 | 3787 |
- **500** - plugin is already enabled |
| 3788 | 3788 |
|
| 3789 |
-### Disable a plugin |
|
| 3789 |
+#### Disable a plugin |
|
| 3790 | 3790 |
|
| 3791 | 3791 |
`POST /plugins/(plugin name)/disable` |
| 3792 | 3792 |
|
| ... | ... |
@@ -3814,7 +3812,7 @@ Content-Type: text/plain; charset=utf-8 |
| 3814 | 3814 |
- **200** - no error |
| 3815 | 3815 |
- **500** - plugin is already disabled |
| 3816 | 3816 |
|
| 3817 |
-### Remove a plugin |
|
| 3817 |
+#### Remove a plugin |
|
| 3818 | 3818 |
|
| 3819 | 3819 |
`DELETE /plugins/(plugin name)` |
| 3820 | 3820 |
|
| ... | ... |
@@ -3844,7 +3842,7 @@ Content-Type: text/plain; charset=utf-8 |
| 3844 | 3844 |
|
| 3845 | 3845 |
<!-- TODO Document "docker plugin push" endpoint once we have "plugin build" |
| 3846 | 3846 |
|
| 3847 |
-### Push a plugin |
|
| 3847 |
+#### Push a plugin |
|
| 3848 | 3848 |
|
| 3849 | 3849 |
`POST /v1.24/plugins/tiborvass/(plugin name)/push HTTP/1.1` |
| 3850 | 3850 |
|
| ... | ... |
@@ -3870,11 +3868,11 @@ an image](#create-an-image) section for more details. |
| 3870 | 3870 |
|
| 3871 | 3871 |
--> |
| 3872 | 3872 |
|
| 3873 |
-## 3.7 Nodes |
|
| 3873 |
+### 3.7 Nodes |
|
| 3874 | 3874 |
|
| 3875 | 3875 |
**Note**: Node operations require the engine to be part of a swarm. |
| 3876 | 3876 |
|
| 3877 |
-### List nodes |
|
| 3877 |
+#### List nodes |
|
| 3878 | 3878 |
|
| 3879 | 3879 |
|
| 3880 | 3880 |
`GET /nodes` |
| ... | ... |
@@ -3967,7 +3965,7 @@ List nodes |
| 3967 | 3967 |
- **200** – no error |
| 3968 | 3968 |
- **500** – server error |
| 3969 | 3969 |
|
| 3970 |
-### Inspect a node |
|
| 3970 |
+#### Inspect a node |
|
| 3971 | 3971 |
|
| 3972 | 3972 |
|
| 3973 | 3973 |
`GET /nodes/(id or name)` |
| ... | ... |
@@ -4049,7 +4047,7 @@ Return low-level information on the node `id` |
| 4049 | 4049 |
- **404** – no such node |
| 4050 | 4050 |
- **500** – server error |
| 4051 | 4051 |
|
| 4052 |
-### Remove a node |
|
| 4052 |
+#### Remove a node |
|
| 4053 | 4053 |
|
| 4054 | 4054 |
|
| 4055 | 4055 |
`DELETE /nodes/(id or name)` |
| ... | ... |
@@ -4077,7 +4075,7 @@ Remove a node from the swarm. |
| 4077 | 4077 |
- **404** – no such node |
| 4078 | 4078 |
- **500** – server error |
| 4079 | 4079 |
|
| 4080 |
-### Update a node |
|
| 4080 |
+#### Update a node |
|
| 4081 | 4081 |
|
| 4082 | 4082 |
|
| 4083 | 4083 |
`POST /nodes/(id)/update` |
| ... | ... |
@@ -4132,9 +4130,9 @@ JSON Parameters: |
| 4132 | 4132 |
- **404** – no such node |
| 4133 | 4133 |
- **500** – server error |
| 4134 | 4134 |
|
| 4135 |
-## 3.8 Swarm |
|
| 4135 |
+### 3.8 Swarm |
|
| 4136 | 4136 |
|
| 4137 |
-### Inspect swarm |
|
| 4137 |
+#### Inspect swarm |
|
| 4138 | 4138 |
|
| 4139 | 4139 |
|
| 4140 | 4140 |
`GET /swarm` |
| ... | ... |
@@ -4182,7 +4180,7 @@ Inspect swarm |
| 4182 | 4182 |
|
| 4183 | 4183 |
- **200** - no error |
| 4184 | 4184 |
|
| 4185 |
-### Initialize a new swarm |
|
| 4185 |
+#### Initialize a new swarm |
|
| 4186 | 4186 |
|
| 4187 | 4187 |
|
| 4188 | 4188 |
`POST /swarm/init` |
| ... | ... |
@@ -4258,7 +4256,7 @@ JSON Parameters: |
| 4258 | 4258 |
- **Options** - An object with key/value pairs that are interpreted |
| 4259 | 4259 |
as protocol-specific options for the external CA driver. |
| 4260 | 4260 |
|
| 4261 |
-### Join an existing swarm |
|
| 4261 |
+#### Join an existing swarm |
|
| 4262 | 4262 |
|
| 4263 | 4263 |
`POST /swarm/join` |
| 4264 | 4264 |
|
| ... | ... |
@@ -4300,7 +4298,7 @@ JSON Parameters: |
| 4300 | 4300 |
- **RemoteAddr** – Address of any manager node already participating in the swarm. |
| 4301 | 4301 |
- **JoinToken** – Secret token for joining this swarm. |
| 4302 | 4302 |
|
| 4303 |
-### Leave a swarm |
|
| 4303 |
+#### Leave a swarm |
|
| 4304 | 4304 |
|
| 4305 | 4305 |
|
| 4306 | 4306 |
`POST /swarm/leave` |
| ... | ... |
@@ -4326,7 +4324,7 @@ Leave a swarm |
| 4326 | 4326 |
- **200** – no error |
| 4327 | 4327 |
- **406** – node is not part of a swarm |
| 4328 | 4328 |
|
| 4329 |
-### Update a swarm |
|
| 4329 |
+#### Update a swarm |
|
| 4330 | 4330 |
|
| 4331 | 4331 |
|
| 4332 | 4332 |
`POST /swarm/update` |
| ... | ... |
@@ -4407,11 +4405,11 @@ JSON Parameters: |
| 4407 | 4407 |
- **Worker** - Token to use for joining as a worker. |
| 4408 | 4408 |
- **Manager** - Token to use for joining as a manager. |
| 4409 | 4409 |
|
| 4410 |
-## 3.9 Services |
|
| 4410 |
+### 3.9 Services |
|
| 4411 | 4411 |
|
| 4412 | 4412 |
**Note**: Service operations require to first be part of a swarm. |
| 4413 | 4413 |
|
| 4414 |
-### List services |
|
| 4414 |
+#### List services |
|
| 4415 | 4415 |
|
| 4416 | 4416 |
|
| 4417 | 4417 |
`GET /services` |
| ... | ... |
@@ -4516,7 +4514,7 @@ List services |
| 4516 | 4516 |
- **200** – no error |
| 4517 | 4517 |
- **500** – server error |
| 4518 | 4518 |
|
| 4519 |
-### Create a service |
|
| 4519 |
+#### Create a service |
|
| 4520 | 4520 |
|
| 4521 | 4521 |
`POST /services/create` |
| 4522 | 4522 |
|
| ... | ... |
@@ -4689,7 +4687,7 @@ image](#create-an-image) section for more details. |
| 4689 | 4689 |
section for more details. |
| 4690 | 4690 |
|
| 4691 | 4691 |
|
| 4692 |
-### Remove a service |
|
| 4692 |
+#### Remove a service |
|
| 4693 | 4693 |
|
| 4694 | 4694 |
|
| 4695 | 4695 |
`DELETE /services/(id or name)` |
| ... | ... |
@@ -4712,7 +4710,7 @@ Stop and remove the service `id` |
| 4712 | 4712 |
- **404** – no such service |
| 4713 | 4713 |
- **500** – server error |
| 4714 | 4714 |
|
| 4715 |
-### Inspect one or more services |
|
| 4715 |
+#### Inspect one or more services |
|
| 4716 | 4716 |
|
| 4717 | 4717 |
|
| 4718 | 4718 |
`GET /services/(id or name)` |
| ... | ... |
@@ -4801,7 +4799,7 @@ Return information on the service `id`. |
| 4801 | 4801 |
- **404** – no such service |
| 4802 | 4802 |
- **500** – server error |
| 4803 | 4803 |
|
| 4804 |
-### Update a service |
|
| 4804 |
+#### Update a service |
|
| 4805 | 4805 |
|
| 4806 | 4806 |
`POST /services/(id or name)/update` |
| 4807 | 4807 |
|
| ... | ... |
@@ -4934,11 +4932,11 @@ image](#create-an-image) section for more details. |
| 4934 | 4934 |
- **404** – no such service |
| 4935 | 4935 |
- **500** – server error |
| 4936 | 4936 |
|
| 4937 |
-## 3.10 Tasks |
|
| 4937 |
+### 3.10 Tasks |
|
| 4938 | 4938 |
|
| 4939 | 4939 |
**Note**: Task operations require the engine to be part of a swarm. |
| 4940 | 4940 |
|
| 4941 |
-### List tasks |
|
| 4941 |
+#### List tasks |
|
| 4942 | 4942 |
|
| 4943 | 4943 |
|
| 4944 | 4944 |
`GET /tasks` |
| ... | ... |
@@ -5136,7 +5134,7 @@ List tasks |
| 5136 | 5136 |
- **200** – no error |
| 5137 | 5137 |
- **500** – server error |
| 5138 | 5138 |
|
| 5139 |
-### Inspect a task |
|
| 5139 |
+#### Inspect a task |
|
| 5140 | 5140 |
|
| 5141 | 5141 |
|
| 5142 | 5142 |
`GET /tasks/(task id)` |
| ... | ... |
@@ -5239,9 +5237,9 @@ Get details on a task |
| 5239 | 5239 |
- **404** – unknown task |
| 5240 | 5240 |
- **500** – server error |
| 5241 | 5241 |
|
| 5242 |
-# 4. Going further |
|
| 5242 |
+## 4. Going further |
|
| 5243 | 5243 |
|
| 5244 |
-## 4.1 Inside `docker run` |
|
| 5244 |
+### 4.1 Inside `docker run` |
|
| 5245 | 5245 |
|
| 5246 | 5246 |
As an example, the `docker run` command line makes the following API calls: |
| 5247 | 5247 |
|
| ... | ... |
@@ -5259,7 +5257,7 @@ As an example, the `docker run` command line makes the following API calls: |
| 5259 | 5259 |
|
| 5260 | 5260 |
- If in detached mode or only `stdin` is attached, display the container's id. |
| 5261 | 5261 |
|
| 5262 |
-## 4.2 Hijacking |
|
| 5262 |
+### 4.2 Hijacking |
|
| 5263 | 5263 |
|
| 5264 | 5264 |
In this version of the API, `/attach`, uses hijacking to transport `stdin`, |
| 5265 | 5265 |
`stdout`, and `stderr` on the same socket. |
| ... | ... |
@@ -5274,7 +5272,7 @@ When Docker daemon detects the `Upgrade` header, it switches its status code |
| 5274 | 5274 |
from **200 OK** to **101 UPGRADED** and resends the same headers. |
| 5275 | 5275 |
|
| 5276 | 5276 |
|
| 5277 |
-## 4.3 CORS Requests |
|
| 5277 |
+### 4.3 CORS Requests |
|
| 5278 | 5278 |
|
| 5279 | 5279 |
To set cross origin requests to the Engine API please give values to |
| 5280 | 5280 |
`--api-cors-header` when running Docker in daemon mode. Set * (asterisk) allows all, |