{"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/29638140","id":29638140,"diff_hunk":"@@ -169,12 +169,14 @@ func Build(d *daemon.Daemon, buildConfig *Config) error {\n \t\tmemory:          buildConfig.Memory,\n \t\tmemorySwap:      buildConfig.MemorySwap,\n \t\tcancelled:       buildConfig.WaitCancelled(),\n+\t\timageTag:        tag,\n \t}\n \n \tid, err := builder.Run(context)\n \tif err != nil {\n \t\treturn err\n \t}\n+\tdefer builder.Daemon.Graph().Unretain(builder.activeImages, tag)","path":"builder/job.go","position":11,"original_position":11,"commit_id":"8b684a93defc52c504bc359cd5838594ca51a662","original_commit_id":"8b684a93defc52c504bc359cd5838594ca51a662","user":{"login":"cpuguy83","id":799078,"avatar_url":"https://avatars.githubusercontent.com/u/799078?v=3","gravatar_id":"","url":"https://api.github.com/users/cpuguy83","html_url":"https://github.com/cpuguy83","followers_url":"https://api.github.com/users/cpuguy83/followers","following_url":"https://api.github.com/users/cpuguy83/following{/other_user}","gists_url":"https://api.github.com/users/cpuguy83/gists{/gist_id}","starred_url":"https://api.github.com/users/cpuguy83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpuguy83/subscriptions","organizations_url":"https://api.github.com/users/cpuguy83/orgs","repos_url":"https://api.github.com/users/cpuguy83/repos","events_url":"https://api.github.com/users/cpuguy83/events{/privacy}","received_events_url":"https://api.github.com/users/cpuguy83/received_events","type":"User","site_admin":false},"body":"This needs to go before builder.Run otherwise these will never be unretained.","created_at":"2015-05-05T00:55:18Z","updated_at":"2015-05-05T00:55:18Z","html_url":"https://github.com/docker/docker/pull/11784#discussion_r29638140","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/11784","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/29638140"},"html":{"href":"https://github.com/docker/docker/pull/11784#discussion_r29638140"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/11784"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/11784","id":31982956,"html_url":"https://github.com/docker/docker/pull/11784","diff_url":"https://github.com/docker/docker/pull/11784.diff","patch_url":"https://github.com/docker/docker/pull/11784.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/11784","number":11784,"state":"open","locked":false,"title":"fix 8926: rmi dangling is unsafe when pulling","user":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>\r\n\r\nfixes #8926 ","created_at":"2015-03-26T01:47:24Z","updated_at":"2015-05-05T00:55:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25de0db2b72f522cdeea9c9b0f93472ae6da2d34","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/38","html_url":"https://github.com/docker/docker/milestones/1.7.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/38/labels","id":1010239,"number":38,"title":"1.7.0","description":"","creator":{"login":"dmcgowan","id":169601,"avatar_url":"https://avatars.githubusercontent.com/u/169601?v=3","gravatar_id":"","url":"https://api.github.com/users/dmcgowan","html_url":"https://github.com/dmcgowan","followers_url":"https://api.github.com/users/dmcgowan/followers","following_url":"https://api.github.com/users/dmcgowan/following{/other_user}","gists_url":"https://api.github.com/users/dmcgowan/gists{/gist_id}","starred_url":"https://api.github.com/users/dmcgowan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmcgowan/subscriptions","organizations_url":"https://api.github.com/users/dmcgowan/orgs","repos_url":"https://api.github.com/users/dmcgowan/repos","events_url":"https://api.github.com/users/dmcgowan/events{/privacy}","received_events_url":"https://api.github.com/users/dmcgowan/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":11,"state":"open","created_at":"2015-03-07T01:54:49Z","updated_at":"2015-05-04T19:47:20Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/docker/docker/pulls/11784/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/11784/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/docker/issues/11784/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/8b684a93defc52c504bc359cd5838594ca51a662","head":{"label":"Mashimiao:8926-fix-rmi-dangling","ref":"8926-fix-rmi-dangling","sha":"8b684a93defc52c504bc359cd5838594ca51a662","user":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"repo":{"id":29891455,"name":"docker","full_name":"Mashimiao/docker","owner":{"login":"Mashimiao","id":4852224,"avatar_url":"https://avatars.githubusercontent.com/u/4852224?v=3","gravatar_id":"","url":"https://api.github.com/users/Mashimiao","html_url":"https://github.com/Mashimiao","followers_url":"https://api.github.com/users/Mashimiao/followers","following_url":"https://api.github.com/users/Mashimiao/following{/other_user}","gists_url":"https://api.github.com/users/Mashimiao/gists{/gist_id}","starred_url":"https://api.github.com/users/Mashimiao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mashimiao/subscriptions","organizations_url":"https://api.github.com/users/Mashimiao/orgs","repos_url":"https://api.github.com/users/Mashimiao/repos","events_url":"https://api.github.com/users/Mashimiao/events{/privacy}","received_events_url":"https://api.github.com/users/Mashimiao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mashimiao/docker","description":"Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/Mashimiao/docker","forks_url":"https://api.github.com/repos/Mashimiao/docker/forks","keys_url":"https://api.github.com/repos/Mashimiao/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mashimiao/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mashimiao/docker/teams","hooks_url":"https://api.github.com/repos/Mashimiao/docker/hooks","issue_events_url":"https://api.github.com/repos/Mashimiao/docker/issues/events{/number}","events_url":"https://api.github.com/repos/Mashimiao/docker/events","assignees_url":"https://api.github.com/repos/Mashimiao/docker/assignees{/user}","branches_url":"https://api.github.com/repos/Mashimiao/docker/branches{/branch}","tags_url":"https://api.github.com/repos/Mashimiao/docker/tags","blobs_url":"https://api.github.com/repos/Mashimiao/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mashimiao/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mashimiao/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mashimiao/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mashimiao/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/Mashimiao/docker/languages","stargazers_url":"https://api.github.com/repos/Mashimiao/docker/stargazers","contributors_url":"https://api.github.com/repos/Mashimiao/docker/contributors","subscribers_url":"https://api.github.com/repos/Mashimiao/docker/subscribers","subscription_url":"https://api.github.com/repos/Mashimiao/docker/subscription","commits_url":"https://api.github.com/repos/Mashimiao/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mashimiao/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mashimiao/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mashimiao/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mashimiao/docker/contents/{+path}","compare_url":"https://api.github.com/repos/Mashimiao/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mashimiao/docker/merges","archive_url":"https://api.github.com/repos/Mashimiao/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mashimiao/docker/downloads","issues_url":"https://api.github.com/repos/Mashimiao/docker/issues{/number}","pulls_url":"https://api.github.com/repos/Mashimiao/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/Mashimiao/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/Mashimiao/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mashimiao/docker/labels{/name}","releases_url":"https://api.github.com/repos/Mashimiao/docker/releases{/id}","created_at":"2015-01-27T01:32:55Z","updated_at":"2015-03-25T15:12:01Z","pushed_at":"2015-05-05T00:49:59Z","git_url":"git://github.com/Mashimiao/docker.git","ssh_url":"git@github.com:Mashimiao/docker.git","clone_url":"https://github.com/Mashimiao/docker.git","svn_url":"https://github.com/Mashimiao/docker","homepage":"http://www.docker.com","size":52345,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"66077a9d692d8f5b5dd71bc848c359d3df092998","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2015-05-05T00:53:37Z","pushed_at":"2015-05-05T00:53:37Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":194223,"stargazers_count":21337,"watchers_count":21337,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4975,"mirror_url":null,"open_issues_count":954,"forks":4975,"open_issues":954,"watchers":21337,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/11784"},"html":{"href":"https://github.com/docker/docker/pull/11784"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/11784"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/11784/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/11784/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/11784/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/8b684a93defc52c504bc359cd5838594ca51a662"}}}}