-
To improve the speed of Boot2Docker drastically, you will want to set it up to use NFS.
-
You will need to do the following once on your host machine:
-
Add this to /etc/exports on your mac
# BOOT2-DOCKER-BEGIN /Users 192.168.59.103 -alldirs -mapall=501:20 # BOOT2-DOCKER-END
-
Run this command on your host machine
sudo nfsd restart
-
-
Then Start boot2docker and connect to the VM with ssh by doing the following:
boot2docker up boot2docker ssh
-
Within boot2docker do the following
- Open the the /var/lib/boot2docker/bootlocal.sh file for editing with the following command:
sudo vi /var/lib/boot2docker/bootlocal.sh
-
Then add the following content to that script.
#/bin/bash sudo umount /Users sudo /usr/local/etc/init.d/nfs-client start sudo mount -t nfs -o rw --actimeo=2 192.168.59.3:/Users /Users
-
Then run the following
sudo chmod +x /var/lib/boot2docker/bootlocal.sh
-
To test, restart boot2docker, confirm then run
df
to confirm. You should see something like the following:192.168.59.3:/Users XG XG XG X% /Users
-
You're all done. :)
-
-
Save thaJeztah/9bd5ae040f819676d6b0 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment