Home > Article > Operation and Maintenance > The docker container cannot access the external network through HTTP
The phenomenon is as follows:
1. The internal/external network IP and domain name can be pinged
2. The container cannot access the internal network where the host is located And external web services (404)
3. Check the return header information through curl. It seems that all web requests are forwarded to a fixed Nginx server
4. All containers (including newly created ) the above problems occur
The solution is as follows:
The problem can be solved by rebuilding the docker0 network.
The command is as follows:
$ sudo service docker stop $ sudo pkill docker $ sudo iptables -t nat -F $ sudo ifconfig docker0 down $ sudo brctl delbr docker0 $ sudo service docker start
Recommended related tutorials: docker tutorial
The above is the detailed content of The docker container cannot access the external network through HTTP. For more information, please follow other related articles on the PHP Chinese website!