Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io: no such host
Docker can't resolve the registry hostname
Seen in docker pull, docker login, docker build, Docker Desktop, WSL
The Docker daemon's DNS lookup for the registry failed, so it never got an address to connect to.
Common causes
- The host's resolver (often 127.0.0.53 with systemd-resolved) is not working or points at an unreachable server.
- A VPN changed DNS settings, or WSL generated a broken resolv.conf.
- Corporate DNS only resolves external names through a proxy.
How to fix it
- Check DNS on the host: nslookup registry-1.docker.io and cat /etc/resolv.conf.
- Give the daemon working DNS servers in /etc/docker/daemon.json ("dns": ["1.1.1.1", "8.8.8.8"]) and restart Docker.
- Restart Docker Desktop or WSL after changing networks or VPNs.
Got a different message? Paste it into the error explainer.
Related errors
- fatal: unable to access '...': Could not resolve host: github.com · Git can't resolve the remote's hostname
- getaddrinfo EAI_AGAIN registry.npmjs.org · npm couldn't resolve the registry hostname
- fatal: unable to access '...': SSL certificate problem: unable to get local issuer certificate · Git can't verify the server's certificate
- error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 · The push is larger than the server or proxy accepts
- error: RPC failed; curl 18 transfer closed with outstanding read data remaining · The connection dropped during a git transfer
- fatal: the remote end hung up unexpectedly · The Git server closed the connection
- kex_exchange_identification: Connection closed by remote host · The SSH server closed the connection before the handshake
- Permission denied (publickey) · The server rejected every SSH key you offered
- Host key verification failed. · SSH couldn't confirm the server's identity
- WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! · The server's SSH host key is different from last time
- Unable to negotiate with 203.0.113.10 port 22: no matching host key type found. Their offer: ssh-rsa · The server only offers an old host key type
- Unable to negotiate with 203.0.113.10 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 · Client and server share no key exchange algorithm