docker
network_error
ai_generated
partial
Could not resolve host / Temporary failure in name resolution
ID: docker/dns-resolution-failed
80%Fix Rate
85%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 27 | active | — | — | — |
Root Cause
Container can't resolve DNS. Common during build (apt-get) or runtime (API calls).
genericWorkarounds
-
90% success Specify DNS server: docker run --dns 8.8.8.8
docker run --dns 8.8.8.8
Sources: https://docs.docker.com/engine/daemon/networking/#dns-services
-
88% success Check Docker daemon DNS config in /etc/docker/daemon.json
{"dns": ["8.8.8.8", "8.8.4.4"]}Sources: https://docs.docker.com/engine/daemon/networking/#dns-services
-
82% success If on corporate VPN, use VPN's DNS server instead of public DNS
# In Docker daemon config (/etc/docker/daemon.json): { "dns": ["10.0.0.2", "8.8.8.8"] } # Replace 10.0.0.2 with your VPN/corporate DNS sudo systemctl restart docker
Dead Ends
Common approaches that don't work:
-
Hardcode IP addresses
80% fail
IPs change — this is fragile and breaks when servers move
-
Disable network isolation
70% fail
Loses container network security