Failed to create a service with an existant volume

if I use the bind feature to bind a NFS share to my service the containe will be created successful
/nfs_data/container: /usr/share/nginx/html

if I create a new volume within the portainer-gui with the ip-address of my NAS and /nfs/container as mount point the volume will be created and shown as unused.
so far so good, but when I try to create a new service this attempt failes with state rejected.
Error message of task details:
failed to mount local volume: mount :/nfs_data/container:/var/lib/docker/volumes/NGINX-Volume/_data, flags: 0x400, data: addr=,rsize=8192,wsize=8192,tcp,timeo=14,nfsvers=4: no such file or directory

Here’s a template that should work for FreeNAS/TrueNAS which is NFSv4-based. To troubleshoot, make sure to check that the volume is being mounted inside the container.
“docker exec -it mycontainer /bin/bash” (or similar depending on exact container path to console) to get console and then run mount on the docker container’s console. If the NFS shows in the mount, then you’re done.

#!/usr/bin/env bash



echo "==> stopping "${name}
sudo docker stop ${name}
echo "==> removing old "${name}" container"
sudo docker rm ${name}
echo "==> removing old images"
sudo docker image prune -f
echo "==> removing old volumes"
sudo docker volume rm `docker volume ls -q -f dangling=true`
echo "==> pulling new "${name}" container"
sudo docker pull ${image}

sudo docker create \
    --name=${name} \
    --net=host \
    -e PUID=1000 \
    -e PGID=1000 \
    -v /home/docker/someapp/config:/config \
    --mount type=volume,dst=/mydata,volume-driver=local,volume-opt=type=nfs,\"volume-opt=o=nfsvers=4,addr=${NAS}\",volume-opt=device=:${NAS_DATA} \
    --restart unless-stopped \

sudo docker start ${name}