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

  • Connecting docker locally with vagrant provisioned docker
  • Building an web app which can perform npm tasks
  • How to open Ubuntu GUI inside docker image
  • I can not access my Container Docker Image by HTTP
  • Dockerfile Script for Amazon AWS
  • Docker for Mac and --host option
  • 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 .

  • Connect to Docker MySQL container from localhost?
  • Process window not proceeding after reader.ReadLine()
  • “python setup.py install” does not work from Dockerfile but i can go in the container and do the same..any pointers?
  • Is it possible to run Telegraf in Docker (and get accurate metrics)?
  • Why Docker container with --link and restart policy isn't started?
  • Docker and Django manage.py
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.