How to speed up local development on OSX using docker machine nfs

Last updated on
11 September 2019

The following guide is for docker-machine (installed via docker-toolbox) instead of the newer version aka docker for mac.

Having said that, in my opinion (as of 27th Jan 2019) docker toolbox & docker-machine-nfs is still the fastest way of working with docker. However newer docker for mac brings many other important improvements so it is worth trying docker for mac with docker-sync.

Warning This can break up your docker-machine make backups of everything you want to keep before trying this, at your own risk.

Using NFS will speed up local development for OSX significantly, see issue 117. The easiest method for now is to utilize the docker-machine-nfs tool.

  1. Download and install the tool.

    curl -s https://raw.githubusercontent.com/adlogix/docker-machine-nfs/master/docker-machine-nfs.sh | sudo tee /usr/local/bin/docker-machine-nfs > /dev/null && sudo chmod +x /usr/local/bin/docker-machine-nfs

  2. Setup an existing docker machine to use NFS. Use the name of your docker machine docker-machine ls.

    docker-machine-nfs default

  3. In case of errors check the exports file /etc/exports, for example if you have used vagrant in the past. A way to switch from vagrant projects to docker would be to run the command again to fix it docker-machine-nfs default

Help improve this page

Page status: No known problems

You can: