On a recent visit to a Caffé Nero coffee shop, docker-compose commands were running extremely slowly. After an hour or so of restarting Docker, my Mac, and switching back an forth between Docker for Mac and Docker Machine, I just gave up and headed home, pinning the issue on the then-still-beta Docker for Mac.
Today I encountered the same problem, in a different Caffé Nero and on a stable version of Docker for Mac. It couldn’t be just a coincidence. A quick search brought me to this GitHub issue, and in particular this answer:
etc/hostssolved the issue for me
And sure enough, updating
/etc/hosts to include
127.0.0.1 localunixsocket fixed the issue immediately.