mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Sync API docs
This synchronizes formatting changes to older versions of the API Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
66671d4ec2
commit
5696c47470
6 changed files with 1239 additions and 1224 deletions
File diff suppressed because it is too large
Load diff
|
@ -96,7 +96,7 @@ List containers
|
|||
}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
|
@ -113,7 +113,7 @@ Query Parameters:
|
|||
- `status=`(`restarting`|`running`|`paused`|`exited`)
|
||||
- `label=key` or `label="key=value"` of a container label
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -155,7 +155,7 @@ Create a container
|
|||
"com.example.version": "1.0"
|
||||
},
|
||||
"Volumes": {
|
||||
"/tmp": {}
|
||||
"/volumes/data": {}
|
||||
},
|
||||
"WorkingDir": "",
|
||||
"NetworkDisabled": false,
|
||||
|
@ -207,7 +207,7 @@ Create a container
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Hostname** - A string value containing the hostname to use for the
|
||||
container.
|
||||
|
@ -226,7 +226,7 @@ Json Parameters:
|
|||
- **Entrypoint** - Set the entry point for the container as a string or an array
|
||||
of strings.
|
||||
- **Image** - A string specifying the image name to use for the container.
|
||||
- **Volumes** – An object mapping mount point paths (strings) inside the
|
||||
- **Volumes** - An object mapping mount point paths (strings) inside the
|
||||
container to empty objects.
|
||||
- **WorkingDir** - A string specifying the working directory for commands to
|
||||
run in.
|
||||
|
@ -296,15 +296,15 @@ Json Parameters:
|
|||
- **LogConfig** - Log configuration for the container, specified as a JSON object in the form
|
||||
`{ "Type": "<driver_name>", "Config": {"key1": "val1"}}`.
|
||||
Available types: `json-file`, `syslog`, `journald`, `none`.
|
||||
`syslog` available options are: `address`.
|
||||
- **CgroupParent** - Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
|
||||
`syslog` available options are: `address`.
|
||||
- **CgroupParent** - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – Assign the specified name to the container. Must
|
||||
match `/?[a-zA-Z0-9_-]+`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -319,7 +319,6 @@ Status Codes:
|
|||
|
||||
Return low-level information on the container `id`
|
||||
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/json HTTP/1.1
|
||||
|
@ -445,7 +444,7 @@ Return low-level information on the container `id`
|
|||
"VolumesRW": {}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -505,11 +504,11 @@ supported on Windows.
|
|||
],
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -537,7 +536,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **follow** – 1/True/true or 0/False/false, return stream. Default `false`.
|
||||
- **stdout** – 1/True/true or 0/False/false, show `stdout` log. Default `false`.
|
||||
|
@ -548,7 +547,7 @@ Query Parameters:
|
|||
every log line. Default `false`.
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or `<number>`. Default all.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -591,7 +590,7 @@ Values for `Kind`:
|
|||
- `1`: Add
|
||||
- `2`: Delete
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -614,7 +613,7 @@ Export the contents of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -719,11 +718,11 @@ This endpoint returns a live stream of a container's resource usage statistics.
|
|||
|
||||
The precpu_stats is the cpu statistic of last read, which is used for calculating the cpu usage percent. It is not the exact copy of the “cpu_stats” field.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **stream** – 1/True/true or 0/False/false, pull stats once then disconnect. Default `true`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -745,7 +744,12 @@ Resize the TTY for container with `id`. You must restart the container for the
|
|||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Status Codes:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
|
@ -763,13 +767,13 @@ Start the container `id`
|
|||
|
||||
**Example request**:
|
||||
|
||||
POST /containers/e90e34656806/start HTTP/1.1
|
||||
POST /containers/e90e34656806/start HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 No Content
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already started
|
||||
|
@ -790,11 +794,11 @@ Stop the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already stopped
|
||||
|
@ -815,11 +819,11 @@ Restart the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -839,12 +843,12 @@ Kill the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
**Query parameters**:
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like `SIGINT`.
|
||||
When not set, `SIGKILL` is assumed and the call waits for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -864,11 +868,11 @@ Rename the container `id` to a `new_name`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – new name for the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -889,7 +893,7 @@ Pause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -909,7 +913,7 @@ Unpause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -934,7 +938,7 @@ Attach to the container `id`
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default `false`.
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -946,7 +950,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -1014,7 +1018,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default `false`.
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -1026,7 +1030,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1050,7 +1054,7 @@ Block until container `id` stops, then returns the exit code
|
|||
|
||||
{"StatusCode": 0}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1070,14 +1074,14 @@ Remove the container `id` from the filesystem
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default `false`.
|
||||
- **force** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1107,7 +1111,7 @@ Copy files or folders of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1198,7 +1202,7 @@ digest. You can reference this digest using the value:
|
|||
See the `docker run` and `docker build` commands for examples of digest and tag
|
||||
references on the command line.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, default false
|
||||
- **filters** – a JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
|
||||
|
@ -1242,10 +1246,10 @@ command*](../../reference/builder.md#add)).
|
|||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **dockerfile** - Path within the build context to the `Dockerfile`. This is
|
||||
ignored if `remote` is specified and points to an external `Dockerfile`.
|
||||
- **dockerfile** - Path within the build context to the Dockerfile. This is
|
||||
ignored if `remote` is specified and points to an individual filename.
|
||||
- **t** – Repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success.
|
||||
- **remote** – A Git repository URI or HTTP/HTTPS context URI. If the
|
||||
|
@ -1272,7 +1276,7 @@ Query Parameters:
|
|||
- **Content-type** – Set to `"application/tar"`.
|
||||
- **X-Registry-Config** – base64-encoded ConfigFile object
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1301,7 +1305,7 @@ When using this endpoint to pull an image from the registry, the
|
|||
`X-Registry-Auth` header can be used to include
|
||||
a base64-encoded AuthConfig object.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **fromImage** – Name of the image to pull.
|
||||
- **fromSrc** – Source to import. The value may be a URL from which the image
|
||||
|
@ -1313,7 +1317,7 @@ Query Parameters:
|
|||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1367,7 +1371,7 @@ Return low-level information on the image `name`
|
|||
"Size": 6824592
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1421,7 +1425,7 @@ Return the history of the image `name`
|
|||
}
|
||||
]
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1456,7 +1460,7 @@ then be used in the URL. This duplicates the command line's flow.
|
|||
POST /images/registry.acme.com:5000/test/push HTTP/1.1
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **tag** – The tag to associate with the image on the registry. This is optional.
|
||||
|
||||
|
@ -1465,7 +1469,7 @@ Request Headers:
|
|||
- **X-Registry-Auth** – Include a base64-encoded AuthConfig.
|
||||
object.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1485,13 +1489,13 @@ Tag the image `name` into a repository
|
|||
|
||||
HTTP/1.1 201 Created
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **tag** - The new tag name
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1520,12 +1524,12 @@ Remove the image `name` from the filesystem
|
|||
{"Deleted": "53b4f83ac9"}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1554,39 +1558,39 @@ be deprecated and replaced by the `is_automated` property.
|
|||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
[
|
||||
{
|
||||
"star_count": 12,
|
||||
"is_official": false,
|
||||
"name": "wma55/u1210sshd",
|
||||
"is_trusted": false,
|
||||
"is_automated": false,
|
||||
"description": "",
|
||||
},
|
||||
{
|
||||
"star_count": 10,
|
||||
"is_official": false,
|
||||
"name": "jdswinbank/sshd",
|
||||
"is_trusted": false,
|
||||
"is_automated": false,
|
||||
"description": "",
|
||||
},
|
||||
{
|
||||
"star_count": 18,
|
||||
"is_official": false,
|
||||
"name": "vgauthier/sshd",
|
||||
"is_trusted": false,
|
||||
"is_automated": false,
|
||||
"description": "",
|
||||
}
|
||||
...
|
||||
]
|
||||
[
|
||||
{
|
||||
"star_count": 12,
|
||||
"is_official": false,
|
||||
"name": "wma55/u1210sshd",
|
||||
"is_trusted": false,
|
||||
"is_automated": false,
|
||||
"description": "",
|
||||
},
|
||||
{
|
||||
"star_count": 10,
|
||||
"is_official": false,
|
||||
"name": "jdswinbank/sshd",
|
||||
"is_trusted": false,
|
||||
"is_automated": false,
|
||||
"description": "",
|
||||
},
|
||||
{
|
||||
"star_count": 18,
|
||||
"is_official": false,
|
||||
"name": "vgauthier/sshd",
|
||||
"is_trusted": false,
|
||||
"is_automated": false,
|
||||
"description": "",
|
||||
}
|
||||
...
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1615,7 +1619,7 @@ Get the default username and email
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **204** – no error
|
||||
|
@ -1685,7 +1689,7 @@ Display system-wide information
|
|||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1715,7 +1719,7 @@ Show the docker version information
|
|||
"ApiVersion": "1.19"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1737,7 +1741,7 @@ Ping the docker server
|
|||
|
||||
OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -1789,11 +1793,11 @@ Create a new image from a container's changes
|
|||
|
||||
{"Id": "596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
|
@ -1802,7 +1806,7 @@ Query Parameters:
|
|||
- **author** – author (e.g., "John Hannibal Smith
|
||||
<[hannibal@a-team.com](mailto:hannibal%40a-team.com)>")
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1837,16 +1841,16 @@ and Docker images report:
|
|||
{"status": "stop", "id": "dfdf82bd3881","from": "ubuntu:latest", "time":1374067966}
|
||||
{"status": "destroy", "id": "dfdf82bd3881","from": "ubuntu:latest", "time":1374067970}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **since** – Timestamp used for polling
|
||||
- **until** – Timestamp used for polling
|
||||
- **filters** – A json encoded value of the filters (a map[string][]string) to process on the event list. Available filters:
|
||||
- `container=<string>`; -- container to filter
|
||||
- `event=<string>`; -- event to filter
|
||||
- `image=<string>`; -- image to filter
|
||||
- `container=<string>`; -- container to filter
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1876,7 +1880,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1905,7 +1909,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1927,7 +1931,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1971,7 +1975,7 @@ Sets up an exec instance in a running container `id`
|
|||
"Tty": false,
|
||||
"Cmd": [
|
||||
"date"
|
||||
],
|
||||
]
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
@ -1984,7 +1988,7 @@ Sets up an exec instance in a running container `id`
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **AttachStdin** - Boolean value, attaches to `stdin` of the `exec` command.
|
||||
- **AttachStdout** - Boolean value, attaches to `stdout` of the `exec` command.
|
||||
|
@ -1993,7 +1997,7 @@ Json Parameters:
|
|||
- **Cmd** - Command to run specified as a string or an array of strings.
|
||||
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2013,7 +2017,7 @@ interactive session with the `exec` command.
|
|||
|
||||
{
|
||||
"Detach": false,
|
||||
"Tty": false,
|
||||
"Tty": false
|
||||
}
|
||||
|
||||
**Example response**:
|
||||
|
@ -2023,12 +2027,12 @@ interactive session with the `exec` command.
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Detach** - Detach from the `exec` command.
|
||||
- **Tty** - Boolean value to allocate a pseudo-TTY.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2040,12 +2044,12 @@ Status Codes:
|
|||
|
||||
`POST /exec/(id)/resize`
|
||||
|
||||
Resizes the `tty` session used by the `exec` command `id`.
|
||||
Resizes the `tty` session used by the `exec` command `id`. The unit is number of characters.
|
||||
This API is valid only if `tty` was specified as part of creating and starting the `exec` command.
|
||||
|
||||
**Example request**:
|
||||
|
||||
POST /exec/e90e34656806/resize HTTP/1.1
|
||||
POST /exec/e90e34656806/resize?h=40&w=80 HTTP/1.1
|
||||
Content-Type: text/plain
|
||||
|
||||
**Example response**:
|
||||
|
@ -2053,12 +2057,12 @@ This API is valid only if `tty` was specified as part of creating and starting t
|
|||
HTTP/1.1 201 Created
|
||||
Content-Type: text/plain
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2162,7 +2166,7 @@ Return low-level information about the `exec` command `id`.
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
|
|
@ -96,7 +96,7 @@ List containers
|
|||
}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
|
@ -113,7 +113,7 @@ Query Parameters:
|
|||
- `status=`(`created`|`restarting`|`running`|`paused`|`exited`)
|
||||
- `label=key` or `label="key=value"` of a container label
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -209,7 +209,7 @@ Create a container
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Hostname** - A string value containing the hostname to use for the
|
||||
container.
|
||||
|
@ -303,12 +303,12 @@ Json Parameters:
|
|||
`json-file` logging driver.
|
||||
- **CgroupParent** - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – Assign the specified name to the container. Must
|
||||
match `/?[a-zA-Z0-9_-]+`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -323,7 +323,6 @@ Status Codes:
|
|||
|
||||
Return low-level information on the container `id`
|
||||
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/json HTTP/1.1
|
||||
|
@ -454,7 +453,7 @@ Return low-level information on the container `id`
|
|||
]
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -514,11 +513,11 @@ supported on Windows.
|
|||
],
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -546,7 +545,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **follow** – 1/True/true or 0/False/false, return stream. Default `false`.
|
||||
- **stdout** – 1/True/true or 0/False/false, show `stdout` log. Default `false`.
|
||||
|
@ -557,7 +556,7 @@ Query Parameters:
|
|||
every log line. Default `false`.
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or `<number>`. Default all.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -600,7 +599,7 @@ Values for `Kind`:
|
|||
- `1`: Add
|
||||
- `2`: Delete
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -623,7 +622,7 @@ Export the contents of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -728,11 +727,11 @@ This endpoint returns a live stream of a container's resource usage statistics.
|
|||
|
||||
The precpu_stats is the cpu statistic of last read, which is used for calculating the cpu usage percent. It is not the exact copy of the “cpu_stats” field.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **stream** – 1/True/true or 0/False/false, pull stats once then disconnect. Default `true`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -754,7 +753,12 @@ Resize the TTY for container with `id`. You must restart the container for the
|
|||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Status Codes:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
|
@ -778,7 +782,7 @@ Start the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already started
|
||||
|
@ -799,11 +803,11 @@ Stop the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already stopped
|
||||
|
@ -824,11 +828,11 @@ Restart the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -848,12 +852,12 @@ Kill the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
**Query parameters**:
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like `SIGINT`.
|
||||
When not set, `SIGKILL` is assumed and the call waits for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -873,11 +877,11 @@ Rename the container `id` to a `new_name`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – new name for the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -898,7 +902,7 @@ Pause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -918,7 +922,7 @@ Unpause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -943,7 +947,7 @@ Attach to the container `id`
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default `false`.
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -955,7 +959,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -1023,7 +1027,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default `false`.
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -1035,7 +1039,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1059,7 +1063,7 @@ Block until container `id` stops, then returns the exit code
|
|||
|
||||
{"StatusCode": 0}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1079,14 +1083,14 @@ Remove the container `id` from the filesystem
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default `false`.
|
||||
- **force** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1118,7 +1122,7 @@ Copy files or folders of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1137,7 +1141,7 @@ following section.
|
|||
|
||||
Get a tar archive of a resource in the filesystem of container `id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - resource in the container's filesystem to archive. Required.
|
||||
|
||||
|
@ -1148,39 +1152,41 @@ Query Parameters:
|
|||
indicates that only the contents of the **path** directory should be
|
||||
copied. A symlink is always resolved to its target.
|
||||
|
||||
**Note**: It is not possible to copy certain system files such as resources
|
||||
under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
container.
|
||||
> **Note**: It is not possible to copy certain system files such as resources
|
||||
> under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
> container.
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{{ TAR STREAM }}
|
||||
{{ TAR STREAM }}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
the archived resource. The above example value would decode to the following
|
||||
JSON object (whitespace added for readability):
|
||||
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```json
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```
|
||||
|
||||
A `HEAD` request can also be made to this endpoint if only this information is
|
||||
desired.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - success, returns archive of copied resource
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1199,7 +1205,7 @@ Status Codes:
|
|||
Upload a tar archive to be extracted to a path in the filesystem of container
|
||||
`id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - path to a directory in the container
|
||||
to extract the archive's contents into. Required.
|
||||
|
@ -1212,16 +1218,16 @@ Query Parameters:
|
|||
|
||||
**Example request**:
|
||||
|
||||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
PUT /containers/8cce319429b2/archive?path=/vol1 HTTP/1.1
|
||||
Content-Type: application/x-tar
|
||||
|
||||
{{ TAR STREAM }}
|
||||
{{ TAR STREAM }}
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – the content was extracted successfully
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1323,7 +1329,7 @@ digest. You can reference this digest using the value:
|
|||
See the `docker run` and `docker build` commands for examples of digest and tag
|
||||
references on the command line.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, default false
|
||||
- **filters** – a JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
|
||||
|
@ -1367,7 +1373,7 @@ command*](../../reference/builder.md#add)).
|
|||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **dockerfile** - Path within the build context to the Dockerfile. This is
|
||||
ignored if `remote` is specified and points to an individual filename.
|
||||
|
@ -1375,7 +1381,7 @@ Query Parameters:
|
|||
the resulting image in case of success.
|
||||
- **remote** – A Git repository URI or HTTP/HTTPS URI build source. If the
|
||||
URI specifies a filename, the file's contents are placed into a file
|
||||
called `Dockerfile`.
|
||||
called `Dockerfile`.
|
||||
- **q** – Suppress verbose build output.
|
||||
- **nocache** – Do not use the cache when building the image.
|
||||
- **pull** - Attempt to pull the image even if an older image exists locally.
|
||||
|
@ -1414,7 +1420,7 @@ Query Parameters:
|
|||
be specified with both a "https://" prefix and a "/v1/" suffix even
|
||||
though Docker will prefer to use the v2 registry API.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1443,7 +1449,7 @@ When using this endpoint to pull an image from the registry, the
|
|||
`X-Registry-Auth` header can be used to include
|
||||
a base64-encoded AuthConfig object.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **fromImage** – Name of the image to pull.
|
||||
- **fromSrc** – Source to import. The value may be a URL from which the image
|
||||
|
@ -1455,7 +1461,7 @@ Query Parameters:
|
|||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1508,7 +1514,7 @@ Return low-level information on the image `name`
|
|||
"Size": 6824592
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1562,7 +1568,7 @@ Return the history of the image `name`
|
|||
}
|
||||
]
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1597,7 +1603,7 @@ then be used in the URL. This duplicates the command line's flow.
|
|||
POST /images/registry.acme.com:5000/test/push HTTP/1.1
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **tag** – The tag to associate with the image on the registry. This is optional.
|
||||
|
||||
|
@ -1606,7 +1612,7 @@ Request Headers:
|
|||
- **X-Registry-Auth** – Include a base64-encoded AuthConfig.
|
||||
object.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1626,13 +1632,13 @@ Tag the image `name` into a repository
|
|||
|
||||
HTTP/1.1 201 Created
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **tag** - The new tag name
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1661,12 +1667,12 @@ Remove the image `name` from the filesystem
|
|||
{"Deleted": "53b4f83ac9"}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1717,11 +1723,11 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
...
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1750,7 +1756,7 @@ Get the default username and email
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **204** – no error
|
||||
|
@ -1820,7 +1826,7 @@ Display system-wide information
|
|||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1851,7 +1857,7 @@ Show the docker version information
|
|||
"Experimental": false
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1873,7 +1879,7 @@ Ping the docker server
|
|||
|
||||
OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -1929,11 +1935,11 @@ Create a new image from a container's changes
|
|||
|
||||
{"Id": "596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
|
@ -1944,7 +1950,7 @@ Query Parameters:
|
|||
- **pause** – 1/True/true or 0/False/false, whether to pause the container before committing
|
||||
- **changes** – Dockerfile instructions to apply while committing
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1979,16 +1985,16 @@ and Docker images report:
|
|||
{"status": "stop", "id": "dfdf82bd3881","from": "ubuntu:latest", "time":1374067966}
|
||||
{"status": "destroy", "id": "dfdf82bd3881","from": "ubuntu:latest", "time":1374067970}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **since** – Timestamp used for polling
|
||||
- **until** – Timestamp used for polling
|
||||
- **filters** – A json encoded value of the filters (a map[string][]string) to process on the event list. Available filters:
|
||||
- `container=<string>`; -- container to filter
|
||||
- `event=<string>`; -- event to filter
|
||||
- `image=<string>`; -- image to filter
|
||||
- `container=<string>`; -- container to filter
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2018,7 +2024,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2047,7 +2053,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2069,7 +2075,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2126,7 +2132,7 @@ Sets up an exec instance in a running container `id`
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **AttachStdin** - Boolean value, attaches to `stdin` of the `exec` command.
|
||||
- **AttachStdout** - Boolean value, attaches to `stdout` of the `exec` command.
|
||||
|
@ -2135,7 +2141,7 @@ Json Parameters:
|
|||
- **Cmd** - Command to run specified as a string or an array of strings.
|
||||
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2165,12 +2171,12 @@ interactive session with the `exec` command.
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Detach** - Detach from the `exec` command.
|
||||
- **Tty** - Boolean value to allocate a pseudo-TTY.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2195,12 +2201,12 @@ This API is valid only if `tty` was specified as part of creating and starting t
|
|||
HTTP/1.1 201 Created
|
||||
Content-Type: text/plain
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2302,7 +2308,7 @@ Return low-level information about the `exec` command `id`.
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
|
|
@ -100,7 +100,7 @@ List containers
|
|||
}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
|
@ -117,7 +117,7 @@ Query Parameters:
|
|||
- `status=`(`created`|`restarting`|`running`|`paused`|`exited`)
|
||||
- `label=key` or `label="key=value"` of a container label
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -219,7 +219,7 @@ Create a container
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Hostname** - A string value containing the hostname to use for the
|
||||
container.
|
||||
|
@ -322,12 +322,12 @@ Json Parameters:
|
|||
- **CgroupParent** - Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist.
|
||||
- **VolumeDriver** - Driver that this container users to mount volumes.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – Assign the specified name to the container. Must
|
||||
match `/?[a-zA-Z0-9_-]+`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -342,7 +342,6 @@ Status Codes:
|
|||
|
||||
Return low-level information on the container `id`
|
||||
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/json HTTP/1.1
|
||||
|
@ -517,11 +516,11 @@ Return low-level information on the container `id`
|
|||
....
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **size** – 1/True/true or 0/False/false, return container size information. Default is `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -581,11 +580,11 @@ supported on Windows.
|
|||
],
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -613,7 +612,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **follow** – 1/True/true or 0/False/false, return stream. Default `false`.
|
||||
- **stdout** – 1/True/true or 0/False/false, show `stdout` log. Default `false`.
|
||||
|
@ -624,7 +623,7 @@ Query Parameters:
|
|||
every log line. Default `false`.
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or `<number>`. Default all.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -667,7 +666,7 @@ Values for `Kind`:
|
|||
- `1`: Add
|
||||
- `2`: Delete
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -690,7 +689,7 @@ Export the contents of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -807,11 +806,11 @@ This endpoint returns a live stream of a container's resource usage statistics.
|
|||
|
||||
The precpu_stats is the cpu statistic of last read, which is used for calculating the cpu usage percent. It is not the exact copy of the “cpu_stats” field.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **stream** – 1/True/true or 0/False/false, pull stats once then disconnect. Default `true`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -833,12 +832,12 @@ Resize the TTY for container with `id`. The unit is number of characters. You m
|
|||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
|
@ -862,7 +861,7 @@ Start the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already started
|
||||
|
@ -883,11 +882,11 @@ Stop the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already stopped
|
||||
|
@ -908,11 +907,11 @@ Restart the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -932,12 +931,12 @@ Kill the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
**Query parameters**:
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like `SIGINT`.
|
||||
When not set, `SIGKILL` is assumed and the call waits for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -957,11 +956,11 @@ Rename the container `id` to a `new_name`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – new name for the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -982,7 +981,7 @@ Pause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1002,7 +1001,7 @@ Unpause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1027,7 +1026,7 @@ Attach to the container `id`
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default `false`.
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -1039,7 +1038,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -1107,7 +1106,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default `false`.
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -1119,7 +1118,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1143,7 +1142,7 @@ Block until container `id` stops, then returns the exit code
|
|||
|
||||
{"StatusCode": 0}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1163,14 +1162,14 @@ Remove the container `id` from the filesystem
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default `false`.
|
||||
- **force** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1202,7 +1201,7 @@ Copy files or folders of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1221,7 +1220,7 @@ following section.
|
|||
|
||||
Get a tar archive of a resource in the filesystem of container `id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - resource in the container's filesystem to archive. Required.
|
||||
|
||||
|
@ -1232,39 +1231,41 @@ Query Parameters:
|
|||
indicates that only the contents of the **path** directory should be
|
||||
copied. A symlink is always resolved to its target.
|
||||
|
||||
**Note**: It is not possible to copy certain system files such as resources
|
||||
under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
container.
|
||||
> **Note**: It is not possible to copy certain system files such as resources
|
||||
> under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
> container.
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{{ TAR STREAM }}
|
||||
{{ TAR STREAM }}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
the archived resource. The above example value would decode to the following
|
||||
JSON object (whitespace added for readability):
|
||||
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```json
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```
|
||||
|
||||
A `HEAD` request can also be made to this endpoint if only this information is
|
||||
desired.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - success, returns archive of copied resource
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1283,7 +1284,7 @@ Status Codes:
|
|||
Upload a tar archive to be extracted to a path in the filesystem of container
|
||||
`id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - path to a directory in the container
|
||||
to extract the archive's contents into. Required.
|
||||
|
@ -1305,7 +1306,7 @@ Query Parameters:
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – the content was extracted successfully
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1407,7 +1408,7 @@ digest. You can reference this digest using the value:
|
|||
See the `docker run` and `docker build` commands for examples of digest and tag
|
||||
references on the command line.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, default false
|
||||
- **filters** – a JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
|
||||
|
@ -1451,7 +1452,7 @@ command*](../../reference/builder.md#add)).
|
|||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **dockerfile** - Path within the build context to the Dockerfile. This is
|
||||
ignored if `remote` is specified and points to an individual filename.
|
||||
|
@ -1460,7 +1461,7 @@ Query Parameters:
|
|||
You can provide one or more `t` parameters.
|
||||
- **remote** – A Git repository URI or HTTP/HTTPS URI build source. If the
|
||||
URI specifies a filename, the file's contents are placed into a file
|
||||
called `Dockerfile`.
|
||||
called `Dockerfile`.
|
||||
- **q** – Suppress verbose build output.
|
||||
- **nocache** – Do not use the cache when building the image.
|
||||
- **pull** - Attempt to pull the image even if an older image exists locally.
|
||||
|
@ -1504,7 +1505,7 @@ Query Parameters:
|
|||
be specified with both a "https://" prefix and a "/v1/" suffix even
|
||||
though Docker will prefer to use the v2 registry API.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1533,7 +1534,7 @@ When using this endpoint to pull an image from the registry, the
|
|||
`X-Registry-Auth` header can be used to include
|
||||
a base64-encoded AuthConfig object.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **fromImage** – Name of the image to pull. The name may include a tag or
|
||||
digest. This parameter may only be used when pulling an image.
|
||||
|
@ -1549,7 +1550,7 @@ Query Parameters:
|
|||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1661,7 +1662,7 @@ Return low-level information on the image `name`
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1715,7 +1716,7 @@ Return the history of the image `name`
|
|||
}
|
||||
]
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1750,7 +1751,7 @@ then be used in the URL. This duplicates the command line's flow.
|
|||
POST /images/registry.acme.com:5000/test/push HTTP/1.1
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **tag** – The tag to associate with the image on the registry. This is optional.
|
||||
|
||||
|
@ -1759,7 +1760,7 @@ Request Headers:
|
|||
- **X-Registry-Auth** – Include a base64-encoded AuthConfig.
|
||||
object.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1779,13 +1780,13 @@ Tag the image `name` into a repository
|
|||
|
||||
HTTP/1.1 201 Created
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **tag** - The new tag name
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1814,12 +1815,12 @@ Remove the image `name` from the filesystem
|
|||
{"Deleted": "53b4f83ac9"}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1870,11 +1871,11 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
...
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1903,7 +1904,7 @@ Get the default username and email
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **204** – no error
|
||||
|
@ -1975,7 +1976,7 @@ Display system-wide information
|
|||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2006,7 +2007,7 @@ Show the docker version information
|
|||
"Experimental": false
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2028,7 +2029,7 @@ Ping the docker server
|
|||
|
||||
OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2084,11 +2085,11 @@ Create a new image from a container's changes
|
|||
|
||||
{"Id": "596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
|
@ -2099,7 +2100,7 @@ Query Parameters:
|
|||
- **pause** – 1/True/true or 0/False/false, whether to pause the container before committing
|
||||
- **changes** – Dockerfile instructions to apply while committing
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2134,7 +2135,7 @@ and Docker images report:
|
|||
{"status":"attach","id":"5745704abe9caa5","from":"busybox","time":1442421716,"timeNano":1442421716894759198}
|
||||
{"status":"start","id":"5745704abe9caa5","from":"busybox","time":1442421716,"timeNano":1442421716983607193}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **since** – Timestamp used for polling
|
||||
- **until** – Timestamp used for polling
|
||||
|
@ -2144,7 +2145,7 @@ Query Parameters:
|
|||
- `image=<string>`; -- image to filter
|
||||
- `label=<string>`; -- image and container label to filter
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2174,7 +2175,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2203,7 +2204,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2225,7 +2226,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2282,7 +2283,7 @@ Sets up an exec instance in a running container `id`
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **AttachStdin** - Boolean value, attaches to `stdin` of the `exec` command.
|
||||
- **AttachStdout** - Boolean value, attaches to `stdout` of the `exec` command.
|
||||
|
@ -2291,7 +2292,7 @@ Json Parameters:
|
|||
- **Cmd** - Command to run specified as a string or an array of strings.
|
||||
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2323,12 +2324,12 @@ interactive session with the `exec` command.
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Detach** - Detach from the `exec` command.
|
||||
- **Tty** - Boolean value to allocate a pseudo-TTY.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2354,12 +2355,12 @@ This API is valid only if `tty` was specified as part of creating and starting t
|
|||
HTTP/1.1 201 Created
|
||||
Content-Type: text/plain
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2484,7 +2485,7 @@ Return low-level information about the `exec` command `id`.
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2515,11 +2516,11 @@ Status Codes:
|
|||
]
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **filters** - JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. There is one available filter: `dangling=true`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2550,12 +2551,12 @@ Create a volume
|
|||
"Mountpoint": "/var/lib/docker/volumes/tardis"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** - no error
|
||||
- **500** - server error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Name** - The new volume's name. If not specified, Docker generates a name.
|
||||
- **Driver** - Name of the volume driver to use. Defaults to `local` for the name.
|
||||
|
@ -2583,7 +2584,7 @@ Return low-level information on the volume `name`
|
|||
"Mountpoint": "/var/lib/docker/volumes/tardis"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - no such volume
|
||||
|
@ -2603,7 +2604,7 @@ Instruct the driver to remove the volume (`name`).
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes
|
||||
**Status codes**:
|
||||
|
||||
- **204** - no error
|
||||
- **404** - no such volume or volume driver
|
||||
|
@ -2684,13 +2685,11 @@ Content-Type: application/json
|
|||
]
|
||||
```
|
||||
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **filters** - JSON encoded value of the filters (a `map[string][]string`) to process on the networks list. Available filters: `name=[network-names]` , `id=[network-ids]`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2741,7 +2740,7 @@ Content-Type: application/json
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network not found
|
||||
|
@ -2760,7 +2759,7 @@ Content-Type: application/json
|
|||
|
||||
{
|
||||
"Name":"isolated_nw",
|
||||
"Driver":"bridge"
|
||||
"Driver":"bridge",
|
||||
"IPAM":{
|
||||
"Config":[{
|
||||
"Subnet":"172.20.0.0/16",
|
||||
|
@ -2782,13 +2781,13 @@ Content-Type: application/json
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** - no error
|
||||
- **404** - plugin not found
|
||||
- **500** - server error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Name** - The new network's name. this is a mandatory field
|
||||
- **Driver** - Name of the network driver plugin to use. Defaults to `bridge` driver
|
||||
|
@ -2817,13 +2816,13 @@ Content-Type: application/json
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network or container is not found
|
||||
- **500** - Internal Server Error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **container** - container-id/name to be connected to the network
|
||||
|
||||
|
@ -2848,13 +2847,13 @@ Content-Type: application/json
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network or container not found
|
||||
- **500** - Internal Server Error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Container** - container-id/name to be disconnected from a network
|
||||
|
||||
|
@ -2872,7 +2871,7 @@ Instruct the driver to remove the network (`id`).
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - no such network
|
||||
|
|
|
@ -187,7 +187,7 @@ List containers
|
|||
}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
|
@ -205,7 +205,7 @@ Query Parameters:
|
|||
- `label=key` or `label="key=value"` of a container label
|
||||
- `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -324,7 +324,7 @@ Create a container
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Hostname** - A string value containing the hostname to use for the
|
||||
container.
|
||||
|
@ -435,12 +435,12 @@ Json Parameters:
|
|||
- **VolumeDriver** - Driver that this container users to mount volumes.
|
||||
- **ShmSize** - Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – Assign the specified name to the container. Must
|
||||
match `/?[a-zA-Z0-9_-]+`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -455,7 +455,6 @@ Status Codes:
|
|||
|
||||
Return low-level information on the container `id`
|
||||
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/json HTTP/1.1
|
||||
|
@ -501,8 +500,8 @@ Return low-level information on the container `id`
|
|||
"Tty": false,
|
||||
"User": "",
|
||||
"Volumes": {
|
||||
"/volumes/data": {}
|
||||
},
|
||||
"/volumes/data": {}
|
||||
},
|
||||
"WorkingDir": "",
|
||||
"StopSignal": "SIGTERM"
|
||||
},
|
||||
|
@ -643,11 +642,11 @@ Return low-level information on the container `id`
|
|||
....
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **size** – 1/True/true or 0/False/false, return container size information. Default is `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -707,11 +706,11 @@ supported on Windows.
|
|||
],
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -739,7 +738,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **follow** – 1/True/true or 0/False/false, return stream. Default `false`.
|
||||
- **stdout** – 1/True/true or 0/False/false, show `stdout` log. Default `false`.
|
||||
|
@ -750,7 +749,7 @@ Query Parameters:
|
|||
every log line. Default `false`.
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or `<number>`. Default all.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -793,7 +792,7 @@ Values for `Kind`:
|
|||
- `1`: Add
|
||||
- `2`: Delete
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -816,7 +815,7 @@ Export the contents of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -933,11 +932,11 @@ This endpoint returns a live stream of a container's resource usage statistics.
|
|||
|
||||
The precpu_stats is the cpu statistic of last read, which is used for calculating the cpu usage percent. It is not the exact copy of the “cpu_stats” field.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **stream** – 1/True/true or 0/False/false, pull stats once then disconnect. Default `true`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -959,12 +958,12 @@ Resize the TTY for container with `id`. The unit is number of characters. You m
|
|||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
|
@ -988,13 +987,13 @@ Start the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **detachKeys** – Override the key sequence for detaching a
|
||||
container. Format is a single character `[a-Z]` or `ctrl-<value>`
|
||||
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already started
|
||||
|
@ -1015,11 +1014,11 @@ Stop the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already stopped
|
||||
|
@ -1040,11 +1039,11 @@ Restart the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1064,12 +1063,12 @@ Kill the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
**Query parameters**:
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like `SIGINT`.
|
||||
When not set, `SIGKILL` is assumed and the call waits for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1108,7 +1107,7 @@ Update resource configs of one or more containers.
|
|||
"Warnings": []
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1129,11 +1128,11 @@ Rename the container `id` to a `new_name`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – new name for the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1154,7 +1153,7 @@ Pause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1174,7 +1173,7 @@ Unpause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1199,7 +1198,7 @@ Attach to the container `id`
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **detachKeys** – Override the key sequence for detaching a
|
||||
container. Format is a single character `[a-Z]` or `ctrl-<value>`
|
||||
|
@ -1214,7 +1213,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -1283,7 +1282,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **detachKeys** – Override the key sequence for detaching a
|
||||
container. Format is a single character `[a-Z]` or `ctrl-<value>`
|
||||
|
@ -1298,7 +1297,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1322,7 +1321,7 @@ Block until container `id` stops, then returns the exit code
|
|||
|
||||
{"StatusCode": 0}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1342,14 +1341,14 @@ Remove the container `id` from the filesystem
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default `false`.
|
||||
- **force** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1381,7 +1380,7 @@ Copy files or folders of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1400,7 +1399,7 @@ following section.
|
|||
|
||||
Get a tar archive of a resource in the filesystem of container `id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - resource in the container's filesystem to archive. Required.
|
||||
|
||||
|
@ -1411,39 +1410,41 @@ Query Parameters:
|
|||
indicates that only the contents of the **path** directory should be
|
||||
copied. A symlink is always resolved to its target.
|
||||
|
||||
**Note**: It is not possible to copy certain system files such as resources
|
||||
under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
container.
|
||||
> **Note**: It is not possible to copy certain system files such as resources
|
||||
> under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
> container.
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{{ TAR STREAM }}
|
||||
{{ TAR STREAM }}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
the archived resource. The above example value would decode to the following
|
||||
JSON object (whitespace added for readability):
|
||||
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```json
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```
|
||||
|
||||
A `HEAD` request can also be made to this endpoint if only this information is
|
||||
desired.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - success, returns archive of copied resource
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1462,7 +1463,7 @@ Status Codes:
|
|||
Upload a tar archive to be extracted to a path in the filesystem of container
|
||||
`id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - path to a directory in the container
|
||||
to extract the archive's contents into. Required.
|
||||
|
@ -1484,7 +1485,7 @@ Query Parameters:
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – the content was extracted successfully
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1586,7 +1587,7 @@ digest. You can reference this digest using the value:
|
|||
See the `docker run` and `docker build` commands for examples of digest and tag
|
||||
references on the command line.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, default false
|
||||
- **filters** – a JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
|
||||
|
@ -1630,7 +1631,7 @@ command*](../../reference/builder.md#add)).
|
|||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **dockerfile** - Path within the build context to the Dockerfile. This is
|
||||
ignored if `remote` is specified and points to an individual filename.
|
||||
|
@ -1639,7 +1640,7 @@ Query Parameters:
|
|||
You can provide one or more `t` parameters.
|
||||
- **remote** – A Git repository URI or HTTP/HTTPS URI build source. If the
|
||||
URI specifies a filename, the file's contents are placed into a file
|
||||
called `Dockerfile`.
|
||||
called `Dockerfile`.
|
||||
- **q** – Suppress verbose build output.
|
||||
- **nocache** – Do not use the cache when building the image.
|
||||
- **pull** - Attempt to pull the image even if an older image exists locally.
|
||||
|
@ -1684,7 +1685,7 @@ Query Parameters:
|
|||
be specified with both a "https://" prefix and a "/v1/" suffix even
|
||||
though Docker will prefer to use the v2 registry API.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1713,7 +1714,7 @@ When using this endpoint to pull an image from the registry, the
|
|||
`X-Registry-Auth` header can be used to include
|
||||
a base64-encoded AuthConfig object.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **fromImage** – Name of the image to pull. The name may include a tag or
|
||||
digest. This parameter may only be used when pulling an image.
|
||||
|
@ -1747,7 +1748,7 @@ Query Parameters:
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1859,7 +1860,7 @@ Return low-level information on the image `name`
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1913,7 +1914,7 @@ Return the history of the image `name`
|
|||
}
|
||||
]
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1950,7 +1951,7 @@ The push is cancelled if the HTTP connection is closed.
|
|||
POST /images/registry.acme.com:5000/test/push HTTP/1.1
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **tag** – The tag to associate with the image on the registry. This is optional.
|
||||
|
||||
|
@ -1975,7 +1976,7 @@ Request Headers:
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1995,13 +1996,13 @@ Tag the image `name` into a repository
|
|||
|
||||
HTTP/1.1 201 Created
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **tag** - The new tag name
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -2030,12 +2031,12 @@ Remove the image `name` from the filesystem
|
|||
{"Deleted": "53b4f83ac9"}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -2086,11 +2087,11 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
...
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2119,7 +2120,7 @@ Get the default username and email
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **204** – no error
|
||||
|
@ -2207,7 +2208,7 @@ Display system-wide information
|
|||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2239,7 +2240,7 @@ Show the docker version information
|
|||
"Experimental": true
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2261,7 +2262,7 @@ Ping the docker server
|
|||
|
||||
OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2317,11 +2318,11 @@ Create a new image from a container's changes
|
|||
|
||||
{"Id": "596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
|
@ -2332,7 +2333,7 @@ Query Parameters:
|
|||
- **pause** – 1/True/true or 0/False/false, whether to pause the container before committing
|
||||
- **changes** – Dockerfile instructions to apply while committing
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2520,7 +2521,7 @@ Docker networks report the following events:
|
|||
"timeNano": 1461943105338056026
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **since** – Timestamp used for polling
|
||||
- **until** – Timestamp used for polling
|
||||
|
@ -2533,7 +2534,7 @@ Query Parameters:
|
|||
- `volume=<string>`; -- volume to filter
|
||||
- `network=<string>`; -- network to filter
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2563,12 +2564,12 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
### Get a tarball containing all images.
|
||||
### Get a tarball containing all images
|
||||
|
||||
`GET /images/get`
|
||||
|
||||
|
@ -2592,7 +2593,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2614,7 +2615,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2672,7 +2673,7 @@ Sets up an exec instance in a running container `id`
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **AttachStdin** - Boolean value, attaches to `stdin` of the `exec` command.
|
||||
- **AttachStdout** - Boolean value, attaches to `stdout` of the `exec` command.
|
||||
|
@ -2684,7 +2685,7 @@ Json Parameters:
|
|||
- **Cmd** - Command to run specified as a string or an array of strings.
|
||||
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2716,12 +2717,12 @@ interactive session with the `exec` command.
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Detach** - Detach from the `exec` command.
|
||||
- **Tty** - Boolean value to allocate a pseudo-TTY.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2747,12 +2748,12 @@ This API is valid only if `tty` was specified as part of creating and starting t
|
|||
HTTP/1.1 201 Created
|
||||
Content-Type: text/plain
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2794,7 +2795,7 @@ Return low-level information about the `exec` command `id`.
|
|||
"Running": false
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2826,11 +2827,11 @@ Status Codes:
|
|||
"Warnings": []
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **filters** - JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. There is one available filter: `dangling=true`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2861,12 +2862,12 @@ Create a volume
|
|||
"Mountpoint": "/var/lib/docker/volumes/tardis"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** - no error
|
||||
- **500** - server error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Name** - The new volume's name. If not specified, Docker generates a name.
|
||||
- **Driver** - Name of the volume driver to use. Defaults to `local` for the name.
|
||||
|
@ -2894,7 +2895,7 @@ Return low-level information on the volume `name`
|
|||
"Mountpoint": "/var/lib/docker/volumes/tardis"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - no such volume
|
||||
|
@ -2914,7 +2915,7 @@ Instruct the driver to remove the volume (`name`).
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes
|
||||
**Status codes**:
|
||||
|
||||
- **204** - no error
|
||||
- **404** - no such volume or volume driver
|
||||
|
@ -2995,14 +2996,14 @@ Content-Type: application/json
|
|||
]
|
||||
```
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **filters** - JSON encoded network list filter. The filter value is one of:
|
||||
- `name=<network-name>` Matches all or part of a network name.
|
||||
- `id=<network-id>` Matches all or part of a network id.
|
||||
- `name=<network-name>` Matches all or part of a network name.
|
||||
- `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -3058,7 +3059,7 @@ Content-Type: application/json
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network not found
|
||||
|
@ -3110,13 +3111,13 @@ Content-Type: application/json
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** - no error
|
||||
- **404** - plugin not found
|
||||
- **500** - server error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Name** - The new network's name. this is a mandatory field
|
||||
- **Driver** - Name of the network driver plugin to use. Defaults to `bridge` driver
|
||||
|
@ -3151,13 +3152,13 @@ Content-Type: application/json
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network or container is not found
|
||||
- **500** - Internal Server Error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **container** - container-id/name to be connected to the network
|
||||
|
||||
|
@ -3183,13 +3184,13 @@ Content-Type: application/json
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network or container not found
|
||||
- **500** - Internal Server Error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Container** - container-id/name to be disconnected from a network
|
||||
- **Force** - Force the container to disconnect from a network
|
||||
|
@ -3208,7 +3209,7 @@ Instruct the driver to remove the network (`id`).
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - no such network
|
||||
|
|
|
@ -202,7 +202,7 @@ List containers
|
|||
}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
|
@ -224,7 +224,7 @@ Query Parameters:
|
|||
- `since`=(`<container id>` or `<container name>`)
|
||||
- `volume`=(`<volume name>` or `<mount point destination>`)
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -344,7 +344,7 @@ Create a container
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Hostname** - A string value containing the hostname to use for the
|
||||
container.
|
||||
|
@ -458,12 +458,12 @@ Json Parameters:
|
|||
- **VolumeDriver** - Driver that this container users to mount volumes.
|
||||
- **ShmSize** - Size of `/dev/shm` in bytes. The size must be greater than 0. If omitted the system uses 64MB.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – Assign the specified name to the container. Must
|
||||
match `/?[a-zA-Z0-9_-]+`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -478,7 +478,6 @@ Status Codes:
|
|||
|
||||
Return low-level information on the container `id`
|
||||
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/4fa6e0f0c678/json HTTP/1.1
|
||||
|
@ -666,11 +665,11 @@ Return low-level information on the container `id`
|
|||
....
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **size** – 1/True/true or 0/False/false, return container size information. Default is `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -730,11 +729,11 @@ supported on Windows.
|
|||
],
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **ps_args** – `ps` arguments to use (e.g., `aux`), defaults to `-ef`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -762,7 +761,7 @@ Get `stdout` and `stderr` logs from the container ``id``
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **follow** – 1/True/true or 0/False/false, return stream. Default `false`.
|
||||
- **stdout** – 1/True/true or 0/False/false, show `stdout` log. Default `false`.
|
||||
|
@ -773,7 +772,7 @@ Query Parameters:
|
|||
every log line. Default `false`.
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or `<number>`. Default all.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -816,7 +815,7 @@ Values for `Kind`:
|
|||
- `1`: Add
|
||||
- `2`: Delete
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -839,7 +838,7 @@ Export the contents of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -959,11 +958,11 @@ This endpoint returns a live stream of a container's resource usage statistics.
|
|||
|
||||
The precpu_stats is the cpu statistic of last read, which is used for calculating the cpu usage percent. It is not the exact copy of the “cpu_stats” field.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **stream** – 1/True/true or 0/False/false, pull stats once then disconnect. Default `true`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -985,12 +984,12 @@ Resize the TTY for container with `id`. The unit is number of characters. You m
|
|||
Content-Length: 0
|
||||
Content-Type: text/plain; charset=utf-8
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – No such container
|
||||
|
@ -1014,13 +1013,13 @@ Start the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **detachKeys** – Override the key sequence for detaching a
|
||||
container. Format is a single character `[a-Z]` or `ctrl-<value>`
|
||||
where `<value>` is one of: `a-z`, `@`, `^`, `[`, `,` or `_`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already started
|
||||
|
@ -1041,11 +1040,11 @@ Stop the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **304** – container already stopped
|
||||
|
@ -1066,11 +1065,11 @@ Restart the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1090,12 +1089,12 @@ Kill the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
**Query parameters**:
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like `SIGINT`.
|
||||
When not set, `SIGKILL` is assumed and the call waits for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1138,7 +1137,7 @@ Update configuration of one or more containers.
|
|||
"Warnings": []
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1159,11 +1158,11 @@ Rename the container `id` to a `new_name`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **name** – new name for the container
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1184,7 +1183,7 @@ Pause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1204,7 +1203,7 @@ Unpause the container `id`
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1229,7 +1228,7 @@ Attach to the container `id`
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **detachKeys** – Override the key sequence for detaching a
|
||||
container. Format is a single character `[a-Z]` or `ctrl-<value>`
|
||||
|
@ -1244,7 +1243,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **101** – no error, hints proxy about hijacking
|
||||
- **200** – no error, no upgrade header found
|
||||
|
@ -1313,7 +1312,7 @@ Implements websocket protocol handshake according to [RFC 6455](http://tools.iet
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **detachKeys** – Override the key sequence for detaching a
|
||||
container. Format is a single character `[a-Z]` or `ctrl-<value>`
|
||||
|
@ -1328,7 +1327,7 @@ Query Parameters:
|
|||
- **stderr** – 1/True/true or 0/False/false, if `logs=true`, return
|
||||
`stderr` log, if `stream=true`, attach to `stderr`. Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1352,7 +1351,7 @@ Block until container `id` stops, then returns the exit code
|
|||
|
||||
{"StatusCode": 0}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1372,14 +1371,14 @@ Remove the container `id` from the filesystem
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default `false`.
|
||||
- **force** - 1/True/true or 0/False/false, Kill then remove the container.
|
||||
Default `false`.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **204** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -1411,7 +1410,7 @@ Copy files or folders of container `id`
|
|||
|
||||
{{ TAR STREAM }}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such container
|
||||
|
@ -1430,7 +1429,7 @@ following section.
|
|||
|
||||
Get a tar archive of a resource in the filesystem of container `id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - resource in the container's filesystem to archive. Required.
|
||||
|
||||
|
@ -1441,39 +1440,41 @@ Query Parameters:
|
|||
indicates that only the contents of the **path** directory should be
|
||||
copied. A symlink is always resolved to its target.
|
||||
|
||||
**Note**: It is not possible to copy certain system files such as resources
|
||||
under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
container.
|
||||
> **Note**: It is not possible to copy certain system files such as resources
|
||||
> under `/proc`, `/sys`, `/dev`, and mounts created by the user in the
|
||||
> container.
|
||||
|
||||
**Example request**:
|
||||
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
GET /containers/8cce319429b2/archive?path=/root HTTP/1.1
|
||||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/x-tar
|
||||
X-Docker-Container-Path-Stat: eyJuYW1lIjoicm9vdCIsInNpemUiOjQwOTYsIm1vZGUiOjIxNDc0ODQwOTYsIm10aW1lIjoiMjAxNC0wMi0yN1QyMDo1MToyM1oiLCJsaW5rVGFyZ2V0IjoiIn0=
|
||||
|
||||
{{ TAR STREAM }}
|
||||
{{ TAR STREAM }}
|
||||
|
||||
On success, a response header `X-Docker-Container-Path-Stat` will be set to a
|
||||
base64-encoded JSON object containing some filesystem header information about
|
||||
the archived resource. The above example value would decode to the following
|
||||
JSON object (whitespace added for readability):
|
||||
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```json
|
||||
{
|
||||
"name": "root",
|
||||
"size": 4096,
|
||||
"mode": 2147484096,
|
||||
"mtime": "2014-02-27T20:51:23Z",
|
||||
"linkTarget": ""
|
||||
}
|
||||
```
|
||||
|
||||
A `HEAD` request can also be made to this endpoint if only this information is
|
||||
desired.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - success, returns archive of copied resource
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1492,7 +1493,7 @@ Status Codes:
|
|||
Upload a tar archive to be extracted to a path in the filesystem of container
|
||||
`id`.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **path** - path to a directory in the container
|
||||
to extract the archive's contents into. Required.
|
||||
|
@ -1514,7 +1515,7 @@ Query Parameters:
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – the content was extracted successfully
|
||||
- **400** - client error, bad parameter, details in JSON response body, one of:
|
||||
|
@ -1616,7 +1617,7 @@ digest. You can reference this digest using the value:
|
|||
See the `docker run` and `docker build` commands for examples of digest and tag
|
||||
references on the command line.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, default false
|
||||
- **filters** – a JSON encoded value of the filters (a map[string][]string) to process on the images list. Available filters:
|
||||
|
@ -1660,7 +1661,7 @@ command*](../../reference/builder.md#add)).
|
|||
The build is canceled if the client drops the connection by quitting
|
||||
or being killed.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **dockerfile** - Path within the build context to the Dockerfile. This is
|
||||
ignored if `remote` is specified and points to an individual filename.
|
||||
|
@ -1715,7 +1716,7 @@ Query Parameters:
|
|||
be specified with both a "https://" prefix and a "/v1/" suffix even
|
||||
though Docker will prefer to use the v2 registry API.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1744,7 +1745,7 @@ When using this endpoint to pull an image from the registry, the
|
|||
`X-Registry-Auth` header can be used to include
|
||||
a base64-encoded AuthConfig object.
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **fromImage** – Name of the image to pull. The name may include a tag or
|
||||
digest. This parameter may only be used when pulling an image.
|
||||
|
@ -1778,7 +1779,7 @@ Query Parameters:
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -1897,7 +1898,7 @@ Return low-level information on the image `name`
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1951,7 +1952,7 @@ Return the history of the image `name`
|
|||
}
|
||||
]
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -1988,7 +1989,7 @@ The push is cancelled if the HTTP connection is closed.
|
|||
POST /images/registry.acme.com:5000/test/push HTTP/1.1
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **tag** – The tag to associate with the image on the registry. This is optional.
|
||||
|
||||
|
@ -2013,7 +2014,7 @@ Request Headers:
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -2033,13 +2034,13 @@ Tag the image `name` into a repository
|
|||
|
||||
HTTP/1.1 201 Created
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **tag** - The new tag name
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **400** – bad parameter
|
||||
|
@ -2068,12 +2069,12 @@ Remove the image `name` from the filesystem
|
|||
{"Deleted": "53b4f83ac9"}
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such image
|
||||
|
@ -2124,11 +2125,11 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
...
|
||||
]
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2162,7 +2163,7 @@ if available, for accessing the registry without password.
|
|||
"IdentityToken": "9cbaf023786cd7..."
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **204** – no error
|
||||
|
@ -2252,7 +2253,7 @@ Display system-wide information
|
|||
"SystemTime": "2015-03-10T11:11:23.730591467-07:00"
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2284,7 +2285,7 @@ Show the docker version information
|
|||
"Experimental": true
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2306,7 +2307,7 @@ Ping the docker server
|
|||
|
||||
OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2362,11 +2363,11 @@ Create a new image from a container's changes
|
|||
|
||||
{"Id": "596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
|
@ -2377,7 +2378,7 @@ Query Parameters:
|
|||
- **pause** – 1/True/true or 0/False/false, whether to pause the container before committing
|
||||
- **changes** – Dockerfile instructions to apply while committing
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2565,8 +2566,7 @@ Docker networks report the following events:
|
|||
"timeNano": 1461943105338056026
|
||||
}
|
||||
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **since** – Timestamp used for polling
|
||||
- **until** – Timestamp used for polling
|
||||
|
@ -2579,7 +2579,7 @@ Query Parameters:
|
|||
- `volume=<string>`; -- volume to filter
|
||||
- `network=<string>`; -- network to filter
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2609,12 +2609,12 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
||||
### Get a tarball containing all images.
|
||||
### Get a tarball containing all images
|
||||
|
||||
`GET /images/get`
|
||||
|
||||
|
@ -2638,7 +2638,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
Binary data stream
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2660,7 +2660,7 @@ See the [image tarball format](#image-tarball-format) for more details.
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **500** – server error
|
||||
|
@ -2718,7 +2718,7 @@ Sets up an exec instance in a running container `id`
|
|||
"Warnings":[]
|
||||
}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **AttachStdin** - Boolean value, attaches to `stdin` of the `exec` command.
|
||||
- **AttachStdout** - Boolean value, attaches to `stdout` of the `exec` command.
|
||||
|
@ -2730,7 +2730,7 @@ Json Parameters:
|
|||
- **Cmd** - Command to run specified as a string or an array of strings.
|
||||
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such container
|
||||
|
@ -2762,12 +2762,12 @@ interactive session with the `exec` command.
|
|||
|
||||
{{ STREAM }}
|
||||
|
||||
Json Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Detach** - Detach from the `exec` command.
|
||||
- **Tty** - Boolean value to allocate a pseudo-TTY.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2793,12 +2793,12 @@ This API is valid only if `tty` was specified as part of creating and starting t
|
|||
HTTP/1.1 201 Created
|
||||
Content-Type: text/plain
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **h** – height of `tty` session
|
||||
- **w** – width
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2840,7 +2840,7 @@ Return low-level information about the `exec` command `id`.
|
|||
"Running": false
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** – no error
|
||||
- **404** – no such exec instance
|
||||
|
@ -2872,11 +2872,11 @@ Status Codes:
|
|||
"Warnings": []
|
||||
}
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **filters** - JSON encoded value of the filters (a `map[string][]string`) to process on the volumes list. There is one available filter: `dangling=true`
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -2915,12 +2915,12 @@ Create a volume
|
|||
},
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** - no error
|
||||
- **500** - server error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Name** - The new volume's name. If not specified, Docker generates a name.
|
||||
- **Driver** - Name of the volume driver to use. Defaults to `local` for the name.
|
||||
|
@ -2953,7 +2953,7 @@ Return low-level information on the volume `name`
|
|||
}
|
||||
}
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - no such volume
|
||||
|
@ -2973,14 +2973,14 @@ Instruct the driver to remove the volume (`name`).
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes
|
||||
**Status codes**:
|
||||
|
||||
- **204** - no error
|
||||
- **404** - no such volume or volume driver
|
||||
- **409** - volume is in use and cannot be removed
|
||||
- **500** - server error
|
||||
|
||||
## 2.5 Networks
|
||||
## 3.5 Networks
|
||||
|
||||
### List networks
|
||||
|
||||
|
@ -3060,14 +3060,14 @@ Content-Type: application/json
|
|||
]
|
||||
```
|
||||
|
||||
Query Parameters:
|
||||
**Query parameters**:
|
||||
|
||||
- **filters** - JSON encoded network list filter. The filter value is one of:
|
||||
- `name=<network-name>` Matches all or part of a network name.
|
||||
- `id=<network-id>` Matches all or part of a network id.
|
||||
- `name=<network-name>` Matches all or part of a network name.
|
||||
- `type=["custom"|"builtin"]` Filters networks by type. The `custom` keyword returns all user-defined networks.
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **500** - server error
|
||||
|
@ -3129,7 +3129,7 @@ Content-Type: application/json
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network not found
|
||||
|
@ -3195,13 +3195,13 @@ Content-Type: application/json
|
|||
}
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **201** - no error
|
||||
- **404** - plugin not found
|
||||
- **500** - server error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Name** - The new network's name. this is a mandatory field
|
||||
- **CheckDuplicate** - Requests daemon to check for networks with same name
|
||||
|
@ -3239,13 +3239,13 @@ Content-Type: application/json
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network or container is not found
|
||||
- **500** - Internal Server Error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **container** - container-id/name to be connected to the network
|
||||
|
||||
|
@ -3271,13 +3271,13 @@ Content-Type: application/json
|
|||
|
||||
HTTP/1.1 200 OK
|
||||
|
||||
Status Codes:
|
||||
**Status codes**:
|
||||
|
||||
- **200** - no error
|
||||
- **404** - network or container not found
|
||||
- **500** - Internal Server Error
|
||||
|
||||
JSON Parameters:
|
||||
**JSON parameters**:
|
||||
|
||||
- **Container** - container-id/name to be disconnected from a network
|
||||
- **Force** - Force the container to disconnect from a network
|
||||
|
@ -3296,7 +3296,7 @@ Instruct the driver to remove the network (`id`).
|
|||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes
|
||||
**Status codes**:
|
||||
|
||||
- **204** - no error
|
||||
- **404** - no such network
|
||||
|
|
Loading…
Reference in a new issue