How to connect to Network from Docker Container

Hi All,

I am working on Docker for Windows- version -17.06.0-ce.
I am unable to connect to network from Docker container.
Can anyone help me with the configuration settings so that I would be able to connect with Network

What exact error you facing while connecting to network?


It is giving error “No route to host” or “unknown host”. When I ping to
our proxy server/intranet server it replied saying " unable to reach

Sayali Kandharkar
Tata Consultancy Services

sudo docker run -p 8000:80 -t -i --dns d41c71c0a7fc
This command should be used if you are inside a network of connections. It allows you to access Internet inside the container. --dns specifies the general ip of your network

As a temporary solution to achieve Internet access if not attainable inside the container
Add the IP that you need to access to etc/hosts.

In my scenario, I couldn’t run apt-get update since there was no Internet access.

echo “” >> /etc/hosts
cat /etc/hosts
apt-get update