adlogix / docker-machine-nfs

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

Allow different nfs options for different mounts #41

Open rbayliss opened 8 years ago

rbayliss commented 8 years ago

Hey there, It would be great if it was possible to use different NFS options for different shared folders. For example, I want to share /Users with the standard "-alldirs -mapall=\$(id -u):\$(id -g)" setup, but I want to share another directory with "-alldirs -maproot=0". This isn't currently possible, as all shared folders share the same options. Any ideas?

tonivdv commented 8 years ago

Hey @rbayliss ,

I guess we could do something like this:

docker-machine-nfs test --shared-folder="/var/www,-alldirs -maproot=0" --nfs-config="-alldirs -mapall=\$(id -u):\$(id -g)"

The --nfs-config would be applied to all shared-folder on which a override config is not given. The override would be given in the --shared-folder config after a e.g. ',' separation ?

rbayliss commented 8 years ago

Yep, that would definitely do it. Love that it doesn't break BC either.