Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

NFS support instructions added to README #828

Closed
wants to merge 8 commits into from

Conversation

chiedo
Copy link

@chiedo chiedo commented Apr 13, 2015

I was able to get boot2docker to use NFS on OSX with the following steps. It's very possible I'm missing something important but if not, it would be great if you merged this!

@thaJeztah
Copy link

Thanks!

For reference; this came up in #817 (comment) and I suggested creating a pull-request (in case it's helpful to other users)

README.md Outdated
- Then add the following content to that script.

```
#/bin/bash

This comment was marked as spam.

This comment was marked as spam.

@mattes
Copy link
Contributor

mattes commented Apr 14, 2015

I don't think there is a default IP for boot2docker. Using docker-machine with multiple VM instances here. We should add a comment where IPs are coming from.

192.168.59.103 is the boot2docker VM IP
192.168.59.3 is the Host only adapter IP

Also check out this script I wrote to automate the process of patching boot2docker with NFS.
https://gist.github.com/mattes/4d7f435d759ca2581347

@blazarecki
Copy link

+1

@chiedo
Copy link
Author

chiedo commented Apr 14, 2015

Good call @mattes I went ahead and added those comments! Do you want to add a pull request for incorporating your automation script for the patch after/if this pull request gets merged? If you'd rather me attempt to incorporate it into this one, that works for me too!

@mattes
Copy link
Contributor

mattes commented Apr 14, 2015

@chiedojohn if you have time, yes, please go ahead! :-)

@chiedo
Copy link
Author

chiedo commented Apr 14, 2015

No problem @mattes. I went ahead and simplified in for the boot2docker use case without docker-machine. I gave it a few tests runs and it seems to work A-OK.

To all concerned, let me know if you want me to update any of my documentation style, where I placed the scripts or anything like that.

)

# Ip addr for vboxnet
vboxnet_ip = '192.168.59.3'

This comment was marked as spam.

@chiedo
Copy link
Author

chiedo commented Apr 15, 2015

@mattes sounds good! I went ahead and made it dynamic. I'll be honest though in saying that I don't fully understand where that IP address is coming from... but I guess that's OK.

@nathanleclaire
Copy link
Contributor

Hey @chiedojohn , if you are interested in this you should ping me about possibly helping with docker/machine#793 ...

@thaJeztah
Copy link

@nathanleclaire good suggestion, forgot that machine was also working on this!

@nathanleclaire
Copy link
Contributor

@thaJeztah Well, I should be clear that it's my pet PR and it's not on the official roadmap. But if the users want it, let it be known!

@thaJeztah
Copy link

@nathanleclaire I've seen many requests in this area. Just think that many people are used to boot2docker and haven't really looked at "machine" yet 😄

So anyone wanting this; join @nathanleclaire on his mission :)

@chiedo
Copy link
Author

chiedo commented Apr 16, 2015

@nathanleclaire pinging you now :)

@tuzonghua
Copy link

@chiedojohn Good start, but running into ownership mismatch. As you can see, in Docker, the /Users directory has my local directory with ownership 501:20. When I run the same command on my local machine, the same directory has ownership mdoo:staff. Fine. However, id -u inside Docker gives 1000. Since the UIDs don't match, I'm running into various permissions issues.

Boot2Docker version 1.6.0, build master : a270c71 - Thu Apr 16 19:50:36 UTC 2015
Docker version 1.6.0, build 4749651
docker@boot2docker:~$ df
Filesystem                Size      Used Available Use% Mounted on
rootfs                    1.8G     87.6M      1.7G   5% /
tmpfs                     1.8G     87.6M      1.7G   5% /
tmpfs                  1003.9M    200.0K   1003.7M   0% /dev/shm
/dev/sda1                18.2G      2.0G     15.2G  12% /mnt/sda1
cgroup                 1003.9M         0   1003.9M   0% /sys/fs/cgroup
/dev/sda1                18.2G      2.0G     15.2G  12% /mnt/sda1/var/lib/docker/aufs
192.168.59.3:/Users     280.3G     46.7G    233.4G  17% /Users
none                     18.2G      2.0G     15.2G  12% /mnt/sda1/var/lib/docker/aufs/mnt/ef01c009006dc4ac59b8b5abaa42708e90f059484efcee0482f9e99c428825ad
none                     18.2G      2.0G     15.2G  12% /mnt/sda1/var/lib/docker/aufs/mnt/d1b00fe339b4f0399338ceb4dfa167e36b0ad8d3c3309a01e5ce192e9114eb13
none                     18.2G      2.0G     15.2G  12% /mnt/sda1/var/lib/docker/aufs/mnt/3f67b0d43682b1fe74034d39e41dbb939c497278f055087c1290b3fed3564bc3
docker@boot2docker:~$ ls -l /Users
total 8
drwxrwxrwt    5 root     root           170 Mar 13 20:09 Shared/
drwxr-xr-x   66 501      20            2244 Apr 21 16:55 mdoo/
docker@boot2docker:~$ id -u
1000
docker@boot2docker:~$ id -g
50
docker@boot2docker:~$ exit
# ls -l /Users 
total 0
drwxrwxrwt   5 root  wheel   170 Mar 13 16:09 Shared
drwxr-xr-x+ 66 mdoo  staff  2244 Apr 21 12:56 mdoo

@chiedo
Copy link
Author

chiedo commented Apr 21, 2015

Hey @tuzonghua, I just made an update to the script that may fix the problems you're having.

In your /etc/exports though change -maproot=root to -mapall=501:20 restart your nfs server and let me know if that works for you.

@tuzonghua
Copy link

@chiedojohn Thanks! Worked perfectly. I had previously tried -mapall=mdoo:staff and -mapall=1000:1000 to no avail.

@heyyoyo
Copy link

heyyoyo commented Jul 4, 2015

Did anyone successfully used the nfs-client from boot2docker with the Windows NFS server WinNFSd ?

@chiedo chiedo closed this Dec 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants