docker-compose up is slow on docker for mac os beta

I have been trying with Docker beta on Mac OS and was facing an issue with docker-compose.

It was taking ages for the docker-compose commands to get executed. After digging into a while I figured out that the dns lookup was causing the issues.

docker-compose is trying to resolve localunixsocket.local. You can get insight into the dns lookup by running

sudo tcpdump -A -s0 -nni en0 port 53

For now I've pointed localunixsocket.local to localhost in my /etc/hosts. Now everything is speedy again. To do the same, you need to edit /etc/hosts file and add the contents:

127.0.0.1 localunixsocket.local

Hope someone finds this useful