{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/4689","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/4689/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/4689/comments","events_url":"https://api.github.com/repos/docker/compose/issues/4689/events","html_url":"https://github.com/docker/compose/issues/4689","id":218584167,"number":4689,"title":"External DNS lookups fail with docker-compose embedded dns server","user":{"login":"davethegr8","id":55392,"avatar_url":"https://avatars3.githubusercontent.com/u/55392?v=3","gravatar_id":"","url":"https://api.github.com/users/davethegr8","html_url":"https://github.com/davethegr8","followers_url":"https://api.github.com/users/davethegr8/followers","following_url":"https://api.github.com/users/davethegr8/following{/other_user}","gists_url":"https://api.github.com/users/davethegr8/gists{/gist_id}","starred_url":"https://api.github.com/users/davethegr8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davethegr8/subscriptions","organizations_url":"https://api.github.com/users/davethegr8/orgs","repos_url":"https://api.github.com/users/davethegr8/repos","events_url":"https://api.github.com/users/davethegr8/events{/privacy}","received_events_url":"https://api.github.com/users/davethegr8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-03-31T18:42:26Z","updated_at":"2017-04-03T19:39:03Z","closed_at":null,"body":"I'm not sure if this is a bug or user configuration issue, but it seems like it might be a corner case with dns, so submitting here.\r\n\r\nI've got a very simple scenario where any external dns lookup with a docker compose project fails, while analogous commands with plain docker work. I suspect something in the embedded dns server has a conflict with my network's settings and what docker uses/expects, but I don't know enough to diagnose or troubleshoot.\r\n\r\nI've setup https://gist.github.com/davethegr8/f791ed7fac6f3fdc897b6945b422d36a with the relevant code, but I suspect that this might be host/kernel specific due to it not reproducing on other systems I have. The problematic host is Ubuntu 14.04.1, while it works on an OSX 10.11.6 host.\r\n\r\nHere's what happens:\r\n\r\nI have a docker-compose file that runs two containers, one which pings google.com and one which cats /etc/resolv.conf. \r\n\r\n```\r\nversion: \"2\"\r\nservices:\r\n  ping:\r\n    image: python:3.6-alpine\r\n    command: \"ping -c 1 google.com\"\r\n  dns:\r\n    image: python:3.6-alpine\r\n    command: \"cat /etc/resolv.conf\"\r\n```\r\n\r\nThe output looks something like this:\r\n\r\n```\r\nsearch redacted.com\r\noptions ndots:2\r\nnameserver 172.18.0.1\r\nnameserver 172.18.0.2\r\nnameserver 10.50.5.1\r\n\r\nCreating pingtest_ping_1\r\nCreating pingtest_dns_1\r\nAttaching to pingtest_ping_1, pingtest_dns_1\r\ndns_1   | search redacted.com\r\ndns_1   | nameserver 127.0.0.11\r\ndns_1   | options ndots:2 ndots:0\r\npingtest_dns_1 exited with code 0\r\nping_1  | ping: bad address 'google.com'\r\npingtest_ping_1 exited with code 1\r\n```\r\n\r\nBut, if I run basically identical commands with plain docker, they both succeed.\r\n\r\n```\r\n$ docker run --rm python:3.6-alpine ping -c 1 google.com\r\n\r\nPING google.com (172.217.3.174): 56 data bytes\r\n64 bytes from 172.217.3.174: seq=0 ttl=50 time=3.913 ms\r\n\r\n--- google.com ping statistics ---\r\n1 packets transmitted, 1 packets received, 0% packet loss\r\nround-trip min/avg/max = 3.913/3.913/3.913 ms\r\n\r\n$ docker run --rm python:3.6-alpine cat /etc/resolv.conf\r\n\r\nsearch redacted.com\r\noptions ndots:2\r\nnameserver 172.18.0.1\r\nnameserver 172.18.0.2\r\nnameserver 10.50.5.1\r\n```\r\n\r\nI've already tried hardcoding dns settings in my docker-compose file, the end result is the same. Any ideas/suggestions?\r\n\r\nVersion info:\r\n\r\n```\r\n$ sudo docker --version\r\nDocker version 17.03.0-ce, build 60ccb22\r\n$ sudo docker-compose --version\r\ndocker-compose version 1.11.2, build dfed245\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/291250825","html_url":"https://github.com/docker/compose/issues/4689#issuecomment-291250825","issue_url":"https://api.github.com/repos/docker/compose/issues/4689","id":291250825,"user":{"login":"shin-","id":1086876,"avatar_url":"https://avatars0.githubusercontent.com/u/1086876?v=3","gravatar_id":"","url":"https://api.github.com/users/shin-","html_url":"https://github.com/shin-","followers_url":"https://api.github.com/users/shin-/followers","following_url":"https://api.github.com/users/shin-/following{/other_user}","gists_url":"https://api.github.com/users/shin-/gists{/gist_id}","starred_url":"https://api.github.com/users/shin-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shin-/subscriptions","organizations_url":"https://api.github.com/users/shin-/orgs","repos_url":"https://api.github.com/users/shin-/repos","events_url":"https://api.github.com/users/shin-/events{/privacy}","received_events_url":"https://api.github.com/users/shin-/received_events","type":"User","site_admin":false},"created_at":"2017-04-03T19:39:03Z","updated_at":"2017-04-03T19:39:03Z","body":"Thanks!\r\n\r\nThere's nothing there that really jumps out to me, but you should create an issue on the [docker/docker](https://github.com/docker/docker/issues) bugtracker with that info - the people there definitely know more than I do :)"}}
{"actor":{"display_login":"shin-"}}