Docker and NFS Share

Thanks Meyay for your complete answer and your examples.
I tried both but i still have a permission issue.

To illustrate that :

If i use local folder within my yml file it’s all good.

When using the external method or by creating directly the volume within the compose file (which is the best way i agree with you) i get the same result which is :

seafile | *** Running /etc/my_init.d/01_create_data_links.sh...
seafile | mv: failed to preserve ownership for ‘/shared/logs/var-log/apt/eipp.log.xz’: Operation not permitted
seafile | mv: failed to preserve ownership for ‘/shared/logs/var-log/apt/history.log’: Operation not permitted
seafile | mv: failed to preserve ownership for ‘/shared/logs/var-log/apt/term.log’: Operation not permitted
seafile | mv: failed to preserve ownership for ‘/shared/logs/var-log’: Operation not permitted
seafile | *** Running /etc/my_init.d/10_syslog-ng.init…
seafile | /bin/chown: changing ownership of ‘/var/log’: Operation not permitted
seafile | *** /etc/my_init.d/10_syslog-ng.init failed with status 1
seafile |
seafile | *** Killing all processes…

All the users of my systems have read/write access, this NFS share is “all users mapped to admin” :

root@Seafile:~# touch /mnt/Seafile/Seafile/DATA/TEST_ROOT
nuc@Seafile:~$ touch /mnt/Seafile/Seafile/DATA/TESTNUCUSER
nuc@Seafile:~$ ls -la /mnt/Seafile/Seafile/DATA/
total 16
drwxrwxrwx 3 1024 users 4096 Oct 12 21:55 .
drwxrwxrwx 3 1024 users 4096 Oct 12 21:51 …
drwxrwxrwx 4 1024 users 4096 Oct 12 21:51 logs
-rwxrwxrwx 1 1024 users 0 Oct 12 21:55 TESTNUCUSER
-rwxrwxrwx 1 1024 users 0 Oct 12 21:55 TEST_ROOT

I don’t understand why containers are not able to work with this NFS share…
Thanks