Docker DNS is not working (edit: fixed by stopping firewalld)

Hello there, I have been a Manjaro user on desktop and server for a couple years now and this is the first time I've needed to ask for help, so thank you for that :wink:

Currently, my docker containers don't have access to DNS services. For example:

~ >>> curl                                                                                                                             
  "user-agent": "curl/7.67.0"
~ >>> docker run -it archlinux/base bash                                                                                                                           [1]
[root@9b8d1aa0da32 /]# curl
curl: (6) Could not resolve host:
[root@9b8d1aa0da32 /]# cat /etc/resolv.conf
# Generated by NetworkManager
[root@c2c63431e25a /]# exit
~ >>> cat /etc/resolv.conf                                                                                                                                            
# Generated by NetworkManager

...why? How do I fix this? But more importantly, why?

I just thought to check and I am able to ping from inside the container. However, predictably, nc -z 53 fails (that is, I can't reach the IP on port 53).

The problem seems to have cleared up by running

sudo systemctl stop firewalld
sudo systemctl restart docker

Does anyone have some advice on a more permanent fix?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by