Unable To Access Network From Docker Container

Home » CentOS » Unable To Access Network From Docker Container
CentOS 4 Comments

I have recently installed docker and playing around with it. On a CentOS 7 machine, however, I am unable to get access to the outside internet, thus yum … fails. The host machine runs fine.

I am wondering if there are some networking setting on the host I need to modify to allow the docker container to connect to the outside?

4 thoughts on - Unable To Access Network From Docker Container

  • Resolved the issue by rebooting the computer but had to do that again later today. Does anyone have experience with docker under CentOS 7?

  • Which ip range do you use in your network? Maybe this overlaps with the docker default ip range (172.18.0.1/16).

    best regards Ulf

  • Lots of people have experience, and it works well.  I believe the issue you are seeing, is that the Firewall rules are being modified and something is removing the rule that Docker adds to allow containers to use the host machines network interface.  When you reboot and restart the Docker daemon and the container, the network is correct again, but some tool (Firewalld) or something else is mucking around with the iptables.