Last active
August 29, 2015 14:17
-
-
Save HugoPresents/cb8b3c207463a318b5d5 to your computer and use it in GitHub Desktop.
boot2docker nfs for OS X
This file contains hidden or 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 | |
docker build -t rabbit52/boot2docker . | |
docker run --rm rabbit52/boot2docker > boot2docker.iso |
This file contains hidden or 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
FROM boot2docker/boot2docker:latest | |
MAINTAINER Tuzki Zhang <[email protected]> | |
RUN rm $ROOTFS/etc/rc.d/automount-shares && \ | |
sed -i "s/\/etc\/rc.d\/automount-shares//g" $ROOTFS/opt/bootscript.sh && \ | |
echo "#!/bin/sh\n\ | |
/usr/local/etc/init.d/nfs-client start" >> $ROOTFS/opt/bootscript.sh | |
RUN mkdir $ROOTFS/Users && \ | |
echo "10.0.2.2:/Users /Users nfs defaults 0 0" >> $ROOTFS/etc/fstab | |
RUN /make_iso.sh | |
CMD cat boot2docker.iso |
This file contains hidden or 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 | |
# osx nfs settings | |
sudo -s | |
echo "nfs.server.mount.require_resv_port = 0" >> /etc/nfs.conf | |
echo "/Users -mapall=501:20" >> /etc/exports | |
nfsd enable | |
nfsd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment