-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access windows server from docker in wsl2 with mirrored network. #12626
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging |
/question |
Diagnostic information
|
Additional: If I replace host.docker.internal with the host machine's IP address (displayed by running ipconfig.exe in PowerShell), I can successfully connect to the proxy server. But why can't localhost or host.docker.internal work here? |
Windows Version
Microsoft Windows [version 10.0.22631.4317]
WSL Version
2.4.11.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.167.4-1
Distro Version
Ubuntu24.04
Other Software
Docker (not docker desktop)
Repro Steps
When I first encountered this issue while deploying a local service using Docker Compose, the working environment was quite complex. With the help of AI, I simplified the scenario and successfully reproduced the problem.
And I'm sure I can access the proxy on wsl.
docker-compose.yml
and enter the container.Expected Behavior
I expect that the curl command will successfully connect to the proxy and work properly.
Actual Behavior
Diagnostic Logs
WslNetworkingLogs-2025-02-24_02-41-55.zip
The text was updated successfully, but these errors were encountered: