I am working with docker swarm of three nodes.
In which there is a service “controller” which in turn invokes other containers on demand using python docker SDK. I am able to get it working by mounting /var/run/docker.sock:/var/run/docker.sock.
But now when I setup 3 replicas of “controller” service, constraining them to run each on unique host. I am not able to mount /var/run/docker.sock of each host in the docker swarm, which will enable the controller service to invoke container services on demand on each docker machine.
In other words, I want to target a host docker machine of the swarm, to invoke on-demand container via the controller service.
Can you please suggest any workaround for this problem?