dial tcp: lookup registry-1.docker.io: no such host / Temporary failure in name resolution during docker build
DNS isn’t working for the Docker daemon or inside build containers, so pulls and package downloads fail.
Seen on:
Docker
Meaning
Containers copy DNS settings from the host, but systemd-resolved (127.0.0.53), VPN DNS and corporate DNS often don’t work from inside containers. apt-get update then shows “Temporary failure resolving 'deb.debian.org'”, and FROM fails with “no such host”.
Common causes
- Host uses a local resolver (127.0.0.53) unreachable from containers
- VPN/corporate DNS not forwarded to Docker
- Network down or proxy required
- Docker Desktop VM DNS glitch
⚡ Quick fix
- Set DNS servers in daemon.json and restart Docker
- Build with --network host as a test
- Restart Docker Desktop
Detailed fix by platform
Docker
- bash
# /etc/docker/daemon.json { "dns": ["1.1.1.1", "8.8.8.8"] } sudo systemctl restart docker docker run --rm busybox nslookup deb.debian.org
How to diagnose
- Container DNS — docker run --rm busybox cat /etc/resolv.conf
- Lookup — docker run --rm busybox nslookup google.com
- Proxy — Is one required?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Docker
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026