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

  • Sharing the host OS or sharing the Container OS
  • Why is my official Ghost.org Docker container serving old content after I refresh my browser even though Ghost / Node are in development mode?
  • Running Ruby Sinatra inside a Docker container not able to connect (via Mac host) or find commands (in different scenario)?
  • Containers on different hosts are not reachable
  • Docker + rails 4 :, weird error during : RUN bundle exec rake assets:precompile
  • Docker - how to set up compose for local webserver
  • 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 .

  • Run asp.net 4.5 in Docker
  • Volume changes not persistent after “docker-compose run” command (Django's collectstatic)
  • How to mount a Host folder in minikube VM
  • Restart CMD process within cronjob
  • nginx and php-fpm in Docker
  • Docker - exposing IP addresses to DNS server
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.