Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.

Commit 3105166

Browse files
author
Doug Marcey
committed
Support for xhyve
1 parent a8365dd commit 3105166

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,31 @@ curl https://raw.githubusercontent.com/adlogix/docker-machine-nfs/master/docker-
2222
* Virtualbox
2323
* Paralells
2424
* VMware Fusion
25+
* xhyve
2526

2627
## Usage
2728

2829
```sh
2930
Usage: ./docker-machine-nfs.sh <machine-name> [options]
3031

3132
Options:
32-
33+
3334
-f, --force Force reconfiguration of nfs
3435
-n, --nfs-config NFS configuration to use in /etc/exports. (default to '-alldirs -mapall=$(id -u):$(id -g)')
3536
-s, --shared-folder,... Folder to share (default to /Users)
36-
37+
3738
Examples:
3839

3940
$ docker-machine-nfs test
40-
41+
4142
> Configure the /Users folder with NFS
42-
43+
4344
$ docker-machine-nfs test --shared-folder=/Users --shared-folder=/var/www
44-
45+
4546
> Configures the /Users and /var/www folder with NFS
46-
47+
4748
$ docker-machine-nfs test --shared-folder=/var/www --nfs-config="-alldirs -maproot=0"
48-
49+
4950
> Configure the /var/www folder with NFS and the options '-alldirs -maproot=0'
5051
```
5152

docker-machine-nfs.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ lookupMandatoryProperties ()
241241
return
242242
fi
243243

244+
if [ "$prop_machine_driver" = "xhyve" ]; then
245+
prop_network_id="Shared"
246+
prop_nfshost_ip=$(ifconfig -m `route get $prop_machine_ip | awk '{if ($1 ~ /interface:/){print $2}}'` | awk 'sub(/inet /,""){print $1}')
247+
if [ "" = "${prop_nfshost_ip}" ]; then
248+
echoError "Could not find the xhyve net IP!"; exit 1
249+
fi
250+
echoSuccess "OK"
251+
return
252+
fi
253+
244254
if [ "$prop_machine_driver" = "parallels" ]; then
245255
prop_network_id="Shared"
246256
prop_nfshost_ip=$(prlsrvctl net info \
@@ -436,4 +446,4 @@ restartDockerMachine
436446

437447
verifyNFSMount
438448

439-
showFinish
449+
showFinish

0 commit comments

Comments
 (0)