ehough / docker-nfs-server

A lightweight, robust, flexible, and containerized NFS server.
https://hub.docker.com/r/erichough/nfs-server/
GNU General Public License v3.0
669 stars 221 forks source link

mount.nfs: access denied by server while mounting 172.17.0.2:/mnt/nfstest/ #59

Open ginger111 opened 3 years ago

ginger111 commented 3 years ago

On my docker server which started properly with next command

sudo docker run 
-v /mnt/nfstest/:/mnt/nfstest 
-v /etc/exports:/etc/exports:ro --privileged
 -p 2049:2049 --security-opt apparmor=erichough-nfs
  erichough/nfs-server

I am running a Virtual Machine Ubuntu 20.04 on my Windows 10 host and run this docker on my VM. The problem is that my docker's IP is 172.17.0.2, and my home IP domain is 192.168.0.0/24 What bothers me I s that I don't understand why docker has to be on the same network or if he has to be when he works on another OSI layer and requires only open ports?

I get this error from my VM

sudo mount 172.17.0.2:/ /mnt/nfstest
mount.nfs: access denied by server while mounting 172.17.0.2: /mnt/nfstest

and from windows I can't see the docker and shared volume

valador commented 2 years ago

nfs server not work in docker-in-docker or docker-in-virtual_machine, i am even try ganesha and still fail.