{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/1503","labels_url":"https://api.github.com/repos/docker/compose/issues/1503/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/1503/comments","events_url":"https://api.github.com/repos/docker/compose/issues/1503/events","html_url":"https://github.com/docker/compose/issues/1503","id":84605580,"number":1503,"title":"Inject chosen container name in container","user":{"login":"octplane","id":22177,"avatar_url":"https://avatars.githubusercontent.com/u/22177?v=3","gravatar_id":"","url":"https://api.github.com/users/octplane","html_url":"https://github.com/octplane","followers_url":"https://api.github.com/users/octplane/followers","following_url":"https://api.github.com/users/octplane/following{/other_user}","gists_url":"https://api.github.com/users/octplane/gists{/gist_id}","starred_url":"https://api.github.com/users/octplane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octplane/subscriptions","organizations_url":"https://api.github.com/users/octplane/orgs","repos_url":"https://api.github.com/users/octplane/repos","events_url":"https://api.github.com/users/octplane/events{/privacy}","received_events_url":"https://api.github.com/users/octplane/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/compose/labels/kind/enhancement","name":"kind/enhancement","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-03T14:53:36Z","updated_at":"2015-11-25T18:34:56Z","closed_at":null,"body":"Because it can be desirable for monitoring, having the container name accessible in the container could be useful.\r\n\r\nUse case include:\r\n- monitoring the docker from outside\r\n- monitoring the applications inside the docker\r\n- wanting to merge the data with coherent data.\r\n\r\nCurrently, there is not way to get the container name apart from being outside the docker, or being able to talk to the docker daemon. This is clearly not something we want from out inner applications. I suggest passing a simple environment variable could do the trick in most case."},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/159696112","html_url":"https://github.com/docker/compose/issues/1503#issuecomment-159696112","issue_url":"https://api.github.com/repos/docker/compose/issues/1503","id":159696112,"user":{"login":"dnephin","id":442180,"avatar_url":"https://avatars.githubusercontent.com/u/442180?v=3","gravatar_id":"","url":"https://api.github.com/users/dnephin","html_url":"https://github.com/dnephin","followers_url":"https://api.github.com/users/dnephin/followers","following_url":"https://api.github.com/users/dnephin/following{/other_user}","gists_url":"https://api.github.com/users/dnephin/gists{/gist_id}","starred_url":"https://api.github.com/users/dnephin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnephin/subscriptions","organizations_url":"https://api.github.com/users/dnephin/orgs","repos_url":"https://api.github.com/users/dnephin/repos","events_url":"https://api.github.com/users/dnephin/events{/privacy}","received_events_url":"https://api.github.com/users/dnephin/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T18:34:56Z","updated_at":"2015-11-25T18:34:56Z","body":"https://github.com/crosbymichael/skydock#plugin-support\r\nhttps://github.com/ehazlett/interlock\r\nhttps://github.com/jwilder/docker-gen (only a partial solution)\r\nhttps://github.com/tonistiigi/dnsdock#overrides-from-env-metadata\r\nhttps://www.npmjs.com/package/docker-dns (not sure about this project, but it does seem to use container ids)\r\n\r\nThese are the ones I know about "}}