Unfortunately this topic was closed, so I could not post a reply.
It is suggested that changing primary DNS from router to 8.8.8.8 (Google) resolves the issue, but this is not an appropriate action for some users who run a local DNS cache or service for LAN-connected computers.
Please can we continue the discussion?
Docker 1.11.0-beta9 is currently the newest version available.
I installed docker for mac today and also noticed that compose is very slow when connected to the internet. I ran the following tests with OSX 10.11.4 and compose 1.7.0. The compose file is the following:
The first test I ran was with docker-machine 0.7.0 (with docker 1.11.1):
~/compose_test ❯❯❯ time docker-compose up -d
Creating network "composetest_default" with the default driver
Creating composetest_mysql_1
docker-compose up -d 0.23s user 0.05s system 44% cpu 0.627 total
Then with docker for mac beta10:
~/compose_test ❯❯❯ time docker-compose up -d
Creating network "composetest_default" with the default driver
Creating composetest_mysql_1
docker-compose up -d 0.49s user 0.12s system 0% cpu 1:12.34 total
Based on the info from the thread that OP mentioned above, I turned off my internet connection and tried again:
~/compose_test ❯❯❯ time docker-compose up -d ⏎
Creating network "composetest_default" with the default driver
Creating composetest_mysql_1
docker-compose up -d 0.22s user 0.05s system 36% cpu 0.766 total
Something seems to be slowing down docker for mac when there’s an internet connection.
the problem seems to be that compose tries to resolve localunixsocket.local and some dns-servers does not reply and so compose is running into several timeouts, i think. googles 8.8.8.8 dns-server does respond. see my 2 screenshots from tcpdump -A -s0 -nni en0 port 53.
here with company’s dns
I have the same issues, modifying /etc/hosts does not seem to resolve the issue for me. Still looking into other solutions. How has this not been fixed yet, this seems like a P1 as it makes all of Docker unusable for development and is going to put a lot people off of using Docker for Mac at all.
Thank you! This problem has been bugging me all day. In my case I’m running dnsmasq, but I also have my search domain set to local. Once I removed this (in the Mac Network Preferences panel) all was well.