Inspect a container Run in API Explorer
Return low-level information about a container.
GET
/containers/{id}/json
curl \
--request GET 'http://api.example.com/v1.44/containers/{id}/json'
Response examples (200)
{
"Id": "ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39",
"Args": [
"-c",
"exit 9"
],
"Name": "/boring_euclid",
"Path": "/bin/sh",
"Image": "04c5d3b7b0656168630d3ba35d8889bd0e9caafcaeb3004d2bfbc47e7c5d35d2",
"State": {
"Pid": 0,
"Dead": false,
"Error": "",
"Health": {
"Log": [
{
"End": "2019-12-22T10:59:05.8078452Z",
"Start": "2019-12-22T10:59:05.6385933Z",
"Output": "",
"ExitCode": 0
}
],
"Status": "healthy",
"FailingStreak": 0
},
"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,
"Healthcheck": {
"Test": [
"CMD-SHELL",
"exit 0"
]
},
"StopTimeout": 10,
"AttachStderr": true,
"AttachStdout": true,
"NetworkDisabled": false
},
"Driver": "overlay2",
"Mounts": [
{
"RW": false,
"Mode": "ro,Z",
"Name": "fac362...80535",
"Driver": "local",
"Source": "/data",
"Destination": "/data",
"Propagation": ""
}
],
"Created": "2015-01-06T15:47:31.485331387Z",
"ExecIDs": [
"b35395de42bc8abd327f9dd65d913b9ba28c74d2f0734eeeae84fa1c616a0fca",
"3fc1232e5cd20c8de182ed81178503dc6437f4e7ef12b52cc5e8de020652f1c4"
],
"LogPath": "/var/lib/docker/containers/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b/1eb5fabf5a03807136561b3c00adcd2992b535d624d5e18b6cdc6a6844d9767b-json.log",
"HostsPath": "/var/lib/docker/containers/ba033ac4401106a3b513bc9d639eee123ad78ca3616b921167cd74b20e25ed39/hosts",
"HostConfig": {
"Memory": 0,
"Devices": [],
"IpcMode": "",
"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,
"MaximumIOBps": 0,
"PortBindings": {},
"VolumeDriver": "",
"RestartPolicy": {
"Name": "on-failure",
"MaximumRetryCount": 2
},
"DeviceRequests": [
{
"Count": -1,
"Driver": "nvidia",
"Options": {
"property1": "string",
"property2": "string"
},
"DeviceIDs\"": [
"0",
"1",
"GPU-fef8089b-4820-abfc-e83e-94318197576e"
],
"Capabilities": [
[
"gpu",
"nvidia",
"compute"
]
]
}
],
"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
}
}
Response examples (200)
{
"Id": "string",
"Created": "string",
"Path": "string",
"Args": [
"string"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1234,
"ExitCode": 0,
"Error": "string",
"StartedAt": "2020-01-06T09:06:59.461876391Z",
"FinishedAt": "2020-01-06T09:07:59.461876391Z",
"Health": {
"Status": "healthy",
"FailingStreak": 0,
"Log": [
{
"Start": "2020-01-04T10:44:24.496525531Z",
"End": "2020-01-04T10:45:21.364524523Z",
"ExitCode": 0,
"Output": "string"
}
]
}
},
"Image": "string",
"ResolvConfPath": "string",
"HostnamePath": "string",
"HostsPath": "string",
"LogPath": "string",
"Name": "string",
"RestartCount": 42,
"Driver": "string",
"Platform": "string",
"MountLabel": "string",
"ProcessLabel": "string",
"AppArmorProfile": "string",
"ExecIDs": [
"string"
],
"HostConfig": {
"CpuShares": 42,
"Memory": 0,
"CgroupParent": "string",
"BlkioWeight": 42,
"BlkioWeightDevice": [
{
"Path": "string",
"Weight": 42
}
],
"BlkioDeviceReadBps": [
{
"Path": "string",
"Rate": 42
}
],
"BlkioDeviceWriteBps": [
{
"Path": "string",
"Rate": 42
}
],
"BlkioDeviceReadIOps": [
{
"Path": "string",
"Rate": 42
}
],
"BlkioDeviceWriteIOps": [
{
"Path": "string",
"Rate": 42
}
],
"CpuPeriod": 42,
"CpuQuota": 42,
"CpuRealtimePeriod": 42,
"CpuRealtimeRuntime": 42,
"CpusetCpus": "0-3",
"CpusetMems": "string",
"Devices": [
{
"PathOnHost": "/dev/deviceName",
"PathInContainer": "/dev/deviceName",
"CgroupPermissions": "mrw"
}
],
"DeviceCgroupRules": [
"c 13:* rwm"
],
"DeviceRequests": [
{
"Driver": "nvidia",
"Count": -1,
"DeviceIDs": [
"0",
"1",
"GPU-fef8089b-4820-abfc-e83e-94318197576e"
],
"Capabilities": [
[
"gpu",
"nvidia",
"compute"
]
],
"Options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
}
],
"KernelMemoryTCP": 42,
"MemoryReservation": 42,
"MemorySwap": 42,
"MemorySwappiness": 42,
"NanoCpus": 42,
"OomKillDisable": true,
"Init": true,
"PidsLimit": 42,
"Ulimits": [
{
"Name": "string",
"Soft": 42,
"Hard": 42
}
],
"CpuCount": 42,
"CpuPercent": 42,
"IOMaximumIOps": 42,
"IOMaximumBandwidth": 42,
"Binds": [
"string"
],
"ContainerIDFile": "string",
"LogConfig": {
"Type": "json-file",
"Config": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
},
"NetworkMode": "string",
"PortBindings": {
"53/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
},
{
"HostIp": "0.0.0.0",
"HostPort": "8080"
}
],
"80/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
}
],
"443/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "4443"
}
],
"2377/tcp": null
},
"RestartPolicy": {
"Name": "",
"MaximumRetryCount": 42
},
"AutoRemove": true,
"VolumeDriver": "string",
"VolumesFrom": [
"string"
],
"Mounts": [
{
"Target": "string",
"Source": "string",
"Type": "bind",
"ReadOnly": true,
"Consistency": "string",
"BindOptions": {
"Propagation": "private",
"NonRecursive": false,
"CreateMountpoint": false,
"ReadOnlyNonRecursive": false,
"ReadOnlyForceRecursive": false
},
"VolumeOptions": {
"NoCopy": false,
"Labels": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"DriverConfig": {
"Name": "string",
"Options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
}
}
},
"TmpfsOptions": {
"SizeBytes": 42,
"Mode": 42
}
}
],
"ConsoleSize": [
42
],
"Annotations": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"CapAdd": [
"string"
],
"CapDrop": [
"string"
],
"CgroupnsMode": "private",
"Dns": [
"string"
],
"DnsOptions": [
"string"
],
"DnsSearch": [
"string"
],
"ExtraHosts": [
"string"
],
"GroupAdd": [
"string"
],
"IpcMode": "string",
"Cgroup": "string",
"Links": [
"string"
],
"OomScoreAdj": 500,
"PidMode": "string",
"Privileged": true,
"PublishAllPorts": true,
"ReadonlyRootfs": true,
"SecurityOpt": [
"string"
],
"StorageOpt": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"Tmpfs": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"UTSMode": "string",
"UsernsMode": "string",
"ShmSize": 42,
"Sysctls": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"Runtime": "string",
"Isolation": "default",
"MaskedPaths": [
"string"
],
"ReadonlyPaths": [
"string"
]
},
"GraphDriver": {
"Name": "overlay2",
"Data": {
"WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work",
"UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff",
"MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged"
}
},
"SizeRw": 42,
"SizeRootFs": 42,
"Mounts": [
{
"Type": "volume",
"Name": "myvolume",
"Source": "/var/lib/docker/volumes/myvolume/_data",
"Destination": "/usr/share/nginx/html/",
"Driver": "local",
"Mode": "z",
"RW": true,
"Propagation": "string"
}
],
"Config": {
"Hostname": "439f4e91bd1d",
"Domainname": "string",
"User": "string",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"80/tcp": {},
"443/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/bin/sh"
],
"Healthcheck": {
"Test": [
"string"
],
"Interval": 42,
"Timeout": 42,
"Retries": 42,
"StartPeriod": 42,
"StartInterval": 42
},
"ArgsEscaped": false,
"Image": "example-image:1.0",
"Volumes": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"WorkingDir": "/public/",
"Entrypoint": [
"string"
],
"NetworkDisabled": true,
"MacAddress": "string",
"OnBuild": [
"string"
],
"Labels": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"StopSignal": "SIGTERM",
"StopTimeout": 10,
"Shell": [
"/bin/sh",
"-c"
]
},
"NetworkSettings": {
"Bridge": "docker0",
"SandboxID": "9d12daf2c33f5959c8bf90aa513e4f65b561738661003029ec84830cd503a0c3",
"HairpinMode": false,
"LinkLocalIPv6Address": "string",
"LinkLocalIPv6PrefixLen": 42,
"Ports": {
"53/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "53"
}
],
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
},
{
"HostIp": "0.0.0.0",
"HostPort": "8080"
}
],
"80/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
}
],
"443/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "4443"
}
],
"2377/tcp": null
},
"SandboxKey": "/var/run/docker/netns/8ab54b426c38",
"SecondaryIPAddresses": [
{
"Addr": "string",
"PrefixLen": 42
}
],
"SecondaryIPv6Addresses": [
{
"Addr": "string",
"PrefixLen": 42
}
],
"EndpointID": "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "2001:db8::5689",
"GlobalIPv6PrefixLen": 64,
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "2001:db8:2::100",
"MacAddress": "02:42:ac:11:00:04",
"Networks": {
"additionalProperty1": {
"IPAMConfig": {
"IPv4Address": "172.20.30.33",
"IPv6Address": "2001:db8:abcd::3033",
"LinkLocalIPs": [
"169.254.34.68",
"fe80::3468"
]
},
"Links": [
"container_1",
"container_2"
],
"MacAddress": "02:42:ac:11:00:04",
"Aliases": [
"server_x",
"server_y"
],
"NetworkID": "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a",
"EndpointID": "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "2001:db8:2::100",
"GlobalIPv6Address": "2001:db8::5689",
"GlobalIPv6PrefixLen": 64,
"DriverOpts": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"DNSNames": [
"foobar",
"server_x",
"server_y",
"my.ctr"
]
},
"additionalProperty2": {
"IPAMConfig": {
"IPv4Address": "172.20.30.33",
"IPv6Address": "2001:db8:abcd::3033",
"LinkLocalIPs": [
"169.254.34.68",
"fe80::3468"
]
},
"Links": [
"container_1",
"container_2"
],
"MacAddress": "02:42:ac:11:00:04",
"Aliases": [
"server_x",
"server_y"
],
"NetworkID": "08754567f1f40222263eab4102e1c733ae697e8e354aa9cd6e18d7402835292a",
"EndpointID": "b88f5b905aabf2893f3cbc4ee42d1ea7980bbc0a92e2c8922b1e1795298afb0b",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "2001:db8:2::100",
"GlobalIPv6Address": "2001:db8::5689",
"GlobalIPv6PrefixLen": 64,
"DriverOpts": {
"com.example.some-label": "some-value",
"com.example.some-other-label": "some-other-value"
},
"DNSNames": [
"foobar",
"server_x",
"server_y",
"my.ctr"
]
}
}
}
}
Response examples (404)
{
"message": "No such container: c2ada9df5af8"
}
Response examples (404)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}