How disabled mount nfs volume to start container

I createad a docker with mount nfs and it is working fine but when a have some problems with my nfs share and a tried to restart the container a receive a error

Error response from daemon: error while mounting volume ‘/var/lib/docker/volumes/Ast16/_data’: failed to mount local volume: mount :/mnt/Backup/backup-Ast16/monitor/:/var/lib/docker/volumes/Ast16/_data, data: addr=192.168.88.222,vers=4,soft: no such file or directory
Error: failed to start containers: Ast16

and the container not start.

I would like to know how can i disable the volume of nfs share in my docker container to start the container normally when a have this kind of problem with my nfs server.

some can help me? I don’t know what to do…

You first post is ambigous, which usualy leads to no response.

Are you using volume with the local driver of type nfs?
Please share the commands your used and their output.

Yes, I use a local drive of type nfs, with this command

docker run -it --privileged -d --net=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro --mount "src=CLIENTE,dst=/var/spool/asterisk/monitor/rede,volume-opt=device=:/mnt/Backup/backup-CLIENTE/monitor/,“volume-opt=o=addr=192.168.88.222,vers=4,soft”,type=volume,volume-driver=local,volume-opt=type=nfs --restart=always --hostname=CLIENTE --name=CLIENTE oi/image

the problem is when my server 192.168.88.222 is down and a tried to start a container or restart for any reason I can’t start the container and receive a error like this:

Error response from daemon: error while mounting volume ‘/var/lib/docker/volumes/Ast16/_data’: failed to mount local volume: mount :/mnt/Backup/backup-Ast16/monitor/:/var/lib/docker/volumes/Ast16/_data, data: addr=192.168.88.222,vers=4,soft: no such file or directory
Error: failed to start containers: Ast16

I want to disable the volume if it is possible to start the container if my server nfs is down.

Afaik even though there is docker container update it is restricted to cpu/ram/io modifications and the restart policy.

You will need to delete your container and create a new one without the volume. Since containers are ment to be disposable/ephemeral there is nothing wrong in deleting the old container and creating a new one without the volume.

Docker doesn’t support what you ask for - though, it would totaly make sense to modify volumes on a stopped container… If its possible to atach/detach networks, why shouldn’t the same be implemented for volumes…

Update: they implemented it for swarm services: https://docs.docker.com/engine/reference/commandline/service_update/#add-or-remove-mounts. Basicly, this will be the managed version of delete the current container and re-create a new one… though, with the difference that it is managed by the swarm service.