docker container switch from one node to another node without draining or restarting the node
docker container switch from one node to another node without draining or restarting the node How to switch docker container from one node to another node without draining or restarting the node. As everytime I kill container or set docker container unhealthy , the container is started on same node. Purpose of this is to overcome frequent restart of docker on same node? 1 Answer 1 To specify a node for a container / service you need to specify a constraint docker service create --name myname --constraint 'node.hostname == dahostname' myimage docker service create --name myname --constraint 'node.hostname == dahostname' myimage https://docs.docker.com/engine/reference/commandline/service_create/#specify-service-constraints---constraint and https://docs.docker.com/engine/reference/commandline/service_update/#options By clicking "Post You...