{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/2657","labels_url":"https://api.github.com/repos/docker/compose/issues/2657/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/2657/comments","events_url":"https://api.github.com/repos/docker/compose/issues/2657/events","html_url":"https://github.com/docker/compose/issues/2657","id":126697957,"number":2657,"title":"Can't use linked resource with log driver","user":{"login":"chiefy","id":54345,"avatar_url":"https://avatars.githubusercontent.com/u/54345?v=3","gravatar_id":"","url":"https://api.github.com/users/chiefy","html_url":"https://github.com/chiefy","followers_url":"https://api.github.com/users/chiefy/followers","following_url":"https://api.github.com/users/chiefy/following{/other_user}","gists_url":"https://api.github.com/users/chiefy/gists{/gist_id}","starred_url":"https://api.github.com/users/chiefy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiefy/subscriptions","organizations_url":"https://api.github.com/users/chiefy/orgs","repos_url":"https://api.github.com/users/chiefy/repos","events_url":"https://api.github.com/users/chiefy/events{/privacy}","received_events_url":"https://api.github.com/users/chiefy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T16:56:43Z","updated_at":"2016-01-14T17:05:50Z","closed_at":null,"body":"I'm not sure if this is possible, but I was trying to do something like the following:\r\n\r\n```\r\napp:\r\n  image: nginx\r\n  ports: \r\n    - \"80:80\"\r\n  log_driver: \"gelf\"\r\n  log_opt:\r\n    gelf-address: \"udp://logstash:12201\"\r\n  links:\r\n    - logstash\r\n\r\nlogstash:\r\n  image: logstash\r\n  expose:\r\n    - \"12201/udp\"  \r\n```\r\n\r\nCurrently this won't work, I assume because the log driver tries to initialize before any linking is done?"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/171705992","html_url":"https://github.com/docker/compose/issues/2657#issuecomment-171705992","issue_url":"https://api.github.com/repos/docker/compose/issues/2657","id":171705992,"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":"2016-01-14T17:05:50Z","updated_at":"2016-01-14T17:05:50Z","body":"Correct, it doesn't work because the log driver urls needs to be accessible by the daemon, not by the container. The `logstash` alias is never provided to the daemon. With the upcoming changes to how DNS works in docker 1.10 there might be some way to get this to work, I'm not sure.\r\n\r\nThis is a duplicate of #2182, however I think the description does a better job of demonstrating the problem, so maybe we should keep this one and close the other."}}