
When the firewall is turned on, the host service cannot be accessed inside the docker container (services that can access other LAN computers other than the host). Solution:
1. Configure the firewall rule firewall-cmd --zone=public --add-port={port}/tcp --permanent, and reload the firewall rule firewall-cmd --reload
2. When starting the container Use --net host mode
3, turn off the firewall
For more related tutorials, please pay attention to the PHP Chinese websitedocker tutorial column.
The above is the detailed content of Docker container cannot access the host host. For more information, please follow other related articles on the PHP Chinese website!
The difference between k8s and docker
What are the methods for docker to enter the container?
What should I do if the docker container cannot access the external network?
What is the use of docker image?
Several ways to capture data
Eth market analysis today
Computer cannot copy and paste
Introduction to python higher-order functions