Search code examples
dockernetwork-programmingdocker-composedockerfilehost

Docker container has no internet: network host or ISP problem


I need help finding a way to access the internet in my docker container.

I changed ISP a few days ago and since then when I 'make up' the microservices of my project, no one container has access to the internet.

After many attempts, I tried this:

--net = host (in the docker run)
--network = host (when I build the image)
network_mode = "host" (in the docker-compose)

And finally I get access to the internet from the containers, but now I can't access to the urls of my services.

Any suggestions ...


Solution

  • Well, I contacted my ISP for connection problems with my docker containers, and they explained to me that they do not support them. Answer: Change ISP.