Docker Community Forums

Share and learn in the Docker community.

Ping / Reach host IP from inside bridge container


(Dockern00bits) #1

Hey Guys

New to docker…

So If my docker is running on a machine which has IP 192.168.1.1 (NAS) and I have a docker on a bridge mode which is giving it an IP 172.17.0.2 (example). How do I reach 192.168.1.1 from within the container?

Basically running several containers… I am trying to reach a mysql DB container (which is running host mode and thus IP of 192.168.1.1) from another container running on bridge mode (i.e. container IP is 172.17.0.2)