I just installed docker on CentOS 8. Everything went fine, I’ve run the hello_world test container and the result was successful.
The issue is that inside the containers I cannot resolve any DNS queries. For example when I type
ping 220.127.116.11 (on any kind of base container such as ubuntu os centOS) i get the correct answer but when I try running
ping google.com I don’t get any answer, meaning that the container is unable to resolve the DNS for any URL.
I’ve also tried running a base container like this:
docker run busybox ping -c 1 18.104.22.168
ang I’m getting this (correct) output:
[server@localhost ~]$ docker run busybox ping -c 1 22.214.171.124 PING 126.96.36.199 (188.8.131.52): 56 data bytes 64 bytes from 184.108.40.206: seq=0 ttl=51 time=32.413 ms --- 220.127.116.11 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max = 32.413/32.413/32.413 ms
But now trying resolving the domain
google.com with the command:
docker run busybox nslookup google.com
I get this output:
I’m finding this problem really frustrating since I’ve not found a way to solve it, so please help me
Tell me which command to run to get any info you’d find useful to help me solve this issue, I’ll post it here asap.