Skip to content

Instantly share code, notes, and snippets.

@liongkj
Created August 11, 2025 07:20
Show Gist options
  • Select an option

  • Save liongkj/70c4ed21a9c9b1a58aa3f49c7d63ba94 to your computer and use it in GitHub Desktop.

Select an option

Save liongkj/70c4ed21a9c9b1a58aa3f49c7d63ba94 to your computer and use it in GitHub Desktop.
proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused
## Problem
When using Docker Desktop with WSL2 and Clash for Windows proxy, you may encounter this error:
```
target CONTAINER_NAME: failed to solve: python:3.12-slim: failed to resolve source metadata for docker.io/library/python:3.12-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/python/manifests/3.12-slim": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused
```
## Solution
Follow these steps in order:
1. **Quit Docker Desktop** completely
2. **Stop Clash for Windows proxy**
3. **Open Docker Desktop** again
## Why This Works
The issue occurs because Docker Desktop is trying to use the proxy configuration even when the proxy is unavailable. By stopping the proxy before restarting Docker, it forces Docker to reset its network configuration and use direct connections to Docker Hub.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment