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


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 :

driver: ‘overlay’
- 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: