Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directory does not support NFS #61

Open
strauss69400 opened this issue Feb 23, 2021 · 5 comments
Open

directory does not support NFS #61

strauss69400 opened this issue Feb 23, 2021 · 5 comments

Comments

@strauss69400
Copy link

Hi everyone,

I get this error when i run the container :
Impossible to find the solution. i tried many things but without success

In the logs i get this informations:

  STARTING SERVICES ...

==================================================================
----> starting rpcbind
----> starting exportfs
exportfs: /home does not support NFS export
---->
----> ERROR: /usr/sbin/exportfs failed
---->

and this is my docker-compose

nfs-server:
  image: erichough/nfs-server
  container_name: nfs-server
  hostname: project
  environment:
    NFS_PORT: 2049
    NFS_VERSION: 3
    #NFS_SERVER_THREAD_COUNT: 8
    NFS_EXPORT_0: /home *(rw,insecure,no_subtree_check,fsid=0,no_root_squash,sync)
  restart: unless-stopped
  volumes:
    - type: bind
      source: /etc
      target: /home
      read_only: false
  cap_add:
    - SYS_ADMIN
    - SYS_MODULE
  privileged: true
  ports:
    - 2049:2049
    - 112:112
    - 32765:32765
    - 32767:32767

Can you help me please ?
Best regards

@james-mchugh
Copy link

I'm seeing the same issue.

@finalspy
Copy link

same for me ...

@aaron-pham
Copy link

aaron-pham commented Aug 12, 2021

I found that the NFS share must be mounted to the host as well.
So in your docker-compose.yml

volumes:
      - <directory that exist on host>:/home
      - type: bind
         source: /etc
         target: /home
         read_only: false

And this should get rid of the error.

@bargergo
Copy link

@aaron-pham Could you show an example with more details? (For example a full docker-compose.yml)

I have tried it like this:

version: "2.1"
services:
  nfs-server:
    image: erichough/nfs-server:2.2.1
    container_name: nfs-server
    privileged: true
    volumes:
      - /F/tusfiles:/home/user/share
      - type: bind
        source: /F/tusfiles
        target: /home/user/share
        read_only: false
      - /F/tusfiles/exports.txt:/etc/exports:ro  
    ports:
      - 2049:2049

But I got this error:

ERROR: Duplicate mount points: [/F/tusfiles:/home/user/share:rw, /F/tusfiles:/home/user/share:rw]

(I get the same error if the source is /etc)

@mcclumpherty
Copy link

What if I don't want to have a bind mount to the host? Is there any way to share the folder without doing that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants