The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API.
Most of the client's commands map directly to API endpoints (e.g. docker ps
is GET /containers/json
). The notable exception is running containers, which consists of several API calls.
The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format:
{
"message": "page not found"
}
The API is usually changed in each release of Docker, so API calls are versioned to ensure that clients don't break.
For Docker Engine 17.09, the API version is 1.32. To lock to this version, you prefix the URL with /v1.32
. For example, calling /info
is the same as calling /v1.32/info
.
Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine.
In previous versions of Docker, it was possible to access the API without providing a version. This behaviour is now deprecated will be removed in a future version of Docker.
The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer Docker daemons.
This documentation is for version 1.33 of the API. Use this table to find documentation for previous versions of the API:
Docker version | API version | Changes |
---|---|---|
17.09.x | 1.31 | API changes |
17.07.x | 1.31 | API changes |
17.06.x | 1.30 | API changes |
17.05.x | 1.29 | API changes |
17.04.x | 1.28 | API changes |
17.03.1 | 1.27 | API changes |
1.13.1 & 17.03.0 | 1.26 | API changes |
1.13.0 | 1.25 | API changes |
1.12.x | 1.24 | API changes |
1.11.x | 1.23 | API changes |
1.10.x | 1.22 | API changes |
1.9.x | 1.21 | API changes |
1.8.x | 1.20 | API changes |
1.7.x | 1.19 | API changes |
1.6.x | 1.18 | API changes |
Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as POST /images/(name)/push
. These are sent as X-Registry-Auth
header as a Base64 encoded (JSON) string with the following structure:
{
"username": "string",
"password": "string",
"email": "string",
"serveraddress": "string"
}
The serveraddress
is a domain/IP without a protocol. Throughout this structure, double quotes are required.
If you have already got an identity token from the /auth
endpoint, you can just pass this instead of credentials:
{
"identitytoken": "9cbaf023786cd7..."
}
Configs are application configurations that can be used by services. Swarm mode must be enabled for these endpoints to work.
Name | Data Type | Description |
---|---|---|
body
|
object |
Name
|
string |
User-defined name of the config. |
Labels
|
object |
User-defined key/value metadata. |
Data
|
string |
Base64-url-safe-encoded (RFC 4648) config data. |
Name | Data Type | Description |
---|---|---|
Name
|
string |
User-defined name of the config. |
Labels
|
object |
User-defined key/value metadata. |
Data
|
string |
Base64-url-safe-encoded (RFC 4648) config data. |
{
"Data": "VEhJUyBJUyBOT1QgQSBSRUFMIENFUlRJRklDQVRFCg==",
"Labels": {
"foo": "bar"
},
"Name": "server.conf"
}
Name | Data Type | Description |
---|---|---|
body
|
object |
ID
|
string |
The ID of the created config. |
{
"ID": "ktnbjxoalbkvbvedmg1urrz8h"
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
The ID or name of the config |
Name | Data Type | Description |
---|---|---|
version
|
long |
The version number of the config object being updated. This is required to avoid conflicting writes. |
Name | Data Type | Description |
---|---|---|
ConfigSpec
|
object |
Name
|
string |
User-defined name of the config. |
Labels
|
object |
User-defined key/value metadata. |
Data
|
string |
Base64-url-safe-encoded (RFC 4648) config data. |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID of the config |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID of the config |
Name | Data Type | Description |
---|---|---|
Config
|
object |
Version
|
ObjectVersion | ||||||||||||||
Properties
|
|||||||||||||||
UpdatedAt
|
string | ||||||||||||||
Spec
|
ConfigSpec | ||||||||||||||
Properties
|
|||||||||||||||
ID
|
string | ||||||||||||||
CreatedAt
|
string |
application/json
[
{
"ID": "ktnbjxoalbkvbvedmg1urrz8h",
"Spec": {
"Name": "app-dev.crt"
},
"Version": {
"Index": 11
},
"CreatedAt": "2016-11-05T01:20:17.327670065Z",
"UpdatedAt": "2016-11-05T01:20:17.327670065Z"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
filters
|
string |
A JSON encoded value of the filters (a
|
Name | Data Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
body
|
array [Config] | ||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
{
"CreatedAt": "2016-11-05T01:20:17.327670065Z",
"ID": "ktnbjxoalbkvbvedmg1urrz8h",
"Spec": {
"Name": "server.conf"
},
"UpdatedAt": "2016-11-05T01:20:17.327670065Z",
"Version": {
"Index": 11
}
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Create and manage containers.
Name | Data Type | Description |
---|---|---|
name
|
string Pattern: /?[a-zA-Z0-9_-]+
|
Assign the specified name to the container. Must match |
Name | Data Type | Description |
---|---|---|
body
|
object |
NetworkingConfig
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HostConfig
|
HostConfig | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
Extends
Resources
A container's resources (cgroups config, ulimits, etc) Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WorkingDir
|
string |
The working directory for commands to run in. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Volumes
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
User
|
string |
The user that commands are run as inside the container. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Tty
|
boolean Default value: false
|
Attach standard streams to a TTY, including |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StopTimeout
|
integer Default value: 10
|
Timeout to stop a container in seconds. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StopSignal
|
string Default value: SIGTERM
|
Signal to stop a container as a string or unsigned integer. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StdinOnce
|
boolean Default value: false
|
Close |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Shell
|
array [string] |
Shell for when |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OpenStdin
|
boolean Default value: false
|
Open |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OnBuild
|
array [string] |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NetworkDisabled
|
boolean |
Disable networking for the container. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MacAddress
|
string |
MAC address of the container. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Labels
|
object |
User-defined key/value metadata. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Image
|
string |
The name of the image to use when creating the container |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hostname
|
string |
The hostname to use for the container, as a valid RFC 1123 hostname. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Healthcheck
|
HealthConfig | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExposedPorts
|
object |
An object mapping ports to an empty object in the form:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Env
|
array [string] |
A list of environment variables to set inside the container in the form |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Entrypoint
|
array [string] |
The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string ( |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Domainname
|
string |
The domain name to use for the container. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Cmd
|
array [string] |
Command to run specified as a string or an array of strings. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AttachStdout
|
boolean Default value: true
|
Whether to attach to |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AttachStdin
|
boolean Default value: false
|
Whether to attach to |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AttachStderr
|
boolean Default value: true
|
Whether to attach to |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ArgsEscaped
|
boolean |
Command is already escaped (Windows only) |
Configuration for a container that is portable between hosts
Name | Data Type | Description | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
WorkingDir
|
string |
The working directory for commands to run in. |
|||||||||||||||||||
Volumes
|
|||||||||||||||||||||
User
|
string |
The user that commands are run as inside the container. |
|||||||||||||||||||
Tty
|
boolean Default value: false
|
Attach standard streams to a TTY, including |
|||||||||||||||||||
StopTimeout
|
integer Default value: 10
|
Timeout to stop a container in seconds. |
|||||||||||||||||||
StopSignal
|
string Default value: SIGTERM
|
Signal to stop a container as a string or unsigned integer. |
|||||||||||||||||||
StdinOnce
|
boolean Default value: false
|
Close |
|||||||||||||||||||
Shell
|
array [string] |
Shell for when |
|||||||||||||||||||
OpenStdin
|
boolean Default value: false
|
Open |
|||||||||||||||||||
OnBuild
|
array [string] |
|
|||||||||||||||||||
NetworkDisabled
|
boolean |
Disable networking for the container. |
|||||||||||||||||||
MacAddress
|
string |
MAC address of the container. |
|||||||||||||||||||
Labels
|
object |
User-defined key/value metadata. |
|||||||||||||||||||
Image
|
string |
The name of the image to use when creating the container |
|||||||||||||||||||
Hostname
|
string |
The hostname to use for the container, as a valid RFC 1123 hostname. |
|||||||||||||||||||
Healthcheck
|
HealthConfig | ||||||||||||||||||||
Properties
|
|||||||||||||||||||||
ExposedPorts
|
object |
An object mapping ports to an empty object in the form:
|
|||||||||||||||||||
Env
|
array [string] |
A list of environment variables to set inside the container in the form |
|||||||||||||||||||
Entrypoint
|
array [string] |
The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string ( |
|||||||||||||||||||
Domainname
|
string |
The domain name to use for the container. |
|||||||||||||||||||
Cmd
|
array [string] |
Command to run specified as a string or an array of strings. |
|||||||||||||||||||
AttachStdout
|
boolean Default value: true
|
Whether to attach to |
|||||||||||||||||||
AttachStdin
|
boolean Default value: false
|
Whether to attach to |
|||||||||||||||||||
AttachStderr
|
boolean Default value: true
|
Whether to attach to |
|||||||||||||||||||
ArgsEscaped
|
boolean |
Command is already escaped (Windows only) |
{
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": [
"date"
],
"Domainname": "",
"Entrypoint": "",
"Env": [
"FOO=bar",
"BAZ=quux"
],
"ExposedPorts": {
"22\/tcp": []
},
"HostConfig": {
"AutoRemove": true,
"Binds": [
"\/tmp:\/tmp"
],
"BlkioDeviceReadBps": [
[]
],
"BlkioDeviceReadIOps": [
[]
],
"BlkioDeviceWriteBps": [
[]
],
"BlkioDeviceWriteIOps": [
[]
],
"BlkioWeight": 300,
"BlkioWeightDevice": [
[]
],
"CapAdd": [
"NET_ADMIN"
],
"CapDrop": [
"MKNOD"
],
"CgroupParent": "",
"CpuPercent": 80,
"CpuPeriod": 100000,
"CpuQuota": 50000,
"CpuRealtimePeriod": 1000000,
"CpuRealtimeRuntime": 10000,
"CpuShares": 512,
"CpusetCpus": "0,1",
"CpusetMems": "0,1",
"Devices": [],
"Dns": [
"8.8.8.8"
],
"DnsOptions": [
""
],
"DnsSearch": [
""
],
"GroupAdd": [
"newgroup"
],
"KernelMemory": 0,
"Links": [
"redis3:redis"
],
"LogConfig": {
"Config": [],
"Type": "json-file"
},
"MaximumIOBps": 0,
"MaximumIOps": 0,
"Memory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": 60,
"NanoCPUs": 500000,
"NetworkMode": "bridge",
"OomKillDisable": false,
"OomScoreAdj": 500,
"PidMode": "",
"PidsLimit": -1,
"PortBindings": {
"22\/tcp": [
{
"HostPort": "11022"
}
]
},
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"RestartPolicy": {
"MaximumRetryCount": 0,
"Name": ""
},
"SecurityOpt": [],
"ShmSize": 67108864,
"StorageOpt": [],
"Ulimits": [
[]
],
"VolumeDriver": "",
"VolumesFrom": [
"parent",
"other:ro"
]
},
"Hostname": "",
"Image": "ubuntu",
"Labels": {
"com.example.license": "GPL",
"com.example.vendor": "Acme",
"com.example.version": "1.0"
},
"MacAddress": "12:34:56:78:9a:bc",
"NetworkDisabled": false,
"NetworkingConfig": {
"EndpointsConfig": {
"isolated_nw": {
"Aliases": [
"server_x",
"server_y"
],
"IPAMConfig": {
"IPv4Address": "172.20.30.33",
"IPv6Address": "2001:db8:abcd::3033",
"LinkLocalIPs": [
"169.254.34.68",
"fe80::3468"
]
},
"Links": [
"container_1",
"container_2"
]
}
}
},
"OpenStdin": false,
"StdinOnce": false,
"StopSignal": "SIGTERM",
"StopTimeout": 10,
"Tty": false,
"User": "",
"Volumes": {
"\/volumes\/data": []
},
"WorkingDir": ""
}
Name | Data Type | Description |
---|---|---|
body
|
object |
Warnings
|
array [string] |
Warnings encountered when creating the container |
Id
|
string |
The ID of the created container |
application/json
[
{
"Id": "e90e34656806",
"Warnings": []
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Returns a list of containers. For details on the format, see the inspect endpoint.
Note that it uses a different, smaller representation of a container than inspecting a single container. For example, the list of linked containers is not propagated .
Name | Data Type | Description |
---|---|---|
filters
|
string |
Filters to process on the container list, encoded as JSON (a
|
size
|
boolean Default value: false
|
Return the size of container as fields |
limit
|
integer |
Return this number of most recently created containers, including non-running ones. |
all
|
boolean Default value: false
|
Return all containers. By default, only running containers are shown |
Name | Data Type | Description |
---|---|---|
ContainerSummary
|
array [object] |
application/json
[
{
"Id": "8dfafdbc3a40",
"Image": "ubuntu:latest",
"Names": [
"\/boring_feynman"
],
"Ports": [
{
"Type": "tcp",
"PublicPort": 3333,
"PrivatePort": 2222
}
],
"State": "Exited",
"Labels": {
"com.example.vendor": "Acme",
"com.example.license": "GPL",
"com.example.version": "1.0"
},
"Mounts": [
{
"RW": false,
"Mode": "ro,Z",
"Name": "fac362...80535",
"Driver": "local",
"Source": "\/data",
"Destination": "\/data",
"Propagation": ""
}
],
"SizeRw": 12288,
"Status": "Exit 0",
"Command": "echo 1",
"Created": 1367854155,
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"HostConfig": {
"NetworkMode": "default"
},
"SizeRootFs": 0,
"NetworkSettings": {
"Networks": {
"bridge": {
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812",
"EndpointID": "2cdc4edb1ded3631c81f57966563e5c8525b81121bb3706a9a9a3ae102711f3f",
"MacAddress": "02:42:ac:11:00:02",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0
}
}
}
},
{
"Id": "9cd87474be90",
"Image": "ubuntu:latest",
"Names": [
"\/coolName"
],
"Ports": [],
"State": "Exited",
"Labels": [],
"Mounts": [],
"SizeRw": 12288,
"Status": "Exit 0",
"Command": "echo 222222",
"Created": 1367854155,
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"HostConfig": {
"NetworkMode": "default"
},
"SizeRootFs": 0,
"NetworkSettings": {
"Networks": {
"bridge": {
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.8",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812",
"EndpointID": "88eaed7b37b38c2a3f0c4bc796494fdf51b270c2d22656412a2ca5d559a64d7a",
"MacAddress": "02:42:ac:11:00:08",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0
}
}
}
},
{
"Id": "3176a2479c92",
"Image": "ubuntu:latest",
"Names": [
"\/sleepy_dog"
],
"Ports": [],
"State": "Exited",
"Labels": [],
"Mounts": [],
"SizeRw": 12288,
"Status": "Exit 0",
"Command": "echo 3333333333333333",
"Created": 1367854154,
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"HostConfig": {
"NetworkMode": "default"
},
"SizeRootFs": 0,
"NetworkSettings": {
"Networks": {
"bridge": {
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.6",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812",
"EndpointID": "8b27c041c30326d59cd6e6f510d4f8d1d570a228466f956edf7815508f78e30d",
"MacAddress": "02:42:ac:11:00:06",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0
}
}
}
},
{
"Id": "4cb07b47f9fb",
"Image": "ubuntu:latest",
"Names": [
"\/running_cat"
],
"Ports": [],
"State": "Exited",
"Labels": [],
"Mounts": [],
"SizeRw": 12288,
"Status": "Exit 0",
"Command": "echo 444444444444444444444444444444444",
"Created": 1367854152,
"ImageID": "d74508fb6632491cea586a1fd7d748dfc5274cd6fdfedee309ecdcbc2bf5cb82",
"HostConfig": {
"NetworkMode": "default"
},
"SizeRootFs": 0,
"NetworkSettings": {
"Networks": {
"bridge": {
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.5",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812",
"EndpointID": "d91c7b2f0644403d7ef3095985ea0e2370325cd2332ff3a3225c4247328e66e9",
"MacAddress": "02:42:ac:11:00:05",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0
}
}
}
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
filters
|
string |
Filters to process on the prune list, encoded as JSON (a Available filters:
|
Name | Data Type | Description |
---|---|---|
body
|
object |
SpaceReclaimed
|
long |
Disk space reclaimed in bytes |
ContainersDeleted
|
array [string] |
Container IDs that were deleted |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Get a tar archive of a resource in the filesystem of container id.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
path
|
string |
Resource in the container’s filesystem to archive. |
Name | Data Type | Description |
---|---|---|
body
|
object |
message
|
string |
The error message. |
Represents an error.
Name | Data Type | Description |
---|---|---|
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
A response header X-Docker-Container-Path-Stat
is return containing a base64 - encoded JSON object with some filesystem header information about the path.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
path
|
string |
Resource in the container’s filesystem to archive. |
Name | Data Type | Description |
---|---|---|
X-Docker-Container-Path-Stat
|
string |
TODO |
Name | Data Type | Description |
---|---|---|
body
|
object |
message
|
string |
The error message. |
Represents an error.
Name | Data Type | Description |
---|---|---|
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Upload a tar archive to be extracted to a path in the filesystem of container id.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
noOverwriteDirNonDir
|
string |
If “1”, “true”, or “True” then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa. |
path
|
string |
Path to a directory in the container to extract the archive’s contents into. |
Name | Data Type | Description |
---|---|---|
inputStream
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
stderr
|
boolean Default value: false
|
Attach to |
stdout
|
boolean Default value: false
|
Attach to |
stdin
|
boolean Default value: false
|
Attach to |
stream
|
boolean Default value: false
|
Return stream |
logs
|
boolean Default value: false
|
Return logs |
detachKeys
|
string |
Override the key sequence for detaching a container.Format is a single character |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Attach to a container to read its output or send it input. You can attach to the same container multiple times and you can reattach to containers that have been detached.
Either the stream
or logs
parameter must be true
for this endpoint to do anything.
See the documentation for the docker attach
command for more details.
This endpoint hijacks the HTTP connection to transport stdin
, stdout
, and stderr
on the same socket.
This is the response from the daemon for an attach request:
HTTP/1.1 200 OK
Content-Type: application/vnd.docker.raw-stream
[STREAM]
After the headers and two new lines, the TCP connection can now be used for raw, bidirectional communication between the client and server.
To hint potential proxies about connection hijacking, the Docker client can also optionally send connection upgrade headers.
For example, the client sends this request to upgrade the connection:
POST /containers/16253994b7c4/attach?stream=1&stdout=1 HTTP/1.1
Upgrade: tcp
Connection: Upgrade
The Docker daemon will respond with a 101 UPGRADED
response, and will similarly follow with the raw stream:
HTTP/1.1 101 UPGRADED
Content-Type: application/vnd.docker.raw-stream
Connection: Upgrade
Upgrade: tcp
[STREAM]
When the TTY setting is disabled in POST /containers/create
, the stream over the hijacked connected is multiplexed to separate out stdout
and stderr
. The stream consists of a series of frames, each containing a header and a payload.
The header contains the information which the stream writes (stdout
or stderr
). It also contains the size of the associated frame encoded in the last four bytes (uint32
).
It is encoded on the first eight bytes like this:
header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
STREAM_TYPE
can be:
stdin
(is written on stdout
)stdout
stderr
SIZE1, SIZE2, SIZE3, SIZE4
are the four bytes of the uint32
size encoded as big endian.
Following the header is the payload, which is the specified number of bytes of STREAM_TYPE
.
The simplest way to implement this protocol is the following:
stdout
or stderr
depending on the first byte.When the TTY setting is enabled in POST /containers/create
, the stream is not multiplexed. The data exchanged over the hijacked connection is simply the raw data from the process PTY and client's stdin
.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
stderr
|
boolean Default value: false
|
Attach to |
stdout
|
boolean Default value: false
|
Attach to |
stdin
|
boolean Default value: false
|
Attach to |
stream
|
boolean Default value: false
|
Stream attached streams from the time the request was made onwards |
logs
|
boolean Default value: false
|
Replay previous logs from the container. This is useful for attaching to a container that has started and you want to output everything since the container started. If |
detachKeys
|
string |
Override the key sequence for detaching a container.Format is a single character |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Returns which files in a container's filesystem have been added, deleted,
or modified. The Kind
of modification can be one of:
0
: Modified1
: Added2
: DeletedName | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
body
|
array [object] |
application/json
[
{
"Kind": 0,
"Path": "\/dev"
},
{
"Kind": 1,
"Path": "\/dev\/kmsg"
},
{
"Kind": 1,
"Path": "\/test"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Export the contents of a container as a tarball.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Return low-level information about a container.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
size
|
boolean Default value: false
|
Return the size of container as fields |
Name | Data Type | Description |
---|---|---|
body
|
object |
State
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SizeRw
|
long |
The size of files that have been created or changed by this container. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SizeRootFs
|
long |
The total size of all the files in this container. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RestartCount
|
integer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ResolvConfPath
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ProcessLabel
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Path
|
string |
The path to the command being run |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Node
|
object |
TODO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
NetworkSettings
|
NetworkSettings | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mounts
|
array [MountPoint] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MountLabel
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LogPath
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Image
|
string |
The container's image |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Id
|
string |
The ID of the container |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HostsPath
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HostnamePath
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HostConfig
|
HostConfig | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
Extends
Resources
A container's resources (cgroups config, ulimits, etc) Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GraphDriver
|
GraphDriverData | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ExecIDs
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Driver
|
string | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created
|
string |
The time the container was created |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Config
|
ContainerConfig | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Args
|
array [string] |
The arguments to the command being run |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppArmorProfile
|
string |
application/json
[
{
"Id": "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39",
"Args": [
"-c",
"exit 9"
],
"Name": "\/boring_euclid",
"Path": "\/bin\/sh",
"Image": "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2",
"State": {
"Pid": 0,
"Dead": false,
"Error": "",
"Paused": false,
"Status": "running",
"Running": true,
"ExitCode": 9,
"OOMKilled": false,
"StartedAt": "2015-01-06T15:47:32.072697474Z",
"FinishedAt": "2015-01-06T15:47:32.080254511Z",
"Restarting": false
},
"Config": {
"Cmd": [
"\/bin\/sh",
"-c",
"exit 9"
],
"Env": [
"PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin"
],
"Tty": false,
"User": "",
"Image": "ubuntu",
"Labels": {
"com.example.vendor": "Acme",
"com.example.license": "GPL",
"com.example.version": "1.0"
},
"Volumes": {
"\/volumes\/data": []
},
"Hostname": "ba033ac44011",
"OpenStdin": false,
"StdinOnce": false,
"Domainname": "",
"MacAddress": "",
"StopSignal": "SIGTERM",
"WorkingDir": "",
"AttachStdin": false,
"StopTimeout": 10,
"AttachStderr": true,
"AttachStdout": true,
"NetworkDisabled": false
},
"Driver": "devicemapper",
"Mounts": [
{
"RW": false,
"Mode": "ro,Z",
"Name": "fac362...80535",
"Driver": "local",
"Source": "\/data",
"Destination": "\/data",
"Propagation": ""
}
],
"Created": "2015-01-06T15:47:31.485331387Z",
"LogPath": "\/var\/lib\/docker\/containers\/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b\/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log",
"HostsPath": "\/var\/lib\/docker\/containers\/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39\/hosts",
"HostConfig": {
"Memory": 0,
"Devices": [],
"IpcMode": "",
"LxcConf": [],
"PidMode": "",
"ShmSize": 67108864,
"Sysctls": {
"net.ipv4.ip_forward": "1"
},
"Ulimits": [
[]
],
"CpuPeriod": 100000,
"CpuShares": 0,
"LogConfig": {
"Type": "json-file"
},
"CpuPercent": 80,
"CpusetCpus": "",
"CpusetMems": "",
"MemorySwap": 0,
"Privileged": false,
"BlkioWeight": 0,
"MaximumIOps": 0,
"NetworkMode": "bridge",
"OomScoreAdj": 500,
"KernelMemory": 0,
"MaximumIOBps": 0,
"PortBindings": [],
"VolumeDriver": "",
"RestartPolicy": {
"Name": "on-failure",
"MaximumRetryCount": 2
},
"OomKillDisable": false,
"ReadonlyRootfs": false,
"ContainerIDFile": "",
"PublishAllPorts": false,
"BlkioWeightDevice": [
[]
],
"CpuRealtimePeriod": 1000000,
"MemoryReservation": 0,
"BlkioDeviceReadBps": [
[]
],
"CpuRealtimeRuntime": 10000,
"BlkioDeviceReadIOps": [
[]
],
"BlkioDeviceWriteBps": [
[]
],
"BlkioDeviceWriteIOps": [
[]
]
},
"MountLabel": "",
"HostnamePath": "\/var\/lib\/docker\/containers\/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39\/hostname",
"ProcessLabel": "",
"RestartCount": 1,
"ResolvConfPath": "\/var\/lib\/docker\/containers\/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39\/resolv.conf",
"AppArmorProfile": "",
"NetworkSettings": {
"Bridge": "",
"Gateway": "",
"Networks": {
"bridge": {
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"NetworkID": "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812",
"EndpointID": "7587b82f0dada3656fda26588aee72630c6fab1536d36e394b2bfbcf898c971d",
"MacAddress": "02:42:ac:12:00:02",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0
}
},
"IPAddress": "",
"SandboxID": "",
"EndpointID": "",
"MacAddress": "",
"SandboxKey": "",
"HairpinMode": false,
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0
}
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Send a POSIX signal to a container, defaulting to killing to the container.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
signal
|
string Default value: SIGKILL
|
Signal to send to the container as an integer or string (e.g. |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Get stdout
and stderr
logs from a container.
Note: This endpoint works only for containers with the json-file
or journald
logging driver.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
tail
|
string Default value: all
|
Only return this number of log lines from the end of the logs. Specify as an integer or |
timestamps
|
boolean Default value: false
|
Add timestamps to every log line |
since
|
integer Default value: 0
|
Only return logs since this time, as a UNIX timestamp |
stderr
|
boolean Default value: false
|
Return logs from |
stdout
|
boolean Default value: false
|
Return logs from |
follow
|
boolean Default value: false
|
Return the logs as a stream. This will return a |
Name | Data Type | Description |
---|---|---|
body
|
string |
Name | Data Type | Description |
---|---|---|
body
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Use the cgroups freezer to suspend all processes in a container.
Traditionally, when suspending a process the SIGSTOP
signal is used, which is observable by the process being suspended. With the cgroups freezer the process is unaware, and unable to capture, that it is being suspended, and subsequently resumed.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
name
|
string |
New name for the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Resize the TTY for a container. You must restart the container for the resize to take effect.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
w
|
integer |
Width of the tty session in characters |
h
|
integer |
Height of the tty session in characters |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
t
|
integer |
Number of seconds to wait before killing the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
detachKeys
|
string |
Override the key sequence for detaching a container. Format is a single character |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
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 percentage. It is not the same as the
cpu_stats
field.
If either precpu_stats.online_cpus
or cpu_stats.online_cpus
is
nil then for compatibility with older daemons the length of the
corresponding cpu_usage.percpu_usage
array should be used.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
stream
|
boolean Default value: true
|
Stream the output. If false, the stats will be output once and then it will disconnect. |
Name | Data Type | Description |
---|---|---|
body
|
object |
application/json
[
{
"read": "2015-01-08T22:57:31.547920715Z",
"networks": {
"eth0": {
"rx_bytes": 5338,
"tx_bytes": 648,
"rx_errors": 0,
"tx_errors": 0,
"rx_dropped": 0,
"rx_packets": 36,
"tx_dropped": 0,
"tx_packets": 8
},
"eth5": {
"rx_bytes": 4641,
"tx_bytes": 690,
"rx_errors": 0,
"tx_errors": 0,
"rx_dropped": 0,
"rx_packets": 26,
"tx_dropped": 0,
"tx_packets": 9
}
},
"cpu_stats": {
"cpu_usage": {
"total_usage": 100215355,
"percpu_usage": [
8646879,
24472255,
36438778,
30657443
],
"usage_in_usermode": 50000000,
"usage_in_kernelmode": 30000000
},
"online_cpus": 4,
"throttling_data": {
"periods": 0,
"throttled_time": 0,
"throttled_periods": 0
},
"system_cpu_usage": 739306590000000
},
"pids_stats": {
"current": 3
},
"blkio_stats": [],
"memory_stats": {
"limit": 67108864,
"stats": {
"rss": 6537216,
"cache": 0,
"pgpgin": 477,
"pgfault": 964,
"pgpgout": 414,
"rss_huge": 6291456,
"total_rss": 6537216,
"writeback": 0,
"pgmajfault": 0,
"active_anon": 6537216,
"active_file": 0,
"mapped_file": 0,
"total_cache": 0,
"unevictable": 0,
"total_pgpgin": 477,
"inactive_anon": 0,
"inactive_file": 0,
"total_pgfault": 964,
"total_pgpgout": 414,
"total_rss_huge": 6291456,
"total_writeback": 0,
"total_pgmajfault": 0,
"total_active_anon": 6537216,
"total_active_file": 0,
"total_mapped_file": 0,
"total_unevictable": 0,
"total_inactive_anon": 0,
"total_inactive_file": 0,
"hierarchical_memory_limit": 67108864
},
"usage": 6537216,
"failcnt": 0,
"max_usage": 6651904
},
"precpu_stats": {
"cpu_usage": {
"total_usage": 100093996,
"percpu_usage": [
8646879,
24350896,
36438778,
30657443
],
"usage_in_usermode": 50000000,
"usage_in_kernelmode": 30000000
},
"online_cpus": 4,
"throttling_data": {
"periods": 0,
"throttled_time": 0,
"throttled_periods": 0
},
"system_cpu_usage": 9492140000000
}
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
t
|
integer |
Number of seconds to wait before killing the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
On Unix systems, this is done by running the ps
command. This endpoint is not supported on Windows.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
ps_args
|
string Default value: -ef
|
The arguments to pass to |
Name | Data Type | Description |
---|---|---|
body
|
object |
Titles
|
array [string] |
The ps column titles |
Processes
|
array [array] |
Each process running in the container, where each is process is an array of values corresponding to the titles |
application/json
[
{
"Titles": [
"UID",
"PID",
"PPID",
"C",
"STIME",
"TTY",
"TIME",
"CMD"
],
"Processes": [
"- root - '13642' - '882' - '0' - '17:03' - pts\/0 - '00:00:00' - \/bin\/bash",
"- root - '13735' - '13642' - '0' - '17:06' - pts\/0 - '00:00:00' - sleep 10"
]
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Resume a container which has been paused.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Change various configuration options of a container without having to recreate it.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
update
|
object |
RestartPolicy
|
RestartPolicy | ||||||||||||||
Properties
|
|||||||||||||||
Ulimits
|
array [object] |
A list of resource limits to set in the container. For example: |
|||||||||||||
PidsLimit
|
long |
Tune a container's pids limit. Set -1 for unlimited. |
|||||||||||||
OomKillDisable
|
boolean |
Disable OOM Killer for the container. |
|||||||||||||
NanoCPUs
|
long |
CPU quota in units of 10-9 CPUs. |
|||||||||||||
MemorySwappiness
|
long Minimum: 0 Maximum: 100 |
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|||||||||||||
MemorySwap
|
long |
Total memory limit (memory + swap). Set as |
|||||||||||||
MemoryReservation
|
long |
Memory soft limit in bytes. |
|||||||||||||
Memory
|
integer Default value: 0
|
Memory limit in bytes. |
|||||||||||||
KernelMemory
|
long |
Kernel memory limit in bytes. |
|||||||||||||
IOMaximumIOps
|
long |
Maximum IOps for the container system drive (Windows only) |
|||||||||||||
IOMaximumBandwidth
|
long |
Maximum IO in bytes per second for the container system drive (Windows only) |
|||||||||||||
DiskQuota
|
long |
Disk limit (in bytes). |
|||||||||||||
Devices
|
array [DeviceMapping] |
A list of devices to add to the container. |
|||||||||||||
Properties
Examples
|
|||||||||||||||
DeviceCgroupRules
|
array [string] |
a list of cgroup rules to apply to the container |
|||||||||||||
CpusetMems
|
string |
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. |
|||||||||||||
CpusetCpus
|
string |
CPUs in which to allow execution (e.g., 0-3 |
|||||||||||||
CpuShares
|
integer |
An integer value representing this container's relative CPU weight versus other containers. |
|||||||||||||
CpuRealtimeRuntime
|
long |
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. |
|||||||||||||
CpuRealtimePeriod
|
long |
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. |
|||||||||||||
CpuQuota
|
long |
Microseconds of CPU time that the container can get in a CPU period. |
|||||||||||||
CpuPeriod
|
long |
The length of a CPU period in microseconds. |
|||||||||||||
CpuPercent
|
long |
The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is |
|||||||||||||
CpuCount
|
long |
The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is |
|||||||||||||
CgroupParent
|
string |
Path to |
|||||||||||||
BlkioWeightDevice
|
array [object] |
Block IO weight (relative device weight) in the form |
|||||||||||||
BlkioWeight
|
integer Minimum: 0 Maximum: 1000 |
Block IO weight (relative weight). |
|||||||||||||
BlkioDeviceWriteIOps
|
array [ThrottleDevice] |
Limit write rate (IO per second) to a device, in the form |
|||||||||||||
Properties
|
|||||||||||||||
BlkioDeviceWriteBps
|
array [ThrottleDevice] |
Limit write rate (bytes per second) to a device, in the form |
|||||||||||||
Properties
|
|||||||||||||||
BlkioDeviceReadIOps
|
array [ThrottleDevice] |
Limit read rate (IO per second) from a device, in the form |
|||||||||||||
Properties
|
|||||||||||||||
BlkioDeviceReadBps
|
array [ThrottleDevice] |
Limit read rate (bytes per second) from a device, in the form |
|||||||||||||
Properties
|
A container's resources (cgroups config, ulimits, etc)
Name | Data Type | Description | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Ulimits
|
array [object] |
A list of resource limits to set in the container. For example: |
|||||||||||||
PidsLimit
|
long |
Tune a container's pids limit. Set -1 for unlimited. |
|||||||||||||
OomKillDisable
|
boolean |
Disable OOM Killer for the container. |
|||||||||||||
NanoCPUs
|
long |
CPU quota in units of 10-9 CPUs. |
|||||||||||||
MemorySwappiness
|
long Minimum: 0 Maximum: 100 |
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. |
|||||||||||||
MemorySwap
|
long |
Total memory limit (memory + swap). Set as |
|||||||||||||
MemoryReservation
|
long |
Memory soft limit in bytes. |
|||||||||||||
Memory
|
integer Default value: 0
|
Memory limit in bytes. |
|||||||||||||
KernelMemory
|
long |
Kernel memory limit in bytes. |
|||||||||||||
IOMaximumIOps
|
long |
Maximum IOps for the container system drive (Windows only) |
|||||||||||||
IOMaximumBandwidth
|
long |
Maximum IO in bytes per second for the container system drive (Windows only) |
|||||||||||||
DiskQuota
|
long |
Disk limit (in bytes). |
|||||||||||||
Devices
|
array [DeviceMapping] |
A list of devices to add to the container. |
|||||||||||||
Properties
Examples
|
|||||||||||||||
DeviceCgroupRules
|
array [string] |
a list of cgroup rules to apply to the container |
|||||||||||||
CpusetMems
|
string |
Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems. |
|||||||||||||
CpusetCpus
|
string |
CPUs in which to allow execution (e.g., 0-3 |
|||||||||||||
CpuShares
|
integer |
An integer value representing this container's relative CPU weight versus other containers. |
|||||||||||||
CpuRealtimeRuntime
|
long |
The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks. |
|||||||||||||
CpuRealtimePeriod
|
long |
The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks. |
|||||||||||||
CpuQuota
|
long |
Microseconds of CPU time that the container can get in a CPU period. |
|||||||||||||
CpuPeriod
|
long |
The length of a CPU period in microseconds. |
|||||||||||||
CpuPercent
|
long |
The usable percentage of the available CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is |
|||||||||||||
CpuCount
|
long |
The number of usable CPUs (Windows only). On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is |
|||||||||||||
CgroupParent
|
string |
Path to |
|||||||||||||
BlkioWeightDevice
|
array [object] |
Block IO weight (relative device weight) in the form |
|||||||||||||
BlkioWeight
|
integer Minimum: 0 Maximum: 1000 |
Block IO weight (relative weight). |
|||||||||||||
BlkioDeviceWriteIOps
|
array [ThrottleDevice] |
Limit write rate (IO per second) to a device, in the form |
|||||||||||||
Properties
|
|||||||||||||||
BlkioDeviceWriteBps
|
array [ThrottleDevice] |
Limit write rate (bytes per second) to a device, in the form |
|||||||||||||
Properties
|
|||||||||||||||
BlkioDeviceReadIOps
|
array [ThrottleDevice] |
Limit read rate (IO per second) from a device, in the form |
|||||||||||||
Properties
|
|||||||||||||||
BlkioDeviceReadBps
|
array [ThrottleDevice] |
Limit read rate (bytes per second) from a device, in the form |
|||||||||||||
Properties
|
{
"BlkioWeight": 300,
"CpuPeriod": 100000,
"CpuQuota": 50000,
"CpuRealtimePeriod": 1000000,
"CpuRealtimeRuntime": 10000,
"CpuShares": 512,
"CpusetCpus": "0,1",
"CpusetMems": "0",
"KernelMemory": 52428800,
"Memory": 314572800,
"MemoryReservation": 209715200,
"MemorySwap": 514288000,
"RestartPolicy": {
"MaximumRetryCount": 4,
"Name": "on-failure"
}
}
Name | Data Type | Description |
---|---|---|
body
|
object |
Warnings
|
array [string] |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Block until a container stops, then returns the exit code.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
condition
|
string Default value: not-running
|
Wait until a container state reaches the given condition, either 'not-running' (default), 'next-exit', or 'removed'. |
Name | Data Type | Description |
---|---|---|
body
|
object |
StatusCode
|
integer |
Exit code of the container |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of the container |
Name | Data Type | Description |
---|---|---|
link
|
boolean Default value: false
|
Remove the specified link associated with the container. |
force
|
boolean Default value: false
|
If the container is running, kill it before removing it. |
v
|
boolean Default value: false
|
Remove the volumes associated with the container. |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "You cannot remove a running container: c2ada9df5af8. Stop the container before attempting removal or force remove"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Return image digest and platform information by contacting the registry.
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or id |
Name | Data Type | Description |
---|---|---|
body
|
object |
Platforms
|
array [object] |
An array containing all platforms supported by the image |
Descriptor
|
application/json
[
{
"Platforms": [
{
"OS": "linux",
"Variant": "",
"Features": [
""
],
"OSVersion": "",
"OSFeatures": [
""
],
"Architecture": "amd64"
}
],
"Descriptor": {
"Size": 3987495,
"URLs": [
""
],
"Digest": "sha256:c0537ff6a5218ef531ece93d4984efc99bbf3f7497c0a7726c88e2bb7584dc96",
"MediaType": "application\/vnd.docker.distribution.manifest.v2+json"
}
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such image: someimage (tag: latest)"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Run new commands inside running containers. See the command-line reference for more information.
To exec a command in a container, you first need to create an exec instance, then start it. These two API endpoints are wrapped up in a single command-line command, docker exec
.
Run a command inside a running container.
Name | Data Type | Description |
---|---|---|
id
|
string |
ID or name of container |
Name | Data Type | Description |
---|---|---|
execConfig
|
object |
User
|
string |
The user, and optionally, group to run the exec process inside the container. Format is one of: |
Tty
|
boolean |
Allocate a pseudo-TTY. |
Privileged
|
boolean Default value: false
|
Runs the exec process with extended privileges. |
Env
|
array [string] |
A list of environment variables in the form |
DetachKeys
|
string |
Override the key sequence for detaching a container. Format is a single character |
Cmd
|
array [string] |
Command to run, as a string or array of strings. |
AttachStdout
|
boolean |
Attach to |
AttachStdin
|
boolean |
Attach to |
AttachStderr
|
boolean |
Attach to |
{
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": [
"date"
],
"DetachKeys": "ctrl-p,ctrl-q",
"Env": [
"FOO=bar",
"BAZ=quux"
],
"Tty": false
}
Name | Data Type | Description |
---|---|---|
IdResponse
|
object |
Response to an API call that returns just an Id |
Id
|
string |
The id of the newly created object. |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Return low-level information about an exec instance.
Name | Data Type | Description |
---|---|---|
id
|
string |
Exec instance ID |
Name | Data Type | Description |
---|---|---|
body
|
object |
Running
|
boolean | ||||||||||||||||||||
ProcessConfig
|
ProcessConfig | ||||||||||||||||||||
Properties
|
|||||||||||||||||||||
Pid
|
integer |
The system process ID for the exec process. |
|||||||||||||||||||
OpenStdout
|
boolean | ||||||||||||||||||||
OpenStdin
|
boolean | ||||||||||||||||||||
OpenStderr
|
boolean | ||||||||||||||||||||
ID
|
string | ||||||||||||||||||||
ExitCode
|
integer | ||||||||||||||||||||
ContainerID
|
string |
application/json
[
{
"ID": "f33bbfb39f5b142420f4759b2348913bd4a8d1a6d7fd56499cb41a1bb91d7b3b",
"Pid": 42000,
"Running": false,
"ExitCode": 2,
"CanRemove": false,
"OpenStdin": true,
"DetachKeys": "",
"OpenStderr": true,
"OpenStdout": true,
"ContainerID": "b53ee82b53a40c7dca428523e34f741f3abc51d9f297a14ff874bf761b995126",
"ProcessConfig": {
"tty": true,
"user": "1000",
"arguments": [
"-c",
"exit 2"
],
"entrypoint": "sh",
"privileged": false
}
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Resize the TTY session used by an exec instance. This endpoint only works if tty
was specified as part of creating and starting the exec instance.
Name | Data Type | Description |
---|---|---|
id
|
string |
Exec instance ID |
Name | Data Type | Description |
---|---|---|
w
|
integer |
Width of the TTY session in characters |
h
|
integer |
Height of the TTY session in characters |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command. Otherwise, it sets up an interactive session with the command.
Name | Data Type | Description |
---|---|---|
id
|
string |
Exec instance ID |
Name | Data Type | Description |
---|---|---|
execStartConfig
|
object |
Tty
|
boolean |
Allocate a pseudo-TTY. |
Detach
|
boolean |
Detach from the command. |
{
"Detach": false,
"Tty": false
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
body
|
object |
SpaceReclaimed
|
long |
Disk space reclaimed in bytes |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Build an image from a tar archive with a Dockerfile
in it.
The Dockerfile
specifies how the image is built from the tar archive. It is typically in the archive's root, but can be at a different path or have a different name by specifying the dockerfile
parameter. See the Dockerfile
reference for more information.
The Docker daemon performs a preliminary validation of the Dockerfile
before starting the build, and returns an error if the syntax is incorrect. After that, each instruction is run one-by-one until the ID of the new image is output.
The build is canceled if the client drops the connection by quitting or being killed.
Name | Data Type | Description |
---|---|---|
networkmode
|
string |
Sets the networking mode for the run commands during build. Supported standard values are: |
labels
|
string |
Arbitrary key/value labels to set on the image, as a JSON map of string pairs. |
squash
|
boolean |
Squash the resulting images layers into a single layer. (Experimental release only.) |
shmsize
|
integer |
Size of |
buildargs
|
integer |
JSON map of string pairs for build-time variables. Users pass these values at build-time. Docker uses the buildargs as the environment context for commands run via the |
cpuquota
|
integer |
Microseconds of CPU time that the container can get in a CPU period. |
cpuperiod
|
integer |
The length of a CPU period in microseconds. |
cpusetcpus
|
string |
CPUs in which to allow execution (e.g., |
cpushares
|
integer |
CPU shares (relative weight). |
memswap
|
integer |
Total memory (memory + swap). Set as |
memory
|
integer |
Set memory limit for build. |
forcerm
|
boolean Default value: false
|
Always remove intermediate containers, even upon failure. |
rm
|
boolean Default value: true
|
Remove intermediate containers after a successful build. |
pull
|
string |
Attempt to pull the image even if an older image exists locally. |
cachefrom
|
string |
JSON array of images used for build cache resolution. |
nocache
|
boolean Default value: false
|
Do not use the cache when building the image. |
q
|
boolean Default value: false
|
Suppress verbose build output. |
remote
|
string |
A Git repository URI or HTTP/HTTPS context URI. If the URI points to a single text file, the file’s contents are placed into a file called |
extrahosts
|
string |
Extra hosts to add to /etc/hosts |
t
|
string |
A name and optional tag to apply to the image in the |
dockerfile
|
string Default value: Dockerfile
|
Path within the build context to the |
Name | Data Type | Description |
---|---|---|
X-Registry-Config
|
string |
This is a base64-encoded JSON object with auth configurations for multiple registries that a build may refer to. The key is a registry URL, and the value is an auth configuration object, as described in the authentication section. For example:
Only the registry domain name (and port if not the default 443) are required. However, for legacy reasons, the Docker Hub registry must be specified with both a |
Content-type
|
string Default value: application/x-tar Allowed values: - application/x-tar |
Name | Data Type | Description |
---|---|---|
inputStream
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
changes
|
string |
|
pause
|
boolean Default value: true
|
Whether to pause the container before committing |
author
|
string |
Author of the image (e.g., |
comment
|
string |
Commit message |
tag
|
string |
Tag name for the create image |
repo
|
string |
Repository name for the created image |
container
|
string |
The ID or name of the container to commit |
Name | Data Type | Description |
---|---|---|
ContainerConfig
|
object |
Configuration for a container that is portable between hosts |
WorkingDir
|
string |
The working directory for commands to run in. |
|||||||||||||||||||
Volumes
|
|||||||||||||||||||||
User
|
string |
The user that commands are run as inside the container. |
|||||||||||||||||||
Tty
|
boolean Default value: false
|
Attach standard streams to a TTY, including |
|||||||||||||||||||
StopTimeout
|
integer Default value: 10
|
Timeout to stop a container in seconds. |
|||||||||||||||||||
StopSignal
|
string Default value: SIGTERM
|
Signal to stop a container as a string or unsigned integer. |
|||||||||||||||||||
StdinOnce
|
boolean Default value: false
|
Close |
|||||||||||||||||||
Shell
|
array [string] |
Shell for when |
|||||||||||||||||||
OpenStdin
|
boolean Default value: false
|
Open |
|||||||||||||||||||
OnBuild
|
array [string] |
|
|||||||||||||||||||
NetworkDisabled
|
boolean |
Disable networking for the container. |
|||||||||||||||||||
MacAddress
|
string |
MAC address of the container. |
|||||||||||||||||||
Labels
|
object |
User-defined key/value metadata. |
|||||||||||||||||||
Image
|
string |
The name of the image to use when creating the container |
|||||||||||||||||||
Hostname
|
string |
The hostname to use for the container, as a valid RFC 1123 hostname. |
|||||||||||||||||||
Healthcheck
|
HealthConfig | ||||||||||||||||||||
Properties
|
|||||||||||||||||||||
ExposedPorts
|
object |
An object mapping ports to an empty object in the form:
|
|||||||||||||||||||
Env
|
array [string] |
A list of environment variables to set inside the container in the form |
|||||||||||||||||||
Entrypoint
|
array [string] |
The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string ( |
|||||||||||||||||||
Domainname
|
string |
The domain name to use for the container. |
|||||||||||||||||||
Cmd
|
array [string] |
Command to run specified as a string or an array of strings. |
|||||||||||||||||||
AttachStdout
|
boolean Default value: true
|
Whether to attach to |
|||||||||||||||||||
AttachStdin
|
boolean Default value: false
|
Whether to attach to |
|||||||||||||||||||
AttachStderr
|
boolean Default value: true
|
Whether to attach to |
|||||||||||||||||||
ArgsEscaped
|
boolean |
Command is already escaped (Windows only) |
Name | Data Type | Description |
---|---|---|
IdResponse
|
object |
Response to an API call that returns just an Id |
Id
|
string |
The id of the newly created object. |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such container: c2ada9df5af8"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Create an image by either pulling it from a registry or importing it.
Name | Data Type | Description |
---|---|---|
tag
|
string |
Tag or digest. If empty when pulling an image, this causes all tags for the given image to be pulled. |
repo
|
string |
Repository name given to an image when it is imported. The repo may include a tag. This parameter may only be used when importing an image. |
fromSrc
|
string |
Source to import. The value may be a URL from which the image can be retrieved or |
fromImage
|
string |
Name of the image to pull. The name may include a tag or digest. This parameter may only be used when pulling an image. The pull is cancelled if the HTTP connection is closed. |
Name | Data Type | Description |
---|---|---|
X-Registry-Auth
|
string |
A base64-encoded auth configuration. See the authentication section for details. |
Name | Data Type | Description |
---|---|---|
inputImage
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Get a tarball containing all images and metadata for several image repositories.
For each value of the names
parameter: if it is a specific name and tag (e.g. ubuntu:latest
), then only that image (and its parents) are returned; if it is an image ID, similarly only that image (and its parents) are returned and there would be no names referenced in the 'repositories' file for this image ID.
For details on the format, see the export image endpoint.
Name | Data Type | Description |
---|---|---|
names
|
array |
Image names to filter by |
Name | Data Type | Description |
---|---|---|
body
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Returns a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.
Name | Data Type | Description |
---|---|---|
digests
|
boolean Default value: false
|
Show digest information as a |
filters
|
string |
A JSON encoded value of the filters (a
|
all
|
boolean Default value: false
|
Show all images. Only images from a final layer (no children) are shown by default. |
Name | Data Type | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
body
|
array [ImageSummary] | |||||||||||||||||||||||||||||||||||
Properties
|
application/json
[
{
"Id": "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8",
"Size": 103579269,
"Labels": [],
"Created": 1474925151,
"ParentId": "",
"RepoTags": [
"ubuntu:12.04",
"ubuntu:precise"
],
"Containers": 2,
"SharedSize": 0,
"RepoDigests": [
"ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787"
],
"VirtualSize": 103579269
},
{
"Id": "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175",
"Size": 172064416,
"Labels": [],
"Created": 1403128455,
"ParentId": "",
"RepoTags": [
"ubuntu:12.10",
"ubuntu:quantal"
],
"Containers": 5,
"SharedSize": 0,
"RepoDigests": [
"ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7",
"ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3"
],
"VirtualSize": 172064416
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Load a set of images and tags into a repository.
For details on the format, see the export image endpoint.
Name | Data Type | Description |
---|---|---|
quiet
|
boolean Default value: false
|
Suppress progress details during load. |
Name | Data Type | Description |
---|---|---|
imagesTarball
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
filters
|
string |
Filters to process on the prune list, encoded as JSON (a
|
Name | Data Type | Description |
---|---|---|
body
|
object |
SpaceReclaimed
|
long |
Disk space reclaimed in bytes |
||||||||||
ImagesDeleted
|
array [ImageDeleteResponseItem] |
Images that were deleted |
||||||||||
Properties
|
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Search for an image on Docker Hub.
Name | Data Type | Description |
---|---|---|
filters
|
string |
A JSON encoded value of the filters (a
|
limit
|
integer |
Maximum number of results to return |
term
|
string |
Term to search |
Name | Data Type | Description |
---|---|---|
body
|
array [object] |
application/json
[
{
"name": "wma55\/u1210sshd",
"star_count": 0,
"description": "",
"is_official": false,
"is_automated": false
},
{
"name": "jdswinbank\/sshd",
"star_count": 0,
"description": "",
"is_official": false,
"is_automated": false
},
{
"name": "vgauthier\/sshd",
"star_count": 0,
"description": "",
"is_official": false,
"is_automated": false
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Get a tarball containing all images and metadata for a repository.
If name
is a specific name and tag (e.g. ubuntu:latest
), then only that image (and its parents) are returned. If name
is an image ID, similarly only that image (and its parents) are returned, but with the exclusion of the repositories
file in the tarball, as there were no image names referenced.
An image tarball contains one directory per image layer (named using its long ID), each containing these files:
VERSION
: currently 1.0
- the file format versionjson
: detailed layer information, similar to docker inspect layer_id
layer.tar
: A tarfile containing the filesystem changes in this layerThe layer.tar
file contains aufs
style .wh..wh.aufs
files and directories for storing attribute changes and deletions.
If the tarball defines a repository, the tarball should also include a repositories
file at the root that contains a list of repository and tag names mapped to layer IDs.
{
"hello-world": {
"latest": "565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"
}
}
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or ID |
Name | Data Type | Description |
---|---|---|
body
|
string |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Return parent layers of an image.
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or ID |
Name | Data Type | Description |
---|---|---|
body
|
array [object] |
application/json
[
{
"Id": "3db9c44f45209632d6050b35958829c3a2aa256d81b9a7be45b362ff85c54710",
"Size": 182964289,
"Tags": [
"ubuntu:lucid",
"ubuntu:10.04"
],
"Comment": "",
"Created": 1398108230,
"CreatedBy": "\/bin\/sh -c #(nop) ADD file:eb15dbd63394e063b805a3c32ca7bf0266ef64676d5a6fab4801f2e81e2a5148 in \/"
},
{
"Id": "6cfa4d1f33fb861d4d114f43b25abd0ac737509268065cdfd69d544a59c85ab8",
"Size": 0,
"Tags": [],
"Comment": "",
"Created": 1398108222,
"CreatedBy": "\/bin\/sh -c #(nop) MAINTAINER Tianon Gravi <admwiggin@gmail.com> - mkimage-debootstrap.sh -i iproute,iputils-ping,ubuntu-minimal -t lucid.tar.xz lucid http:\/\/archive.ubuntu.com\/ubuntu\/"
},
{
"Id": "511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158",
"Size": 0,
"Tags": [
"scratch12:latest",
"scratch:latest"
],
"Comment": "Imported from -",
"Created": 1371157430,
"CreatedBy": ""
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Return low-level information about an image.
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or id |
Name | Data Type | Description |
---|---|---|
Image
|
object |
VirtualSize
|
long | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Size
|
long | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RootFS
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RepoTags
|
array [string] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RepoDigests
|
array [string] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parent
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
OsVersion
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Os
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Metadata
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Id
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GraphDriver
|
GraphDriverData | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
DockerVersion
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Created
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ContainerConfig
|
ContainerConfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Container
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Config
|
ContainerConfig | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comment
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Author
|
string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Architecture
|
string |
application/json
[
{
"Id": "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c",
"Os": "linux",
"Size": 0,
"Author": "",
"Config": {
"Cmd": [
"\/bin\/bash"
],
"Env": [
"PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin"
],
"Tty": false,
"User": "",
"Image": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
"Labels": {
"com.example.vendor": "Acme",
"com.example.license": "GPL",
"com.example.version": "1.0"
},
"OnBuild": [],
"Hostname": "e611e15f9c9d",
"OpenStdin": false,
"StdinOnce": false,
"Domainname": "",
"MacAddress": "",
"WorkingDir": "",
"AttachStdin": false,
"AttachStderr": false,
"AttachStdout": false,
"PublishService": "",
"NetworkDisabled": false
},
"Parent": "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
]
},
"Comment": "",
"Created": "2015-09-10T08:30:53.26995814Z",
"RepoTags": [
"example:1.0",
"example:latest",
"example:stable"
],
"Container": "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a",
"GraphDriver": {
"Data": [],
"Name": "aufs"
},
"RepoDigests": [
"localhost:5000\/test\/busybox\/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"
],
"VirtualSize": 188359297,
"Architecture": "amd64",
"DockerVersion": "1.9.0-dev",
"ContainerConfig": {
"Cmd": [
"\/bin\/sh",
"-c",
"#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0"
],
"Env": [
"PATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin"
],
"Tty": false,
"User": "",
"Image": "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c",
"Labels": {
"com.example.vendor": "Acme",
"com.example.license": "GPL",
"com.example.version": "1.0"
},
"OnBuild": [],
"Hostname": "e611e15f9c9d",
"OpenStdin": false,
"StdinOnce": false,
"Domainname": "",
"MacAddress": "",
"WorkingDir": "",
"AttachStdin": false,
"AttachStderr": false,
"AttachStdout": false,
"PublishService": "",
"NetworkDisabled": false
}
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
application/json
[
{
"message": "No such image: someimage (tag: latest)"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Push an image to a registry.
If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, registry.example.com/myimage:latest
.
The push is cancelled if the HTTP connection is closed.
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or ID. |
Name | Data Type | Description |
---|---|---|
tag
|
string |
The tag to associate with the image on the registry. |
Name | Data Type | Description |
---|---|---|
X-Registry-Auth
|
string |
A base64-encoded auth configuration. See the authentication section for details. |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Tag an image so that it becomes part of a repository.
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or ID to tag. |
Name | Data Type | Description |
---|---|---|
tag
|
string |
The name of the new tag. |
repo
|
string |
The repository to tag in. For example, |
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Remove an image, along with any untagged parent images that were referenced by that image.
Images can't be removed if they have descendant images, are being used by a running container or are being used by a build.
Name | Data Type | Description |
---|---|---|
name
|
string |
Image name or ID |
Name | Data Type | Description |
---|---|---|
noprune
|
boolean Default value: false
|
Do not delete untagged parent images |
force
|
boolean Default value: false
|
Remove the image even if it is being used by stopped containers or has other tags |
Name | Data Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
body
|
array [ImageDeleteResponseItem] | |||||||||||
Properties
|
application/json
[
{
"Untagged": "3e2f21a89f"
},
{
"Deleted": "3e2f21a89f"
},
{
"Deleted": "53b4f83ac9"
}
]
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |
{
"message": "Something went wrong."
}
Name | Data Type | Description |
---|---|---|
ErrorResponse
|
object |
Represents an error. |
message
|
string |
The error message. |