What to expect when trying Docker for Mac UPDATED

udaiveer singh
Code Wave
Published in
3 min readJan 22, 2017

Ok so its been 1 Year and this problems have been solved.

Using docker edge and cached volumes symphony runs super fast.

Please follow this

— — — — — — — — The rest of this article is out dated now — — — — — — —

At my current company I am using Vagrant as my virtual environment. Vagrant seem to gets the job done fine for most pages. However some pages have queries that can take more than 20 seconds.

Over this weekend I decided to dive headfirst into Docker for Mac. My goal was to run several concurrent php projects that I currently run on Virtualbox/Vagrant at native speeds, but on docker.

I was quite excited to try out the new Xhive native VM implementation, hoping for dramatic speed increases across the board.

The installation is is easiest part. The harder part is knowing what images to pull and following best conventions.

It took me quite a long time to read all of the Mac/Docker documentation. I watched a lot of YouTube DockerCon.

Anyway After making my docker-compose.yml file and finally getting everything Dockerized on my sample Symfony app. I got this super long response time. I was so confused and thought that I had done something wrong because Vagrant is faster than this without NFS.

However I later came to find out that this is actually a known problem by The Docker Team and they have been working on a fix since June 2016.

Docker for Mac

If you are using Xhive for Mac then don’t bother. I went down a deep rabbit hole to try and fix this problem with 3rd party solution and just ended up wasting 5–6 hours. Don’t use Xhive for Docker right now. Using the standard VM is much faster with “NFS”.

Still I was not satisfied with this solution. Looking around the docker form I found this gem of a thread.

I decided to wipe an old MacBook Pro and put Ubuntu on it to see if my Symfony app was any faster.

The good thing about Docker is that once you make a docker-compose setup, everything is very portable. Basically I installed PhpStorm, docker, docker-compose and pulled my Github repository to the Linux machine and had my Symfony project up and running in a few minutes.

Now for the final results. This is the load time of the same page running on Ubuntu.

Docker is about 14x faster on Linux than Mac. (Jan-2017)

--

--