mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Apply @tedyoung's changes to the entire set of API docs.
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
This commit is contained in:
parent
f304d4b190
commit
ab43ad7d5f
19 changed files with 288 additions and 704 deletions
|
@ -64,10 +64,8 @@ List containers
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
Only running containers are shown by default
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
|
@ -116,7 +114,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -126,8 +124,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Status Codes:
|
||||
|
@ -300,8 +296,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -322,12 +316,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -348,7 +340,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -375,8 +367,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -434,8 +424,6 @@ Remove the container `id` from the filesystem
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -507,8 +495,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -537,8 +523,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -697,8 +681,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -721,7 +703,7 @@ Remove the image `name` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -785,8 +767,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name to be applied to the resulting image in
|
||||
case of success
|
||||
|
||||
|
@ -840,6 +820,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -928,8 +909,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -947,25 +926,25 @@ Status Codes:
|
|||
|
||||
## 3.1 Inside `docker run`
|
||||
|
||||
Here are the steps of `docker run` :
|
||||
As an example, the `docker run` command line makes the following API calls:
|
||||
|
||||
- Create the container
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
- Start the container
|
||||
|
||||
- If you are not in detached mode:
|
||||
- If you are not in detached mode:
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
stderr from the container's start) and stream=1
|
||||
|
||||
- If in detached mode or only stdin is attached:
|
||||
- If in detached mode or only stdin is attached:
|
||||
- Display the container's
|
||||
|
||||
## 3.2 Hijacking
|
||||
|
||||
In this first version of the API, some of the endpoints, like /attach,
|
||||
/pull or /push uses hijacking to transport stdin, stdout and stderr on
|
||||
he same socket. This might change in the future.
|
||||
the same socket. This might change in the future.
|
||||
|
|
|
@ -64,10 +64,8 @@ List containers
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
Only running containers are shown by default
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
|
@ -116,7 +114,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -126,8 +124,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Status Codes:
|
||||
|
@ -300,8 +296,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -322,12 +316,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -348,7 +340,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -375,8 +367,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -434,8 +424,6 @@ Remove the container `id` from the filesystem
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -507,8 +495,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -540,8 +526,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -707,8 +691,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -732,7 +714,7 @@ Remove the image `name` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -851,6 +833,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -939,8 +922,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -962,8 +943,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
|
|
@ -80,15 +80,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -136,7 +132,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -146,8 +142,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
@ -407,8 +401,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -429,12 +421,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -455,12 +445,12 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like "SIGINT".
|
||||
When not set, SIGKILL is assumed and the call will waits for the container to exit.
|
||||
When not set, SIGKILL is assumed and the call will wait for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -487,8 +477,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -586,12 +574,10 @@ Status Codes:
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
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, Removes the container
|
||||
|
@ -699,19 +685,15 @@ Create an image, either by pull it from the registry or by importing
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -862,16 +844,11 @@ Push the image `name` on the registry
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **tag** – the tag to associate with the image on the registry, optional
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig
|
||||
object.
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig object.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -895,8 +872,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -930,8 +905,6 @@ Status Codes:
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -988,8 +961,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -1030,8 +1001,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1040,10 +1009,7 @@ Query Parameters:
|
|||
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **Content-type** – should be set to
|
||||
`"application/tar"`.
|
||||
- **Content-type** – should be set to `"application/tar"`.
|
||||
- **X-Registry-Config** – base64-encoded ConfigFile objec
|
||||
|
||||
Status Codes:
|
||||
|
@ -1072,6 +1038,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1189,8 +1156,6 @@ Json Parameters:
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1227,8 +1192,6 @@ Get events from docker, either in real time via streaming, or via
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1313,8 +1276,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1334,6 +1297,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -80,15 +80,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -137,7 +133,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -284,8 +280,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -439,12 +433,10 @@ Stop the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -465,12 +457,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -491,12 +481,12 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like "SIGINT".
|
||||
When not set, SIGKILL is assumed and the call will waits for the container to exit.
|
||||
When not set, SIGKILL is assumed and the call will wait for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -523,8 +513,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -622,12 +610,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
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, Removes the container
|
||||
|
@ -734,19 +720,15 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -868,16 +850,11 @@ Push the image `name` on the registry
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **tag** – the tag to associate with the image on the registry, optional
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig
|
||||
object.
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig object.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -901,8 +878,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -937,8 +912,6 @@ Remove the image `name` from the filesystem
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -995,8 +968,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -1037,8 +1008,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1047,10 +1016,7 @@ Query Parameters:
|
|||
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **Content-type** – should be set to
|
||||
`"application/tar"`.
|
||||
- **Content-type** – should be set to `"application/tar"`.
|
||||
- **X-Registry-Config** – base64-encoded ConfigFile objec
|
||||
|
||||
Status Codes:
|
||||
|
@ -1162,6 +1128,7 @@ Ping the docker server
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
OK
|
||||
|
||||
|
@ -1209,21 +1176,17 @@ Create a new image from a container's changes
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{"Id":"596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1260,8 +1223,6 @@ via polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
- **until** – timestamp used for polling
|
||||
|
||||
|
@ -1343,22 +1304,22 @@ the root that contains a list of repository and tag names mapped to layer IDs.
|
|||
|
||||
## 3.1 Inside `docker run`
|
||||
|
||||
Here are the steps of `docker run`:
|
||||
As an example, the `docker run` command line makes the following API calls:
|
||||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- Then retry to create the container
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
||||
- If you are not in detached mode:
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
stderr from the container's start) and stream=1
|
||||
|
||||
- If in detached mode or only stdin is attached:
|
||||
- Display the container's id
|
||||
- Display the container's id
|
||||
|
||||
## 3.2 Hijacking
|
||||
|
||||
|
@ -1368,6 +1329,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -140,7 +140,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -150,8 +150,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
@ -291,8 +289,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -447,12 +443,10 @@ Stop the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -473,12 +467,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -499,12 +491,12 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like "SIGINT".
|
||||
When not set, SIGKILL is assumed and the call will waits for the container to exit.
|
||||
When not set, SIGKILL is assumed and the call will wait for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -524,7 +516,7 @@ Pause the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -544,7 +536,7 @@ Unpause the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -571,14 +563,10 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream. Default false
|
||||
- **stdin** – 1/True/true or 0/False/false, if stream=true, attach to stdin.
|
||||
Default false
|
||||
- **stdin** – 1/True/true or 0/False/false, if stream=true, attach
|
||||
to stdin. Default false
|
||||
- **stdout** – 1/True/true or 0/False/false, if logs=true, return
|
||||
stdout log, if stream=true, attach to stdout. Default false
|
||||
- **stderr** – 1/True/true or 0/False/false, if logs=true, return
|
||||
|
@ -633,7 +621,7 @@ Status Codes:
|
|||
2. chose stdout or stderr depending on the first byte
|
||||
3. Extract the frame size from the last 4 byets
|
||||
4. Read the extracted size and output it on the correct output
|
||||
5. Goto 1)
|
||||
5. Goto 1
|
||||
|
||||
### Wait a container
|
||||
|
||||
|
@ -670,12 +658,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
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, Removes the container
|
||||
|
@ -792,19 +778,15 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -928,16 +910,11 @@ Push the image `name` on the registry
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **tag** – the tag to associate with the image on the registry, optional
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig
|
||||
object.
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig object.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -961,8 +938,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -997,8 +972,6 @@ Remove the image `name` from the filesystem
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -1055,8 +1028,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -1097,8 +1068,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1108,10 +1077,7 @@ Query Parameters:
|
|||
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **Content-type** – should be set to
|
||||
`"application/tar"`.
|
||||
- **Content-type** – should be set to `"application/tar"`.
|
||||
- **X-Registry-Config** – base64-encoded ConfigFile objec
|
||||
|
||||
Status Codes:
|
||||
|
@ -1224,6 +1190,7 @@ Ping the docker server
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
OK
|
||||
|
||||
|
@ -1274,21 +1241,17 @@ Create a new image from a container's changes
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{"Id":"596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1325,8 +1288,6 @@ via polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
- **until** – timestamp used for polling
|
||||
|
||||
|
@ -1407,22 +1368,22 @@ the root that contains a list of repository and tag names mapped to layer IDs.
|
|||
|
||||
## 3.1 Inside `docker run`
|
||||
|
||||
Here are the steps of `docker run`:
|
||||
As an example, the `docker run` command line makes the following API calls:
|
||||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- Then retry to create the container
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
||||
- If you are not in detached mode:
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
stderr from the container's start) and stream=1
|
||||
|
||||
- If in detached mode or only stdin is attached:
|
||||
- Display the container's id
|
||||
- Display the container's id
|
||||
|
||||
## 3.2 Hijacking
|
||||
|
||||
|
@ -1432,6 +1393,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -79,15 +79,11 @@ List containers
|
|||
Query Parameters:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -138,7 +134,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -148,8 +144,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
@ -289,8 +283,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -318,14 +310,13 @@ Get stdout and stderr logs from the container ``id``
|
|||
|
||||
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
|
||||
- **stderr** – 1/True/true or 0/False/false, show stderr log. Default false
|
||||
- **timestamps** – 1/True/true or 0/False/false, print timestamps for
|
||||
every log line. Default false
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or `<number>`. Default all
|
||||
- **timestamps** – 1/True/true or 0/False/false, print timestamps for every
|
||||
log line. Default false
|
||||
- **tail** – Output specified number of lines at the end of logs: `all` or
|
||||
`<number>`. Default all
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -444,12 +435,10 @@ Stop the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -471,12 +460,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -497,12 +484,12 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like "SIGINT".
|
||||
When not set, SIGKILL is assumed and the call will waits for the container to exit.
|
||||
When not set, SIGKILL is assumed and the call will wait for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -522,7 +509,7 @@ Pause the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -542,7 +529,7 @@ Unpause the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -569,14 +556,10 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Default false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream. Default false
|
||||
- **stdin** – 1/True/true or 0/False/false, if stream=true, attach to stdin.
|
||||
Default false
|
||||
- **stdin** – 1/True/true or 0/False/false, if stream=true, attach
|
||||
to stdin. Default false
|
||||
- **stdout** – 1/True/true or 0/False/false, if logs=true, return
|
||||
stdout log, if stream=true, attach to stdout. Default false
|
||||
- **stderr** – 1/True/true or 0/False/false, if logs=true, return
|
||||
|
@ -631,7 +614,7 @@ Status Codes:
|
|||
2. chose stdout or stderr depending on the first byte
|
||||
3. Extract the frame size from the last 4 byets
|
||||
4. Read the extracted size and output it on the correct output
|
||||
5. Goto 1)
|
||||
5. Goto 1
|
||||
|
||||
### Wait a container
|
||||
|
||||
|
@ -668,12 +651,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
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, Removes the container
|
||||
|
@ -757,18 +738,14 @@ Status Codes:
|
|||
|
||||
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.
|
||||
|
||||
|
||||
- **filters** – a json encoded value of the filters (a map[string][string]) to process on the images list.
|
||||
|
||||
### Create an image
|
||||
|
||||
`POST /images/create`
|
||||
|
||||
Create an image, either by pull it from the registry or by importing i
|
||||
Create an image, either by pulling it from the registry or by importing it
|
||||
|
||||
**Example request**:
|
||||
|
||||
|
@ -790,19 +767,15 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -926,16 +899,11 @@ Push the image `name` on the registry
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **tag** – the tag to associate with the image on the registry, optional
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig
|
||||
object.
|
||||
- **X-Registry-Auth** – include a base64-encoded AuthConfig object.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -959,8 +927,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -995,8 +961,6 @@ Remove the image `name` from the filesystem
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
- **noprune** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -1053,8 +1017,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -1095,8 +1057,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1106,10 +1066,7 @@ Query Parameters:
|
|||
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **Content-type** – should be set to
|
||||
`"application/tar"`.
|
||||
- **Content-type** – should be set to `"application/tar"`.
|
||||
- **X-Registry-Config** – base64-encoded ConfigFile objec
|
||||
|
||||
Status Codes:
|
||||
|
@ -1222,6 +1179,7 @@ Ping the docker server
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
OK
|
||||
|
||||
|
@ -1272,21 +1230,17 @@ Create a new image from a container's changes
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{"Id":"596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1323,8 +1277,6 @@ via polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
- **until** – timestamp used for polling
|
||||
|
||||
|
@ -1406,22 +1358,22 @@ the root that contains a list of repository and tag names mapped to layer IDs.
|
|||
|
||||
## 3.1 Inside `docker run`
|
||||
|
||||
Here are the steps of `docker run`:
|
||||
As an example, the `docker run` command line makes the following API calls:
|
||||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- Then retry to create the container
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
||||
- If you are not in detached mode:
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
- Attach to the container, using logs=1 (to have stdout and
|
||||
stderr from the container's start) and stream=1
|
||||
|
||||
- If in detached mode or only stdin is attached:
|
||||
- Display the container's id
|
||||
- Display the container's id
|
||||
|
||||
## 3.2 Hijacking
|
||||
|
||||
|
@ -1431,6 +1383,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -1362,11 +1362,11 @@ the root that contains a list of repository and tag names mapped to layer IDs.
|
|||
|
||||
## 3.1 Inside `docker run`
|
||||
|
||||
Here are what the command line `docker run` does via the API:
|
||||
As an example, the `docker run` command line makes the following API calls:
|
||||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
|
|
|
@ -1402,7 +1402,7 @@ the root that contains a list of repository and tag names mapped to layer IDs.
|
|||
|
||||
## 3.1 Inside `docker run`
|
||||
|
||||
Here are what the command line `docker run` does via the API:
|
||||
As an example, the `docker run` command line makes the following API calls:
|
||||
|
||||
- Create the container
|
||||
|
||||
|
|
|
@ -76,10 +76,8 @@ List containers
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
Only running containers are shown by default
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
|
@ -128,7 +126,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -138,8 +136,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Status Codes:
|
||||
|
@ -312,8 +308,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -334,12 +328,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -360,7 +352,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -387,8 +379,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -442,12 +432,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -523,8 +511,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -556,8 +542,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -726,8 +710,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -818,13 +800,12 @@ Build an image from Dockerfile
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
{{ STREAM }}
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name to be applied to the resulting image in
|
||||
case of success
|
||||
- **remote** – resource to fetch, as URI
|
||||
|
@ -952,8 +933,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -975,8 +954,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -996,7 +975,7 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
> docker -d -H="[tcp://192.168.1.9:2375](tcp://192.168.1.9:2375)"
|
||||
> –api-enable-cors
|
||||
|
|
|
@ -79,15 +79,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -130,7 +126,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -140,8 +136,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Status Codes:
|
||||
|
@ -362,8 +356,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -384,12 +376,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -410,7 +400,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -437,8 +427,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -492,12 +480,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -573,8 +559,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -606,8 +590,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -775,8 +757,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -880,8 +860,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -911,6 +889,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1002,8 +981,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1040,8 +1017,6 @@ polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1057,8 +1032,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1078,6 +1053,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
> docker -d -H="192.168.1.9:2375" –api-enable-cors
|
||||
|
|
|
@ -79,15 +79,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -133,7 +129,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -143,8 +139,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Status Codes:
|
||||
|
@ -262,8 +256,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -380,8 +372,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -402,12 +392,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -428,7 +416,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -455,8 +443,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -510,12 +496,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -619,8 +603,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -652,8 +634,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -820,8 +800,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -925,8 +903,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -958,6 +934,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1048,8 +1025,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1086,8 +1061,6 @@ polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1103,8 +1076,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1124,6 +1097,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -79,15 +79,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -132,7 +128,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -142,8 +138,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Status Codes:
|
||||
|
@ -259,8 +253,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -377,8 +369,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -399,12 +389,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -425,7 +413,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -452,8 +440,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -507,12 +493,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -616,8 +600,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -653,8 +635,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -825,8 +805,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -898,8 +876,6 @@ Search for an image on [Docker Hub](https://hub.docker.com)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -937,8 +913,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -971,6 +945,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1060,8 +1035,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1098,8 +1071,6 @@ polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1114,7 +1085,7 @@ Status Codes:
|
|||
Here are the steps of `docker run`:
|
||||
|
||||
- Create the container
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
Try to pull it - Then retry to create the container
|
||||
- Start the container
|
||||
- If you are not in detached mode:
|
||||
|
@ -1131,6 +1102,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -80,15 +80,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -132,7 +128,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -142,8 +138,6 @@ Create a container
|
|||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** – the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
@ -309,8 +303,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -432,8 +424,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -454,12 +444,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -480,7 +468,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
@ -515,8 +503,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -614,12 +600,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -723,8 +707,6 @@ List images `format` could be json or viz (json default)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
|
||||
|
@ -760,8 +742,6 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
|
@ -929,8 +909,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -1034,8 +1012,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1067,6 +1043,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1156,8 +1133,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1194,8 +1169,6 @@ polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1211,8 +1184,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1232,6 +1205,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -78,15 +78,11 @@ List containers
|
|||
Query Parameters:
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -135,7 +131,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -381,8 +377,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -403,12 +397,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -429,7 +421,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -456,8 +448,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -555,12 +545,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -665,19 +653,15 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -847,8 +831,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -934,8 +916,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -974,8 +954,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1014,6 +992,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1097,8 +1076,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1137,8 +1114,6 @@ polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1197,8 +1172,8 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1218,6 +1193,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -80,15 +80,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -138,7 +134,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -301,8 +297,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -431,8 +425,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -453,12 +445,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -479,7 +469,7 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -506,8 +496,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -605,12 +593,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -715,19 +701,15 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -897,8 +879,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -984,8 +964,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -1026,8 +1004,6 @@ Build an image from Dockerfile via stdin
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1067,6 +1043,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1150,8 +1127,6 @@ Create a new image from a container's changes
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1190,8 +1165,6 @@ or via polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1275,8 +1248,8 @@ Here are the steps of `docker run`:
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- Try to pull i
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1296,6 +1269,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
|
@ -80,15 +80,11 @@ Query Parameters:
|
|||
|
||||
|
||||
- **all** – 1/True/true or 0/False/false, Show all containers.
|
||||
Only running containers are shown by defaul
|
||||
- **limit** – Show `limit` last created
|
||||
containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include
|
||||
non-running ones.
|
||||
- **before** – Show only containers created before Id, include
|
||||
non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers
|
||||
sizes
|
||||
Only running containers are shown by default (i.e., this defaults to false)
|
||||
- **limit** – Show `limit` last created containers, include non-running ones.
|
||||
- **since** – Show only containers created since Id, include non-running ones.
|
||||
- **before** – Show only containers created before Id, include non-running ones.
|
||||
- **size** – 1/True/true or 0/False/false, Show the containers sizes
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -138,7 +134,7 @@ Create a container
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
@ -301,8 +297,6 @@ List processes running inside the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **ps_args** – ps arguments to use (e.g., aux)
|
||||
|
||||
Status Codes:
|
||||
|
@ -431,8 +425,6 @@ Stop the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -453,12 +445,10 @@ Restart the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – number of seconds to wait before killing the container
|
||||
|
||||
Status Codes:
|
||||
|
@ -479,12 +469,12 @@ Kill the container `id`
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters
|
||||
|
||||
- **signal** - Signal to send to the container: integer or string like "SIGINT".
|
||||
When not set, SIGKILL is assumed and the call will waits for the container to exit.
|
||||
When not set, SIGKILL is assumed and the call will wait for the container to exit.
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -511,8 +501,6 @@ Attach to the container `id`
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **logs** – 1/True/true or 0/False/false, return logs. Defaul
|
||||
false
|
||||
- **stream** – 1/True/true or 0/False/false, return stream.
|
||||
|
@ -609,12 +597,10 @@ Remove the container `id` from the filesystem
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 204 OK
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **v** – 1/True/true or 0/False/false, Remove the volumes
|
||||
associated to the container. Default false
|
||||
|
||||
|
@ -719,19 +705,15 @@ Create an image, either by pull it from the registry or by importing i
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **fromImage** – name of the image to pull
|
||||
- **fromSrc** – source to import, - means stdin
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
- **registry** – the registry to pull from
|
||||
|
||||
Request Headers:
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig objec
|
||||
- **X-Registry-Auth** – base64-encoded AuthConfig object
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -901,8 +883,6 @@ Tag the image `name` into a repository
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **repo** – The repository to tag in
|
||||
- **force** – 1/True/true or 0/False/false, default false
|
||||
|
||||
|
@ -987,8 +967,6 @@ Search for an image on [Docker Hub](https://hub.docker.com).
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **term** – term to search
|
||||
|
||||
Status Codes:
|
||||
|
@ -1029,8 +1007,6 @@ Build an image from Dockerfile using a POST body.
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **t** – repository name (and optionally a tag) to be applied to
|
||||
the resulting image in case of success
|
||||
- **q** – suppress verbose build output
|
||||
|
@ -1039,10 +1015,7 @@ Query Parameters:
|
|||
|
||||
Request Headers:
|
||||
|
||||
|
||||
|
||||
- **Content-type** – should be set to
|
||||
`"application/tar"`.
|
||||
- **Content-type** – should be set to `"application/tar"`.
|
||||
- **X-Registry-Config** – base64-encoded ConfigFile objec
|
||||
|
||||
Status Codes:
|
||||
|
@ -1071,6 +1044,7 @@ Get the default username and email
|
|||
**Example response**:
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/plain
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
@ -1174,21 +1148,17 @@ Create a new image from a container's changes
|
|||
|
||||
**Example response**:
|
||||
|
||||
HTTP/1.1 201 OK
|
||||
HTTP/1.1 201 Created
|
||||
Content-Type: application/vnd.docker.raw-stream
|
||||
|
||||
{"Id":"596069db4bf5"}
|
||||
|
||||
Json Parameters:
|
||||
|
||||
|
||||
|
||||
- **config** - the container's configuration
|
||||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **container** – source container
|
||||
- **repo** – repository
|
||||
- **tag** – tag
|
||||
|
@ -1225,8 +1195,6 @@ polling (using since)
|
|||
|
||||
Query Parameters:
|
||||
|
||||
|
||||
|
||||
- **since** – timestamp used for polling
|
||||
|
||||
Status Codes:
|
||||
|
@ -1310,9 +1278,9 @@ Here are the steps of `docker run` :
|
|||
|
||||
- Create the container
|
||||
|
||||
- If the status code is 404, it means the image doesn't exists:
|
||||
- If the status code is 404, it means the image doesn't exist:
|
||||
|
||||
- Try to pull i
|
||||
- Try to pull it
|
||||
- Then retry to create the container
|
||||
|
||||
- Start the container
|
||||
|
@ -1334,6 +1302,6 @@ stdout and stderr on the same socket. This might change in the future.
|
|||
## 3.3 CORS Requests
|
||||
|
||||
To enable cross origin requests to the remote api add the flag
|
||||
"–api-enable-cors" when running docker in daemon mode.
|
||||
"--api-enable-cors" when running docker in daemon mode.
|
||||
|
||||
$ docker -d -H="192.168.1.9:2375" --api-enable-cors
|
||||
|
|
Loading…
Reference in a new issue