{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/9968","labels_url":"https://api.github.com/repos/docker/docker/issues/9968/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/9968/comments","events_url":"https://api.github.com/repos/docker/docker/issues/9968/events","html_url":"https://github.com/docker/docker/pull/9968","id":53730848,"number":9968,"title":"log: Add restart policy name to the inspect information of container","user":{"login":"HuKeping","id":9958621,"avatar_url":"https://avatars.githubusercontent.com/u/9958621?v=3","gravatar_id":"","url":"https://api.github.com/users/HuKeping","html_url":"https://github.com/HuKeping","followers_url":"https://api.github.com/users/HuKeping/followers","following_url":"https://api.github.com/users/HuKeping/following{/other_user}","gists_url":"https://api.github.com/users/HuKeping/gists{/gist_id}","starred_url":"https://api.github.com/users/HuKeping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuKeping/subscriptions","organizations_url":"https://api.github.com/users/HuKeping/orgs","repos_url":"https://api.github.com/users/HuKeping/repos","events_url":"https://api.github.com/users/HuKeping/events{/privacy}","received_events_url":"https://api.github.com/users/HuKeping/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-08T09:35:33Z","updated_at":"2015-01-12T07:26:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/9968","html_url":"https://github.com/docker/docker/pull/9968","diff_url":"https://github.com/docker/docker/pull/9968.diff","patch_url":"https://github.com/docker/docker/pull/9968.patch"},"body":"Under the restart policy \"--restart=no\", there is no record about it\r\nin the information from docker inspect.\r\n\r\nTo keep it consistent around the three(maybe more in the future) restart\r\npolicies and distinguish with no restart policy specified cases, it's\r\nworth to record it even though it is the default restart policy which\r\nwill not restart the container.\r\n\r\nExample\r\n--\r\n\r\ncase 1: no restart policy\r\n\"RestartPolicy\": {\r\n            \"MaximumRetryCount\": 0,\r\n            \"Name\": \"\"\r\n        },\r\n\r\ncase 2:--restart=on-failure:2\r\n\"RestartPolicy\": {\r\n            \"MaximumRetryCount\": 2,\r\n            \"Name\": \"on-failure\"\r\n        }\r\n\r\ncase3:--restart=always\r\n\"RestartPolicy\": {\r\n            \"MaximumRetryCount\": 0,\r\n            \"Name\": \"always\"\r\n        },\r\n\r\ncase4:--restart=no\r\n\"RestartPolicy\": {\r\n            \"MaximumRetryCount\": 0,\r\n            \"Name\": \"\"\r\n        },"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/69536202","html_url":"https://github.com/docker/docker/pull/9968#issuecomment-69536202","issue_url":"https://api.github.com/repos/docker/docker/issues/9968","id":69536202,"user":{"login":"HuKeping","id":9958621,"avatar_url":"https://avatars.githubusercontent.com/u/9958621?v=3","gravatar_id":"","url":"https://api.github.com/users/HuKeping","html_url":"https://github.com/HuKeping","followers_url":"https://api.github.com/users/HuKeping/followers","following_url":"https://api.github.com/users/HuKeping/following{/other_user}","gists_url":"https://api.github.com/users/HuKeping/gists{/gist_id}","starred_url":"https://api.github.com/users/HuKeping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HuKeping/subscriptions","organizations_url":"https://api.github.com/users/HuKeping/orgs","repos_url":"https://api.github.com/users/HuKeping/repos","events_url":"https://api.github.com/users/HuKeping/events{/privacy}","received_events_url":"https://api.github.com/users/HuKeping/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T07:26:17Z","updated_at":"2015-01-12T07:26:17Z","body":"hi @thaJeztah, i got the output  from the response body which i think may have not been manipulated by CLI yet.\r\n\r\n```\r\nresp, err := cli.HTTPClient().Do(req)\r\nbody, err := ioutil.ReadAll(resp.Body)\r\n```"}}