Docker containers lose DNS after laptop resumes from sleep
Environment
Fedora 41, Docker Engine and NetworkManager on Wi-Fi.
What happens
Containers cannot resolve hostnames after resume, while DNS still works on the host.
What I have tried
Restarting each container works temporarily; changing public DNS servers does not.
I would appreciate advice on how to identify the root cause without risking existing data or configuration.
Verified community troubleshooting
The logs and behaviour point in the same direction here.
Likely cause: Docker keeps a stale resolver and bridge state after the host network interface changes.
What I would try: Restart Docker after NetworkManager reconnects or add a systemd sleep hook that refreshes Docker networking on resume.
Document the original value before changing it and restore it if the symptom remains.
I had not considered that component. I will verify its state before replacing any hardware.
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Virtualization37% match
Docker containers lose DNS resolution after laptop resume on Ubuntu 22.04 due to systemd-resolved stub resolver change
Open0 answers - Linux25% match
Docker containers see config file permission change after editor 'atomic save' — bind-mounted file temporarily unreadable until container restart
Open0 answers - Linux25% match
Ubuntu 22.04 host suspend/resume breaks LXD container veth interfaces — containers lose external network
Open0 answers - Servers21% match
After a kernel upgrade Docker containers get 'permission denied' writing to bind-mounted volumes (overlay2/overlayfs change)
Open0 answers