Client.Timeout exceeded 🐳 Docker

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

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

Seen on: Docker

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

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 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.