{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/15503","labels_url":"https://api.github.com/repos/docker/docker/issues/15503/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/15503/comments","events_url":"https://api.github.com/repos/docker/docker/issues/15503/events","html_url":"https://github.com/docker/docker/pull/15503","id":100440604,"number":15503,"title":"Revert \"Container don't inherit from image labels\"","user":{"login":"ibuildthecloud","id":1754002,"avatar_url":"https://avatars.githubusercontent.com/u/1754002?v=3","gravatar_id":"","url":"https://api.github.com/users/ibuildthecloud","html_url":"https://github.com/ibuildthecloud","followers_url":"https://api.github.com/users/ibuildthecloud/followers","following_url":"https://api.github.com/users/ibuildthecloud/following{/other_user}","gists_url":"https://api.github.com/users/ibuildthecloud/gists{/gist_id}","starred_url":"https://api.github.com/users/ibuildthecloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibuildthecloud/subscriptions","organizations_url":"https://api.github.com/users/ibuildthecloud/orgs","repos_url":"https://api.github.com/users/ibuildthecloud/repos","events_url":"https://api.github.com/users/ibuildthecloud/events{/privacy}","received_events_url":"https://api.github.com/users/ibuildthecloud/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/status/1-design-review","name":"status/1-design-review","color":"fef2c0"},{"url":"https://api.github.com/repos/docker/docker/labels/status/needs-attention","name":"status/needs-attention","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/41","html_url":"https://github.com/docker/docker/milestones/1.9.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/41/labels","id":1211905,"number":41,"title":"1.9.0","description":"","creator":{"login":"dmp42","id":332946,"avatar_url":"https://avatars.githubusercontent.com/u/332946?v=3","gravatar_id":"","url":"https://api.github.com/users/dmp42","html_url":"https://github.com/dmp42","followers_url":"https://api.github.com/users/dmp42/followers","following_url":"https://api.github.com/users/dmp42/following{/other_user}","gists_url":"https://api.github.com/users/dmp42/gists{/gist_id}","starred_url":"https://api.github.com/users/dmp42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmp42/subscriptions","organizations_url":"https://api.github.com/users/dmp42/orgs","repos_url":"https://api.github.com/users/dmp42/repos","events_url":"https://api.github.com/users/dmp42/events{/privacy}","received_events_url":"https://api.github.com/users/dmp42/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":33,"state":"open","created_at":"2015-07-16T20:50:09Z","updated_at":"2015-09-30T18:42:18Z","due_on":null,"closed_at":null},"comments":35,"created_at":"2015-08-12T00:26:34Z","updated_at":"2015-09-30T18:42:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/15503","html_url":"https://github.com/docker/docker/pull/15503","diff_url":"https://github.com/docker/docker/pull/15503.diff","patch_url":"https://github.com/docker/docker/pull/15503.patch"},"body":"This reverts commit 79621c7728ab83292ffd94d005f10ccebfba055b from https://github.com/docker/docker/pull/13772.\r\n\r\nSo here's the deal.  When labels were first added (in part by me) labels where copied from the image to the container.  The intention here is that labels followed the same behaviour of ENV in that the image contains a \"template\" of the configuration of the container that is created from the image.  It seemed perfectly logical to me that they would be copied.  #13772 Came about saying that \"image labels\" are different from \"container labels.\"  I get that, but never really viewed labels in Config section of the image as \"image labels\".  If it was an Image label it probably should be a root element.  Anyhow, not super important.  The important thing here is that #13772 removed that behaviour of copying labels to the containers.\r\n\r\nI objected to the change because it breaks our software but the counter argument was basically just to do two calls.  I couldn't really disagree so I let that go.  Now that 1.8 is out I realize I should have thought this through more, it's not just 2 calls, but many more.\r\n\r\nLabels are returned in the API equivalent of `docker ps`.  This is to allow fast lookup of containers.  By not returning labels from images on `docker ps` it now become a N+1 call.  If I do `docker ps` and get back 100 containers, I now need to do 100 `docker inspect IMAGE` calls.  Now one could get smart and say, just do a `docker ps` and `docker images` and merge the result.  The problem there is that `docker images` is very slow.  In the end I don't know how to get back to the same level of performance I had before with out doing caching on the client side.\r\n\r\nPlease just revert this behaviour.  I'd propose we just add image labels as a separate thing and just say that what we currently have are container labels (defined in the same way the ENV vars are set on the image, but are really for the container).\r\n\r\n@icecrime @crosbymichael "},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/144503376","html_url":"https://github.com/docker/docker/pull/15503#issuecomment-144503376","issue_url":"https://api.github.com/repos/docker/docker/issues/15503","id":144503376,"user":{"login":"icecrime","id":1564054,"avatar_url":"https://avatars.githubusercontent.com/u/1564054?v=3","gravatar_id":"","url":"https://api.github.com/users/icecrime","html_url":"https://github.com/icecrime","followers_url":"https://api.github.com/users/icecrime/followers","following_url":"https://api.github.com/users/icecrime/following{/other_user}","gists_url":"https://api.github.com/users/icecrime/gists{/gist_id}","starred_url":"https://api.github.com/users/icecrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icecrime/subscriptions","organizations_url":"https://api.github.com/users/icecrime/orgs","repos_url":"https://api.github.com/users/icecrime/repos","events_url":"https://api.github.com/users/icecrime/events{/privacy}","received_events_url":"https://api.github.com/users/icecrime/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T18:42:35Z","updated_at":"2015-09-30T18:42:35Z","body":"@tiborvass WDYT?"}}