Docker Community Forums

Share and learn in the Docker community.

How can I access to host local network from docker swarm in overlay mode?

swarm

(Loicd) #1

Hi,

I have a swarm with several docker containers, and an overlay network for communication between this containers.

From one mf my containers, I need to call an external web service (in the host local network).

I can call this web service from my host without any problem. But in my docker images, I can’t ping the 10.xx.xx.xx web service host.

My host ip is a 19.xx.xx.xx, the web service ip is 10.xx.xx.xx

I’ve tried this configuration but it’s not working :

networks:
hadoop:
driver: ‘overlay’
ipam:
config:
- subnet: 19.xx.xx.0/24

Is it possible to configure the swarm overlay network to be able to communicate with this web service?

Thanks :slight_smile: