Skip to content

Instantly share code, notes, and snippets.

@fordlee404
Forked from haggen/README.md
Last active August 29, 2015 14:25
Show Gist options
  • Save fordlee404/6a943f3bdd43ca6cbe32 to your computer and use it in GitHub Desktop.
Save fordlee404/6a943f3bdd43ca6cbe32 to your computer and use it in GitHub Desktop.
boot2docker on nfs

A script to switch boot2docker to use NFS instead of VBoxfs for speed.

1) In your Mac, open the file /etc/nfs.conf and add this line:

nfs.server.mount.require_resv_port = 0

2) Then, open /etc/exports and add this line, changing the values to match your case:

/Users/<your username> -alldirs -mapall=501:20

3) With both files changed time to apply the new settings:

sudo nfsd restart

4) Check your NFS shares (if you got error, then wait for few seconds and rerun it):

showmount -e

5) Finally, ssh into your boot2docker machine and run:

sudo umount /Users
sudo mkdir /Users/<your username>
sudo /usr/local/etc/init.d/nfs-client start
sudo mount <mac's ip address>:/Users/<your username> /Users/<your username> -o async,noatime,actimeo=1,nolock,vers=3,udp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment