I cannot get the NFS volume mounted for Docker Swarm, and the lack of proper official documentation regarding the --mount syntax ( https://docs.docker.com/engine/reference/commandline/service_create/ ) does not help.
I basically tried this command line to create a simple nginx service with the / kkk directory installed on the NFS volume:
docker service create --mount type = volume, src = vol_name, volume-driver = local, dst = / kkk, volume-opt = type = nfs, volume-opt = device = 192.168.1.1:/your/nfs/path - -name test nginx
The command line is accepted and the service is assigned by Swarm, but the container never reaches the running state, and swarm tries to start a new instance every few seconds. I installed a daemon for debugging, but no errors regarding the volume displayed ...
What is the correct syntax for creating a service with an NFS volume?
Thank you so much
source
share