I want to connect to host from inside the container, given that host ip is non-static. I don't want to use the host network. I am using docker-compose to manage the containers.
Asked
Active
Viewed 66 times
2
-
add your dns server to the container – LinPy Oct 11 '19 at 10:29
-
@LinPy how can we do it? – Shirish Bajpai Oct 11 '19 at 10:36
-
2https://docs.docker.com/v17.09/engine/userguide/networking/default_network/configure-dns/ – LinPy Oct 11 '19 at 10:37
-
your IP might change but docker creates its own network and can be always reached by connecting to 172.17.0.1. You can simply check the docker0 network – Stefano Oct 11 '19 at 10:52