Comments (8)
Using the whole network should do the trick. Here is what I use manually:
# /etc/exports
"/Users/Ogi" -alldirs -mapall=Ogi -network 192.168.99.0 -mask 255.255.255.0
from docker-machine-nfs.
@ogizanagi Can you elaborate what this does, and how it improves it all?
from docker-machine-nfs.
It'll allow you to not care about docker-machine ip, which would be in the whole 192.168.99.0/24
range anyway, by allowing any IP from this network to mount the given /Users/Ogi
NFS share.
from docker-machine-nfs.
@ogizanagi Ok I see. That could indeed be much easier approach. What are the downsides according to you, if any?
from docker-machine-nfs.
Actually I don't know any downside, but I'm not a system expert :)
This is the configuration used at SensioLabs/Blackfire. You can find a great post about it here: http://blog.blackfire.io/how-we-use-docker.html (Now have to be tweaked for docker-machine, but that's the exact same thing)
from docker-machine-nfs.
Thanks for the article. I'll investigate the -network option. Now I'm almost done with #17 , which automatically adds a solution for this too.
from docker-machine-nfs.
For what it's worth adding an entire C class (even private) subnet isn't such a great idea for some use cases. For example my organisation uses the entire private ranges up, 192., 10. and 172.* (a large university). So if the default sharing behaviour was this wide it could open up a share far too much for developers who don't understand networking very well.
Also it seems like docker-machine doesn't seem to change the ip between restarts, even though it warns you it might. Even destroying the vm and creating a new one seems to reuse the same ip every time.
from docker-machine-nfs.
For what it's worth adding an entire C class (even private) subnet isn't such a great idea for some use cases. For example my organisation uses the entire private ranges up, 192., 10. and 172.* (a large university). So if the default sharing behaviour was this wide it could open up a share far too much for developers who don't understand networking very well.
That's what I was afraid off.
Also it seems like docker-machine doesn't seem to change the ip between restarts, even though it warns you it might. Even destroying the vm and creating a new one seems to reuse the same ip every time.
Unfortunately that's not the case :( ! Assume you created and start a 'machine', you will be default get the ip 192.168.99.100 . If you create and start another machine, it will get 192.168.99.101. If now you stop both, and you first start the second created machine, it will now get the ip 192.168.99.100 .
I got this a lot but found a work around while reading issue docker/machine#1709:
192.168.98.100
docker-machine create -d virtualbox --virtualbox-hostonly-cidr "192.168.98.1/24" m98
192.168.97.100
docker-machine create -d virtualbox --virtualbox-hostonly-cidr "192.168.97.1/24" m97
192.168.96.100
docker-machine create -d virtualbox --virtualbox-hostonly-cidr "192.168.96.1/24" m96
If there's no other machine with the same cidr, the machine should always get the .100 IP upon start.
from docker-machine-nfs.
Related Issues (20)
- macOS Catalina HOT 17
- Cannot detect the NFS mount HOT 8
- How to specify uid / gid in /etc/exports
- checkMachineRunning invalid filter
- Are some still using this? HOT 1
- mounting {ip}:/Users on /Users failed: Bad file descriptor HOT 6
- Adding mount with similar machine name causes error HOT 3
- Support for Docker for Mac HOT 3
- So frustrated with docker for mac HOT 1
- Bug with 10 or more virtualbox network adapters HOT 1
- VMWare Fusion problems on macOS 10.12 HOT 1
- Not working with Parallels 12 Pro on Sierra HOT 3
- /usr/local/bin/docker-machine-nfs: 130: /usr/local/bin/docker-machine-nfs: Syntax error: "(" unexpected (expecting "}") HOT 2
- <3 HOT 1
- Stale file handle HOT 4
- Change document root
- Not syncing files properly in High Sierra HOT 21
- grep is not working HOT 4
- NFS mount fails with boot2docker v18.09.0 HOT 10
- Support docker-machine-driver-vmware and use machine ip for route
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-machine-nfs.