Docker Community Forums

Share and learn in the Docker community.

Connection to container in Swarm from another host within the Swarm

docker
swarm

(Ipasrdrd) #1

Hi,

I have a problem that might have either a simple or no solution.

I have 2 computers running docker in a swarm. Computer A is the manager and runs a service on itself and another one on computer B. If I attach to the containers locally, I can ping the respective container/service from the other one. But, I want to be able to ping/contact container/service on computer B from computer A. I can ping each container from its respective computer but not from another one.

I already tried to set a static IP route (tell it to find the overlay network through the gwbridge), without much success.

Is there anyone who has some help, hint or answer to this problem? Is that even possible?

Thanks in advance!


(Cmooney) #2

Could you provide the configuration or service create commands you are using to set up the containers? Could you also provide the command you used to set up the overlay network?

The devil is always in the details :slightly_smiling_face: