X Tutup
Skip to content

Added RestartCount to InspectContainerResponse#406

Merged
marcuslinke merged 2 commits intodocker-java:masterfrom
gtejasvarma:master
Jan 15, 2016
Merged

Added RestartCount to InspectContainerResponse#406
marcuslinke merged 2 commits intodocker-java:masterfrom
gtejasvarma:master

Conversation

@gtejasvarma
Copy link
Copy Markdown
Contributor

Helps client know how many times this container is restarted by docker deamon

@KostyaSha
Copy link
Copy Markdown
Member

Please provide json sample of your response and docker version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use objects instead of primitives

@KostyaSha KostyaSha self-assigned this Dec 18, 2015
@KostyaSha KostyaSha added this to the 3.0.0 milestone Dec 18, 2015
@gtejasvarma
Copy link
Copy Markdown
Contributor Author

Docker version 1.8.1, build d12ea79

[
{
    "Id": "eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a",
    "Created": "2015-12-17T23:30:32.441044267Z",
    "Path": "/bin/sh",
    "Args": [
        "-c",
        "python app.py"
    ],
    "State": {
        "Running": true,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 6897,
        "ExitCode": 0,
        "Error": "",
        "StartedAt": "2015-12-21T21:35:55.159459273Z",
        "FinishedAt": "2015-12-21T21:35:55.035144823Z"
    },
    "Image": "2a5a22a6afd698c91579bc46ae0e8226b51211730fbe7082c5bd5390eaa3cdf6",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "0eed0ac556bccf67642d495531757072cb6d3a8bca24772866375a45728a2891",
        "Gateway": "172.17.42.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "172.17.0.8",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "02:42:ac:11:00:08",
        "NetworkID": "553e1970ed30f71e4666580a19c85224e1136f5170adf08840a727ce7d9d4408",
        "PortMapping": null,
        "Ports": {
            "5000/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "5000"
                }
            ]
        },
        "SandboxKey": "/var/run/docker/netns/eb0f2f328bd7",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "ResolvConfPath": "/var/lib/docker/containers/eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a/resolv.conf",
    "HostnamePath": "/var/lib/docker/containers/eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a/hostname",
    "HostsPath": "/var/lib/docker/containers/eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a/hosts",
    "LogPath": "/var/lib/docker/containers/eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a/eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a-json.log",
    "Name": "/iweb",
    "RestartCount": 1,
    "Driver": "devicemapper",
    "ExecDriver": "native-0.2",
    "MountLabel": "",
    "ProcessLabel": "",
    "AppArmorProfile": "",
    "ExecIDs": null,
    "HostConfig": {
        "Binds": [
            "/code/docker-compose-example:/code:rw"
        ],
        "ContainerIDFile": "",
        "LxcConf": null,
        "Memory": 0,
        "MemorySwap": 0,
        "CpuShares": 0,
        "CpuPeriod": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "CpuQuota": 0,
        "BlkioWeight": 0,
        "OomKillDisable": false,
        "MemorySwappiness": null,
        "Privileged": false,
        "PortBindings": {
            "5000/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "5000"
                }
            ]
        },
        "Links": null,
        "PublishAllPorts": false,
        "Dns": null,
        "DnsSearch": null,
        "ExtraHosts": [],
        "VolumesFrom": [],
        "Devices": null,
        "NetworkMode": "default",
        "IpcMode": "",
        "PidMode": "",
        "UTSMode": "",
        "CapAdd": null,
        "CapDrop": null,
        "GroupAdd": null,
        "RestartPolicy": {
            "Name": "on-failure",
            "MaximumRetryCount": 2
        },
        "SecurityOpt": null,
        "ReadonlyRootfs": false,
        "Ulimits": null,
        "LogConfig": {
            "Type": "json-file",
            "Config": {}
        },
        "CgroupParent": "",
        "ConsoleSize": [
            0,
            0
        ]
    },
    "GraphDriver": {
        "Name": "devicemapper",
        "Data": {
            "DeviceId": "921",
            "DeviceName": "docker-8:1-268493-eb0f2f328bd7822463dce0ba818e3fc752b7845076bcae4651a9f7e2242bb69a",
            "DeviceSize": "10737418240"
        }
    },
    "Mounts": [
        {
            "Source": "/code/docker-compose-example",
            "Destination": "/code",
            "Mode": "rw",
            "RW": true
        }
    ],
    "Config": {
        "Hostname": "eb0f2f328bd7",
        "Domainname": "",
        "User": "",
        "AttachStdin": false,
        "AttachStdout": false,
        "AttachStderr": false,
        "ExposedPorts": {
            "5000/tcp": {}
        },
        "PublishService": "",
        "Tty": false,
        "OpenStdin": false,
        "StdinOnce": false,
        "Env": [
            "affinity:container==0b5658c6b6808ee2e950d809e846100607ae9e8dd8ccc32a9fee13963e84140a",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "LANG=C.UTF-8",
            "PYTHON_VERSION=2.7.10",
            "PYTHON_PIP_VERSION=7.1.0"
        ],
        "Cmd": [
            "/bin/sh",
            "-c",
            "python app.py"
        ],
        "Image": "dockercomposeexample_web",
        "Volumes": {
            "/code": {}
        },
        "VolumeDriver": "",
        "WorkingDir": "/code",
        "Entrypoint": null,
        "NetworkDisabled": false,
        "MacAddress": "",
        "OnBuild": null,
        "Labels": {
            "com.docker.compose.config-hash": "3ef2e430a4c80d8915b244af52c35f3e1b04562cda283435f8b70c05648237b0",
            "com.docker.compose.container-number": "1",
            "com.docker.compose.oneoff": "False",
            "com.docker.compose.project": "dockercomposeexample",
            "com.docker.compose.service": "web",
            "com.docker.compose.version": "1.5.0dev",
            "taskId": "1234"
        }
    }
}
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since what API version?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to docs it appears in v1.17 but who knows whether this is correct.

@KostyaSha
Copy link
Copy Markdown
Member

Ignore comment trigger-build

@marcuslinke marcuslinke merged commit 6845dc3 into docker-java:master Jan 15, 2016
@marcuslinke marcuslinke changed the title adding RestartCount to InspectContainerResponse Added RestartCount to InspectContainerResponse Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup