0

I'm running two services in a single-node Docker Swarm, both in the same stack. Service A needs to be in host networking mode in order to use the ipv6 tunnel configured on the host machine, and service B needs to talk to service A.

Back when A didn't need to use the host networking mode, B was able to reach A by using the service name as the hostname, but it doesn't seem to be the case anymore.

I've tried to use docker0 as described here, without any success.

How can I reach that host-networked service from another service in the same stack?

Pedro Fracassi
  • 3,342
  • 2
  • 16
  • 33
  • I'm not sure if this is possible in Swarm mode. If A is using host networking then it will only be accessible via its host's IP address or DNS name, not using any Docker-internal networking mechanics, but in Swarm mode I don't think it's easy to predict which node the container will be on. – David Maze Sep 15 '20 at 16:05
  • @DavidMaze we run a single-node swarm, so it should be fine. I really just need a way to loopback to the host's IP from inside a container, I guess. – Pedro Fracassi Sep 15 '20 at 17:31

0 Answers0