adlogix / docker-machine-nfs

Activates NFS on docker-machine
MIT License
794 stars 104 forks source link

Add option to set IP or IP range #53

Closed frankcarey closed 8 years ago

frankcarey commented 8 years ago

There's another issue mentioning the problem when a restart changes the IP address of the machine causing the nfs share to break. Since all the IPs are in a set range, it would be nice to have the option to use the range instead.

For instance this works for me, no matter what ip the machine starts on:

#/etc/export
/home/fcarey/docker-share 192.168.99.0/24(rw,sync,no_subtree_check,no_root_squash)

Note these are linux specific settings but the important part is 192.168.99.0/24

vultron81 commented 8 years ago

We could really use this option. Our problem is that docker-machine-nfs uses the public IP of the machine. If you change networks (like you have a laptop and bring it home) the public IP changes and you have to rerun the docker-machine-nfs script. It would be better to have the VM route IP by default as this does not change when you change networks.

seanmrogers commented 8 years ago

+1

johnlouie commented 8 years ago

+1

mjaffasofi commented 8 years ago

+1

Gabrinthei commented 8 years ago

+1 would be a great addition

fuerst commented 8 years ago

Is the host IP needed at all? I usually use the IP range of the VM network adapter the boot2docker VM runs at like:

/Users -alldirs -mapall=502:20 -network 172.16.12.0 -mask 255.255.255.0

Since the network adapter usually does not change between restarts or change of network location this would be a better solution in my point of view.

tonivdv commented 8 years ago

Hey guys,

I added a way to have the ip-range. If you want to test the PR it's now the time to do it ;)

Cheers