Not able to mount dockerized NFS server : requested NFS version or transport protocol is not supported

My docker engine is running on Ubuntu 16.

I tried to setup NFS server based on : Using https://github.com/ErezHorev/dockerized_nfs_server/blob/master/docker/Dockerfile

  • how to use sed command with docker run to replace text on a .conf file for nginx docker image?
  • How do I connect to gcloud sql with gcloud sql proxy from GKE
  • Cannot connect to the Docker daemon on Windows 7
  • Docker - R creates multiple processes
  • Ansible Docker Module from OSX
  • Node error ENOSPC when running pm2 with docker-compose
  • NFS server is running now . container IP is 172.17.0.2

    But I am not able to mount in same container or from other container .

    Error :

    root@71d5a4bc32bc:/#  mount -v -t nfs -o proto=tcp,port=2049 172.17.0.2:/exports/opt /mnt
    mount.nfs: timeout set for Tue Aug  9 13:06:36 2016
    mount.nfs: trying text-based options 'proto=tcp,port=2049,vers=4,addr=172.17.0.2,clientaddr=172.17.0.2'
    mount.nfs: mount(2): Operation not permitted
    mount.nfs: trying text-based options 'proto=tcp,port=2049,addr=172.17.0.2'
    mount.nfs: prog 100005, trying vers=3, prot=6
    mount.nfs: portmap query failed: RPC: Program not registered
    
    **mount.nfs: requested NFS version or transport protocol is not supported**
    

    Debugging

    root@71d5a4bc32bc:/# rpcinfo
       program version netid     address                service    owner
        100000    4    tcp6      ::.0.111               portmapper superuser
        100000    3    tcp6      ::.0.111               portmapper superuser
        100000    4    udp6      ::.0.111               portmapper superuser
        100000    3    udp6      ::.0.111               portmapper superuser
        100000    4    tcp       0.0.0.0.0.111          portmapper superuser
        100000    3    tcp       0.0.0.0.0.111          portmapper superuser
        100000    2    tcp       0.0.0.0.0.111          portmapper superuser
        100000    4    udp       0.0.0.0.0.111          portmapper superuser
        100000    3    udp       0.0.0.0.0.111          portmapper superuser
        100000    2    udp       0.0.0.0.0.111          portmapper superuser
        100000    4    local     /run/rpcbind.sock      portmapper superuser
        100000    3    local     /run/rpcbind.sock      portmapper superuser
        100024    1    udp       0.0.0.0.146.187        status     102
        100024    1    tcp       0.0.0.0.225.53         status     102
        100024    1    udp6      ::.221.215             status     102
        100024    1    tcp6      ::.237.126             status     102
    
    
    root@71d5a4bc32bc:/# rpcinfo -p 172.17.0.2
       program vers proto   port  service
        100000    4   tcp    111  portmapper
        100000    3   tcp    111  portmapper
        100000    2   tcp    111  portmapper
        100000    4   udp    111  portmapper
        100000    3   udp    111  portmapper
        100000    2   udp    111  portmapper
        100024    1   udp  37563  status
        100024    1   tcp  57653  status
    

    root@71d5a4bc32bc:/# showmount -e 172.17.0.2
    clnt_create: RPC: Program not registered

    Edit

    When I ran

    service nfs-kernel-server start

    mount: permission denied
     * Exporting directories for NFS kernel daemon...                                                                                                                                                                  
    
    
    exportfs: could not open /proc/fs/nfs/exports for locking: errno 13 (Permission denied)
                                                                                                                                                                                                                [ OK ]
     * Starting NFS kernel daemon                                                                                                                                                                                      rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
    
    
    Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem
    

    Port 2049 was never up .

  • Should I make a service for shared Docker dependencies?
  • Creating docker-machine
  • docker routing no iptables
  • Docker for Windows error: “Hardware assisted virtualization and data execution protection must be enabled in the BIOS”
  • Ubuntu docker swarm error “docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.”
  • How to understand Amazon ECS cluster
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.