the application running in the container has access to the external network by default
It can only be accessed if a valid IP address is assigned to the container. Sometimes the IP that Docker chooses for the container can conflict with external networks.
By default, containers run on a bridge network, so look:
docker network inspect bridge
Locate the container and check its IP.
To resolve conflicts, you can configure the bridge network and set the bip parameter to change the range of network IP addresses (config file location depends on the host OS):
"bip": "192.168.1.5/24"
Or create a new docker network.
Or experiment with the net=host option: docker network settings
source share