{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/11011","labels_url":"https://api.github.com/repos/docker/docker/issues/11011/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/11011/comments","events_url":"https://api.github.com/repos/docker/docker/issues/11011/events","html_url":"https://github.com/docker/docker/pull/11011","id":58916466,"number":11011,"title":"Fix docker remove an image show misleading conflicts","user":{"login":"coolljt0725","id":8232360,"avatar_url":"https://avatars.githubusercontent.com/u/8232360?v=3","gravatar_id":"","url":"https://api.github.com/users/coolljt0725","html_url":"https://github.com/coolljt0725","followers_url":"https://api.github.com/users/coolljt0725/followers","following_url":"https://api.github.com/users/coolljt0725/following{/other_user}","gists_url":"https://api.github.com/users/coolljt0725/gists{/gist_id}","starred_url":"https://api.github.com/users/coolljt0725/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolljt0725/subscriptions","organizations_url":"https://api.github.com/users/coolljt0725/orgs","repos_url":"https://api.github.com/users/coolljt0725/repos","events_url":"https://api.github.com/users/coolljt0725/events{/privacy}","received_events_url":"https://api.github.com/users/coolljt0725/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/2-code-review","name":"2-code-review","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-25T15:18:17Z","updated_at":"2015-02-26T14:03:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/11011","html_url":"https://github.com/docker/docker/pull/11011","diff_url":"https://github.com/docker/docker/pull/11011.diff","patch_url":"https://github.com/docker/docker/pull/11011.patch"},"body":"Signed-off-by: Lei Jitang <leijitang@huawei.com>\r\nsteps to reproduce:\r\n`1) docker tag busybox 127.0.0.1:5000/busybox`\r\n`2) docker run --name test123 busybox touch /home/test`\r\n`3)docker commit test123 busybox:test`\r\n`4)docker rmi busybox:test`  \r\nThe output message is \r\n`Error response from daemon: Conflict, cannot delete image 4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125 because it is tagged in multiple repositories, use -f to force\r\nFATA[0000] Error: failed to remove one or more images` \r\nThis message is misleading, actually `4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125` is  ID of `busybox:latest` and the layer of  `busybox:test` has been removed.\r\n\r\nJust as the comment in the source code said(see https://github.com/docker/docker/blob/master/daemon/image_delete.go#L74)\r\nthis conflict message is to info the user when remove a image use a ID and the the ID is taged to multiple repositories. \r\nThe image which ID is taged to multiple repositories  is only removed at first time(see https://github.com/docker/docker/blob/master/daemon/image_delete.go#L83)\r\n\r\nSo when remove an image which its dependency image ID taged to multiple repositories, \r\nthere is no need to show this message, because https://github.com/docker/docker/blob/master/daemon/image_delete.go#L83 will prevent it from \r\nbeing remove.\r\n\r\nIf it is ok, I'll add a test\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/76182577","html_url":"https://github.com/docker/docker/pull/11011#issuecomment-76182577","issue_url":"https://api.github.com/repos/docker/docker/issues/11011","id":76182577,"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},"created_at":"2015-02-26T14:03:50Z","updated_at":"2015-02-26T14:03:50Z","body":"func is really weird to grok, but this LGTM."}}