# Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded)

**Code:** `Client.Timeout exceeded` · **Category:** Docker · **Seen on:** Docker

Docker couldn’t reach the registry in time — a network, DNS, proxy or firewall problem between your machine and the registry.

## Meaning

The Docker daemon (not your shell) makes registry requests, so proxies set only in your terminal don’t apply. Corporate proxies, VPNs, IPv6 problems and DNS failures are the usual causes.

## Common causes

- Corporate proxy not configured for the Docker daemon
- DNS can’t resolve registry hosts
- Firewall/VPN blocking outbound 443
- Flaky IPv6 route

## Quick fix

1. Configure the daemon proxy (Docker Desktop → Resources → Proxies, or systemd drop-in)
2. Set DNS in daemon.json
3. Retry off the VPN to confirm

## Detailed fix by platform

### Linux

1. 

```bash
sudo mkdir -p /etc/systemd/system/docker.service.d
printf '[Service]
Environment="HTTPS_PROXY=http://proxy:3128"
' | sudo tee /etc/systemd/system/docker.service.d/proxy.conf
sudo systemctl daemon-reload && sudo systemctl restart docker
```


### Docker

1. 

```bash
# /etc/docker/daemon.json
{ "dns": ["8.8.8.8", "1.1.1.1"] }
```


## How to diagnose

1. **Reach** — curl -v https://registry-1.docker.io/v2/ from the host
2. **Proxy** — docker info | grep -i proxy
3. **DNS** — nslookup registry-1.docker.io

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/docker/registry-client-timeout)
