I'm having huge problems with sharing an NFS Volume in a docker swarm. I'm always getting this error:
error while mounting volume .... permission denied
The entry in my /etc/exports file looks like this:
/home *(rw,sync,no_subtree_check)
The docker compose file:
version: '3.2'
volumes:
selenoid_nfs:
driver: local
driver_opts:
type: nfs
o: addr=<nfs-Host-ip>,rw
device: :<path to directory in nfs server>
services:
selenoid:
image: "aerokube/selenoid"
ports:
- "4444:4444"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- selenoid_nfs:/etc/selenoid
- My nfs-Host is also the swarm manager.
- When running docker stack deploy, a service will be created on a worker node. But the service is always shutting down and restarting because of the permission denied error.
- When I start the container directly on the worker node the volume is mounted without any problem.