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.
lookup registry-1.docker.io: no such hostTemporary failure resolvingTemporary failure in name resolutiondial tcp: lookup 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
- docker-credential-desktop error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
- pull access denied pull access denied for image, repository does not exist or may require 'docker login'
- unauthorized: authentication required unauthorized: authentication required (docker push / pull)
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 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.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026