Hi all,
I’m trying to configure a container to create and use an NFSv4 volume (on a TrueNAS system):
volumes:
test:
name: test_data
driver: local
driver_opts:
type: nfs
o: addr=[nfs ip],rw,nfsvers=4
device: ":/Share/test"
I have access to this share via fstab
and can access it via Linux and Windows hosts freely.
However, when trying to put up the container with docker compose, I get the following error:
ERROR: for web Cannot create container for service web: failed to chmod on /var/lib/docker/volumes/test_data/_data: chmod /var/lib/docker/volumes/test_data/_data: operation not permitted
I’ve also tried using NFSv3, creating the container on a different system, and creating the volume manually first and setting it as external.
I’ve also seen suggestions to turn on the no_squash_root
flag on the NFS share, but I’ve come to understand it has security implications which I would like to avoid.
I’m not sure what I’m doing wrong - any pointers would be greatly appreciated.
Thanks!