Last active
September 10, 2016 19:14
-
-
Save maxnasonov/64bcfe806dac2b5c881e to your computer and use it in GitHub Desktop.
Move docker volumes to the host to fix permission issues on Mac OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac: | |
edit /etc/exports | |
edit /etc/nfs.conf | |
sudo nfsd restart | |
ln -s /Users/nasonov/Dropbox/projects /projects | |
ln -s /projects/some-project /Users/user/some-dir/some-volume/_data | |
B2D: | |
sudo /etc/init.d/docker stop | |
sudo mv /mnt/sda1/var/lib/docker/volumes /Users/user/some-dir | |
sudo ln -s /Users/user/some-dir /mnt/sda1/var/lib/docker/volumes | |
sudo touch /mnt/sda1/var/lib/boot2docker/bootlocal.sh | |
sudo chmod +x /mnt/sda1/var/lib/boot2docker/bootlocal.sh | |
edit /mnt/sda1/var/lib/boot2docker/bootlocal.sh | |
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Boot2Docker's /mnt/sda1/var/lib/boot2docker/bootlocal.sh | |
/usr/local/etc/init.d/nfs-client start | |
sudo mount 192.168.99.1:/Users/nasonov/docker-volumes /mnt/sda1/var/lib/docker/volumes -o rw,async,noatime,actimeo=1,nolock,vers=3,tcp | |
mkdir /projects | |
sudo mount 192.168.99.1:/Users/nasonov/Dropbox/projects /projects -o rw,async,noatime,actimeo=1,nolock,vers=3,tcp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/user/some-dir -maproot=root -alldirs -rw -network 192.168.99.0 -mask 255.255.255.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nfs.server.mount.require_resv_port = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment