Hi,
I am using docker v24 on ubuntu 22.04, and everything was working for a year until recently. The dns resolution broke down on containers that use default bridge network. The host network, and a newly created custom bridge network also work as expected. Any container starting on default bridge, will not resolve any dns.
Ubuntu uses netplan, and here are my 2 netplan config files.
# default one
network:
ethernets:
ens192:
addresses:
- 10.12.0.10/24
gateway4: 10.12.0.1
nameservers:
addresses:
- 8.8.8.8
search: []
version: 2
# secondary one (for some nfs nas connection)
network:
ethernets:
ens224:
addresses:
- 10.191.241.103/21
gateway4: 10.191.240.1
nameservers:
addresses:
- 8.8.8.8
search: []
version: 2
Host resolv.conf:
nameserver 127.0.0.53
options edns0 trust-ad
search .
The container on default bridge network resolv.conf (not working):
nameserver 8.8.8.8
nameserver 8.8.8.8
search .
The container on custom bridge network resolv.conf (it works):
nameserver 127.0.0.11
options edns0 trust-ad ndots:0
The default bridge network:
[
{
"Name": "bridge",
"Id": "918b3a55ef92c5e6d2d00fdddf331a9afff4bfaf5a1067c5c08810f277064f5f",
"Created": "2024-10-18T14:32:35.329498902+03:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
The custom bridge network:
[
{
"Name": "my_custom_network",
"Id": "3f859cff5f98feafb5131b3391ebfea4570b4499362fa9e3a8a0fbd2fb23cbdc",
"Created": "2024-10-18T15:17:28.355709568+03:00",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.20.0.0/16",
"Gateway": "172.20.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {},
"Options": {},
"Labels": {}
}
]
I haven’t touched the server for a long time, except running apt upgrade a few times. I dont understand why it stopped working. Tried changing a few settings and dns addresses with no luck. Does anybody have any idea?
Thanks in advance.