docker exec -ti XXX_SERVER bash
[root@0f7053af28ff Server]# mount -a
I get this error:
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use ‘-o nolock’ to keep locks local, or start statd.
mount.nfs: Protocol not supported
@jeyzorus what you try to do is an anti-pattern: you soften the isolation just to be able to mount a remote share from inside the container… There is not much of the isolation left the way you try to do it.
Either use a docker volume baked by nfs to let docker manage the nfs mount for you (which is the prefered approach, nfsv4 will be less headache than nfsv3!) or mount your nfs share to a host folder and use a bind like @gonnagle suggest to mount the host folder into the container.
The 2nd approach will cause problems when the nfs share goes stale - the same way it does when a native host process accesses the mount point of a stale remote share.
docker run -it -d --name tt --mount source=synodatas,target=/home/XXX/DATA myimagecontainer
docker: Error response from daemon: invalid mount config for type “volume”: invalid mount path: ‘C:/Program Files/Git/home/XXX/DATA’ mount path must be absolute.
I dont know why target its not consider as the path into mycontainer…
Of course you need to make sure the process in the container either runs with the uid:gid of the exposed nfs share or the permissions are set loose that any process is able to write into it.
N.B.: once a volume is created its configuration is immutable! Whenever you change a volumes configuration in a compose file, you need to remove the volume and re-create it with the next execution of docker-compose up -d.
Make sure nfsv4 is enabled in your Syno (on DSM6.2.x you need to enable v4.1, on DSM7.x you need to enable v4) Make sure the fileshare’s NFS permissions allow the ip(-range) of docker engine’s ip.
When it commes to the error message with --mount: I have no idea. It doesn’t make sense to me, as target, destination or dst can be used to address the path inside the container. Must be a Docker Desktop for Windows speciality… not sure though, I don’t use DDfW.