Help Needed: Docker Containers Can't Resolve Domain Names on Bridge Network

Help Needed: Docker Containers Can’t Resolve Domain Names on Bridge Network

Hi everyone,

I’m having trouble with my Docker setup on my home server. My containers on the bridge network can ping IP addresses but cannot resolve domain names. However, when using the host network, everything works fine. Here are the details:

Issue Description

When I enter a container using the bridge network and try to ping an IP address (e.g.,, it works fine. However, attempting to ping a domain name (e.g., results in a temporary failure in name resolution.

Steps Taken

  1. Ping IP Address:

    root@pihole:/# ping
    PING ( 56(84) bytes of data.
    64 bytes from icmp_seq=1 ttl=113 time=47.4 ms
    64 bytes from icmp_seq=2 ttl=113 time=46.9 ms
    64 bytes from icmp_seq=3 ttl=113 time=46.8 ms
  2. Ping Domain Name:

    root@pihole:/# ping
    ping: Temporary failure in name resolution

Configuration Details

  • Host DNS Configuration:

    root@tanix-tx6:~# cat /etc/resolv.conf
    # Generated by NetworkManager
    nameserver 2001:4860:4860::8888
    nameserver 2001:4860:4860::8844
  • Docker Network:

    root@tanix-tx6:~# docker network inspect bridge
            "Name": "bridge",
            "Id": "70bb26ec3707789535bb7d3330dc37377a1c17a14816bead670221c9d9b93580",
            "Created": "2024-05-25T08:44:25.063899697Z",
            "Scope": "local",
            "Driver": "bridge",
            "EnableIPv6": false,
            "IPAM": {
                "Driver": "default",
                "Options": null,
                "Config": [
                        "Subnet": "",
                        "Gateway": ""
            "Internal": false,
            "Attachable": false,
            "Ingress": false,
            "ConfigFrom": {
                "Network": ""
            "ConfigOnly": false,
            "Containers": {
                "78134bf84c7ac332bcbf06b9c2b38463f42b9dfec2882a9a4f1ec79c0273f3b8": {
                    "Name": "memos",
                    "EndpointID": "df06ce0ce691d0e8a4f78972e41160047a621ae44d216a604fbf3238a94e04b9",
                    "MacAddress": "02:42:ac:11:00:03",
                    "IPv4Address": "",
                    "IPv6Address": ""
                "986bd055e8dfa4800a9aec4dfe0b7da669d57aa0a39c87511ce6fbf795ef7ffe": {
                    "Name": "deluge",
                    "EndpointID": "a9270181c59b93cea615e29bf6988b932c566749cdff6545f487a6010569ee31",
                    "MacAddress": "02:42:ac:11:00:02",
                    "IPv4Address": "",
                    "IPv6Address": ""
            "Options": {
                "": "true",
                "": "true",
                "": "true",
                "": "",
                "": "docker0",
                "": "1500"
            "Labels": {}

System Information

  • Docker Version: (e.g., 20.10.7)
  • Operating System: (e.g., Ubuntu 20.04 LTS)

Troubleshooting Steps

  1. Checked /etc/resolv.conf on the host and containers.
  2. Tried setting custom DNS servers in Docker daemon configuration.
  3. Restarted Docker service.

Does domain name resolution with DNS work inside other containers, without pihole? Is pihole configured correctly? What does docker info tell you?

same issue with every container.