How to fix Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp connection refused in Docker

DockerBEGINNERMEDIUMUpdated Dec 6, 2025· 209 views

This error occurs when Docker is configured to use a proxy server, but the proxy is unreachable or not running. The Docker daemon cannot connect to Docker Hub or other registries through the specified proxy, resulting in image pull and push failures.

Quick fix

Fixes Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp connection refused

Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp 127.0.0.1:8080: connect: connection refused
  1. Identify the proxy address in the error message
  2. Check and unset proxy environment variables
  3. Remove proxy settings from Docker Desktop (Windows/macOS)
  4. Remove proxy settings from Docker daemon (Linux)
docker — error
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp 127.0.0.1:8080: connect: connection refused
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp connection refused

What this error means

The "proxyconnect tcp: dial tcp connection refused" error indicates that Docker is attempting to route its network traffic through a proxy server, but the connection to that proxy is being actively refused. This typically happens when: - A proxy is configured in Docker's settings, but the proxy server is not running or is unreachable - Environment variables (HTTP_PROXY, HTTPS_PROXY) are set to a proxy address that no longer exists - Docker Desktop has stale or incorrect proxy settings from a previous network configuration - You've moved from a corporate network (with proxy) to a home network (without proxy) but Docker still has the old settings The error message contains the proxy IP address and port (e.g., `127.0.0.1:8080` or `192.168.65.1:3128`), which helps identify whether the issue is with a local proxy, corporate proxy, or Docker Desktop's internal proxy configuration. This is different from a general "connection refused" error - this specifically indicates the proxy connection is failing, not the connection to Docker Hub itself.

Typical symptoms

  • Docker pull commands fail with 'proxyconnect tcp: dial tcp... connection refused'
  • Cannot pull images from Docker Hub or other registries
  • Docker login fails with proxy connection errors
  • Docker build fails when downloading base images
  • Error message shows a proxy IP address (often 127.0.0.1:8080 or 192.168.65.1:3128)
  • Commands work when connected to corporate network but fail at home
  • Docker Desktop shows proxy-related errors in logs

Common causes

  1. Proxy server is not running but Docker is configured to use it
  2. Stale proxy settings in Docker Desktop from a previous network environment
  3. HTTP_PROXY or HTTPS_PROXY environment variables pointing to an unavailable proxy
  4. Corporate proxy requires authentication but credentials are not configured
  5. Docker daemon systemd configuration has outdated proxy settings
  6. Moved from corporate network (with proxy) to home network (without proxy)
  7. VPN disconnected but proxy settings remain active
  8. Docker Desktop auto-detected incorrect proxy from WPAD/PAC settings
  9. Proxy configuration in daemon.json pointing to wrong address or port

How to fix "Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp connection refused"

1Identify the proxy address in the error message

First, examine the error message to understand which proxy Docker is trying to use:

bash
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp 127.0.0.1:8080: connect: connection refused

The IP address and port (e.g., 127.0.0.1:8080) tells you:
- 127.0.0.1 or localhost: A local proxy (like a corporate proxy client or development tool)
- 192.168.65.1: Docker Desktop's internal gateway (common on Windows/macOS)
- 10.x.x.x or 192.168.x.x: A network proxy on your local network
- Corporate IP ranges: Your organization's proxy server

Knowing the source helps determine which configuration to fix.

2Check and unset proxy environment variables

Proxy settings in environment variables override other configurations. Check and remove them if you don't need a proxy:

Check current proxy settings:

bash
# Linux/macOS
echo "HTTP_PROXY: $HTTP_PROXY"
echo "HTTPS_PROXY: $HTTPS_PROXY"
echo "http_proxy: $http_proxy"
echo "https_proxy: $https_proxy"
echo "NO_PROXY: $NO_PROXY"

# Windows PowerShell
echo $env:HTTP_PROXY
echo $env:HTTPS_PROXY

Unset proxy variables temporarily:

bash
# Linux/macOS
unset HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy

# Windows PowerShell
$env:HTTP_PROXY = ""
$env:HTTPS_PROXY = ""

Test if Docker works now:

bash
docker pull hello-world

If this works, remove the proxy settings from your shell configuration files (~/.bashrc, ~/.zshrc, ~/.profile) or Windows environment variables.

3Remove proxy settings from Docker Desktop (Windows/macOS)

Docker Desktop can have its own proxy configuration that persists across sessions:

Docker Desktop on Windows/macOS:
1. Open Docker Desktop
2. Click the gear icon (Settings)
3. Go to Resources > Proxies
4. Check if Manual proxy configuration is enabled
5. Either:
- Disable it if you don't need a proxy
- Update the proxy address if your proxy has changed
- Switch to "Use system proxy" if your OS handles proxies correctly
6. Click Apply & Restart

Alternative: Edit Docker Desktop settings file directly

On Windows:

powershell
# Settings file location
notepad "$env:APPDATA\Docker\settings.json"

On macOS:

bash
# Settings file location
open ~/Library/Group\ Containers/group.com.docker/settings.json

Look for and remove or correct proxy settings in the JSON file.

4Remove proxy settings from Docker daemon (Linux)

On Linux, Docker daemon proxy settings are often configured via systemd. Remove or update them:

Check for systemd proxy configuration:

bash
# List Docker service drop-in files
ls -la /etc/systemd/system/docker.service.d/

# View proxy configuration if it exists
cat /etc/systemd/system/docker.service.d/http-proxy.conf 2>/dev/null
cat /etc/systemd/system/docker.service.d/https-proxy.conf 2>/dev/null

Remove proxy configuration:

bash
# Remove proxy drop-in files
sudo rm -f /etc/systemd/system/docker.service.d/http-proxy.conf
sudo rm -f /etc/systemd/system/docker.service.d/https-proxy.conf

# Or move them for backup
sudo mv /etc/systemd/system/docker.service.d/http-proxy.conf ~/http-proxy.conf.bak

Reload and restart Docker:

bash
sudo systemctl daemon-reload
sudo systemctl restart docker

Verify proxy settings are removed:

bash
sudo systemctl show --property=Environment docker
# Should not show HTTP_PROXY or HTTPS_PROXY
5Check and update daemon.json proxy settings

Docker Engine 23.0+ supports proxy configuration in daemon.json:

Check daemon.json:

bash
# Linux
cat /etc/docker/daemon.json

# Windows
type "%PROGRAMDATA%\docker\config\daemon.json"

# macOS (Docker Desktop stores this internally)
cat ~/Library/Group\ Containers/group.com.docker/settings.json

Remove proxy settings from daemon.json:

If you see a "proxies" section, remove it or update it:

json
{
  "proxies": {
    "http-proxy": "",
    "https-proxy": "",
    "no-proxy": ""
  }
}

Or remove the entire "proxies" block.

Restart Docker:

bash
# Linux
sudo systemctl restart docker

# Windows/macOS
# Restart Docker Desktop
6Configure correct proxy settings (if you need a proxy)

If you're behind a corporate proxy and need to configure Docker properly:

Method 1: Docker Desktop (Windows/macOS)
1. Open Docker Desktop Settings
2. Go to Resources > Proxies
3. Enable "Manual proxy configuration"
4. Enter your proxy details:
- HTTP Proxy: http://proxy.company.com:8080
- HTTPS Proxy: http://proxy.company.com:8080
- No Proxy: localhost,127.0.0.1,.company.com
5. Apply & Restart

Method 2: systemd drop-in (Linux)

bash
sudo mkdir -p /etc/systemd/system/docker.service.d

sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf << EOF
[Service]
Environment="HTTP_PROXY=http://proxy.company.com:8080"
Environment="HTTPS_PROXY=http://proxy.company.com:8080"
Environment="NO_PROXY=localhost,127.0.0.1,.company.com,docker-registry.local"
EOF

sudo systemctl daemon-reload
sudo systemctl restart docker

Method 3: daemon.json (Docker 23.0+)

json
{
  "proxies": {
    "http-proxy": "http://proxy.company.com:8080",
    "https-proxy": "http://proxy.company.com:8080",
    "no-proxy": "localhost,127.0.0.1,.company.com"
  }
}
7Handle proxy authentication

If your corporate proxy requires authentication:

Include credentials in the proxy URL:

bash
# Format: http://username:password@proxy:port
HTTP_PROXY=http://myuser:mypassword@proxy.company.com:8080

For systemd:

bash
sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf << EOF
[Service]
Environment="HTTP_PROXY=http://myuser:mypassword@proxy.company.com:8080"
Environment="HTTPS_PROXY=http://myuser:mypassword@proxy.company.com:8080"
EOF

sudo systemctl daemon-reload
sudo systemctl restart docker

Special characters in passwords:
If your password contains special characters, URL-encode them:
- @ becomes %40
- : becomes %3A
- # becomes %23
- ! becomes %21

Example: Password p@ss:word! becomes p%40ss%3Aword%21

Security note: Storing credentials in environment variables or config files has security implications. Consider using a credential helper or secrets management for production environments.

8Test proxy connectivity before configuring Docker

Before configuring Docker, verify you can reach the proxy and Docker Hub through it:

Test if the proxy is reachable:

bash
# Check if proxy port is open
nc -zv proxy.company.com 8080
# or
telnet proxy.company.com 8080

Test proxy with curl:

bash
# Without proxy (direct connection)
curl -v https://registry-1.docker.io/v2/

# With proxy
curl -v --proxy http://proxy.company.com:8080 https://registry-1.docker.io/v2/

# With authenticated proxy
curl -v --proxy http://user:password@proxy.company.com:8080 https://registry-1.docker.io/v2/

Expected responses:
- Without proxy on corporate network: Connection timeout or refused
- With correct proxy: HTTP 401 Unauthorized (this is good - means Docker Hub is reachable)
- With wrong proxy address: Connection refused (the error you're fixing)

Check DNS resolution:

bash
nslookup registry-1.docker.io
# Should return valid IP addresses
9Reset Docker Desktop to factory defaults (last resort)

If proxy settings are deeply embedded and hard to find, resetting Docker Desktop can clear them:

Warning: This will remove all containers, images, volumes, and configurations. Back up important data first.

Docker Desktop on Windows:
1. Open Docker Desktop
2. Click the bug icon (Troubleshoot)
3. Click Reset to factory defaults
4. Confirm the reset
5. Reconfigure Docker as needed

Docker Desktop on macOS:
1. Open Docker Desktop
2. Click the bug icon (Troubleshoot)
3. Click Reset to factory defaults
4. Or from menu: Troubleshoot > Reset to factory defaults

Alternative: Clean uninstall and reinstall

bash
# macOS - remove all Docker Desktop data
rm -rf ~/Library/Group\ Containers/group.com.docker
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/.docker

# Then reinstall Docker Desktop

After reset, Docker should start with no proxy configuration, using direct connections.

Advanced notes

Understanding Docker's proxy architecture:

Docker has multiple places where proxy settings can be configured, and they affect different operations:

1. Docker daemon proxy (systemd or daemon.json): Affects image pulls/pushes from the daemon
2. Docker CLI proxy (~/.docker/config.json): Affects CLI operations
3. Container proxy (build args or config.json): Affects network requests inside containers
4. Docker Desktop proxy: GUI settings that configure the daemon

Proxy auto-detection issues:

Docker Desktop on Windows and macOS can auto-detect proxies using:
- System proxy settings
- WPAD (Web Proxy Auto-Discovery)
- PAC (Proxy Auto-Config) files

This can cause issues when:
- Your system has stale WPAD entries
- PAC file returns different proxies for different URLs
- Corporate proxy detection conflicts with home network

To disable auto-detection in Docker Desktop:
1. Go to Settings > Resources > Proxies
2. Disable "Use the system proxy settings" or similar
3. Either configure manual proxy or leave proxy settings empty

Debugging proxy issues:

Enable Docker daemon debug logging:

bash
# Add to daemon.json
{
  "debug": true
}

# View daemon logs
journalctl -u docker -f

NO_PROXY configuration:

The NO_PROXY variable is important for avoiding proxy loops and accessing internal resources:

bash
NO_PROXY=localhost,127.0.0.1,::1,.local,.internal,192.168.0.0/16,10.0.0.0/8

Important entries:
- localhost,127.0.0.1: Local connections
- .company.com: Internal company domains
- Docker registry addresses
- Kubernetes service domains (.svc.cluster.local)

CIDR notation in NO_PROXY:

Some systems support CIDR notation (e.g., 192.168.0.0/16), but Docker doesn't always handle it well. Use domain suffixes where possible.

Transparent proxies:

Some corporate networks use transparent proxies that intercept traffic without explicit configuration. These can cause certificate errors. Contact your network administrator if you suspect this is happening.

Proxy vs VPN:

If you use a VPN:
- VPN might route traffic differently than proxy
- Some VPNs block Docker Hub
- Split-tunnel VPNs might send Docker traffic on wrong interface
- Check if Docker works with VPN disconnected

Frequently asked questions

What does "Error response from daemon: Get https://registry-1.docker.io/v2/: prox" mean?
The "proxyconnect tcp: dial tcp connection refused" error indicates that Docker is attempting to route its network traffic through a proxy server, but the connection to that proxy is being actively refused. 1:3128), which helps identify whether the issue is with a local proxy, corporate proxy, or Docker Desktop's internal proxy configuration. This is different from a general "connection refused" error - this specifically indicates the proxy connection is failing, not the connection to Docker Hub itself.
How do I fix "Error response from daemon: Get https://registry-1.docker.io/v2/: prox"?
This error occurs when Docker is configured to use a proxy server, but the proxy is unreachable or not running. The Docker daemon cannot connect to Docker Hub or other registries through the specified proxy, resulting in image pull and push failures.
What causes "Error response from daemon: Get https://registry-1.docker.io/v2/: prox"?
Proxy server is not running but Docker is configured to use it Stale proxy settings in Docker Desktop from a previous network environment HTTP_PROXY or HTTPS_PROXY environment variables pointing to an unavailable proxy
Is the "Error response from daemon: Get https://registry-1.docker.io/v2/: prox" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading