What I want:
Home server shall run Docker, but use storage of NAS via NFS.
What I have:
NFS share is set up, but Docker containers still complain about insufficient privileges.
Details:
NAS has a user 1038:65544. /volume1/sharedstuff has been chowned to 1038:65544.
Server also has a user 1038:65544.
All the docker-compose.yml files (on NAS and on server) specify these PUID and PGID.
On my NAS (Synology DS916+), I have an NFS share, configured via the NAS GUI. /etc/exports shows:
/volume1/sharedstuff 192.168.1.10(rw,async,no_wdelay,crossmnt,insecure,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100) (I'm guessing that these anon_id's are wrong?)
On my home server (Ubuntu 22.10), I manually mounted this share (it's not in fstab yet). mount | grep sharedstuff shows:
192.168.1.11:/volume1/sharedstuff on /mnt/sharedstuff type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.10,local_lock=none,addr=192.168.1.11)
Docker containers on the server complain during first run, e.g.
/usr/sbin/mariadbd: Can't change dir to '/var/lib/mysql/' (Errcode: 13 "Permission denied") or 2022-12-31 21:13:57 0 [Warning] Can't create test file /var/lib/mysql/dcf3fe5a6fe7.lower-test
What more do I have to do?