parent
							
								
									3f7256e145
								
							
						
					
					
						commit
						d2e2604cfc
					
				
							
								
								
									
										23
									
								
								README.md
								
								
								
								
							
							
						
						
									
										23
									
								
								README.md
								
								
								
								
							|  | @ -819,26 +819,33 @@ docker run -it \ | ||||||
| ``` | ``` | ||||||
| ### Share Linux NFS Drive into macOS | ### Share Linux NFS Drive into macOS | ||||||
| 
 | 
 | ||||||
| Setup a Linx NFS server on host machine, an example `/etc/export` configuration that is compatible with the mac client: | To share a folder using NFS, setup a folder for on the host machine, for example, `/srv/nfs/share` and then append to `/etc/exports`: | ||||||
| ``` | ```bash | ||||||
| /srv/nfs/share 127.0.0.1/0(insecure,rw,all_squash,anonuid=1000,anongid=985,no_subtree_check) | /srv/nfs/share      127.0.0.1/0(insecure,rw,all_squash,anonuid=1000,anongid=985,no_subtree_check) | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| [source](https://serverfault.com/questions/716350/mount-nfs-volume-on-ubuntu-linux-server-from-macos-client) | You may need to reload exports now, which will begin sharing that directory. | ||||||
| 
 | 
 | ||||||
| Where `anonuid` and `anongid` matches that of your linux user. | ```bash | ||||||
|  | # reload shared folders | ||||||
|  | sudo exportfs -arv | ||||||
|  | ``` | ||||||
| 
 | 
 | ||||||
| Give permissions on the shared folder for the `anonuid` and `anongid`: | [Source & Explanation](https://serverfault.com/questions/716350/mount-nfs-volume-on-ubuntu-linux-server-from-macos-client) | ||||||
|  | 
 | ||||||
|  | Give permissions on the shared folder for the `anonuid` and `anongid`, where `anonuid` and `anongid` matches that of your linux user; `id -u` | ||||||
|  | 
 | ||||||
|  | `id -u ; id -g` will print `userid:groupid` | ||||||
| ``` | ``` | ||||||
| chown 1000:985 /srv/nfs/share | chown 1000:985 /srv/nfs/share | ||||||
| chmod u+rwx /srv/nfs/share | chmod u+rwx /srv/nfs/share | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| Start the mac osx docker container with `--network host` | Start the Docker-OSX container with the additional flag `--network host` | ||||||
| 
 | 
 | ||||||
| Create and mount the nfs folder from the mac terminal: | Create and mount the nfs folder from the mac terminal: | ||||||
| ``` | ``` | ||||||
| mkdir ~/mnt | mkdir -p ~/mnt | ||||||
| sudo mount -t nfs 10.0.2.2:/srv/nfs/share ~/mnt | sudo mount -t nfs 10.0.2.2:/srv/nfs/share ~/mnt | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue