-
Notifications
You must be signed in to change notification settings - Fork 814
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
[WSL2] Can't connect to docker swarm container's published port using 'localhost' on windows #4729
Comments
Same issue here. |
Same issue with exactly the same yml file running with 'docker stack ...'. 'docker-compose up' is ok. |
Finally, I find the solution of this problem: in wsl2 terminal, run 'ifconfig' to check your IP address of 'eth0', in my case the address is '172.22.182.119', visit this address instead of 'localhost', and every thing is ok now. Hope Microsoft can resolve this problem, and we can visit localhost instead of the internal address of wsl2. |
Hi, is there any progress on this issue ?
no way to reach the service, even from the wsl2 distro ip |
@souchprod The problem is still not solved |
Has this issue been solved? My team is experiencing a similar issue. |
Experiencing this still. |
Still have the issue |
A few months later and I still have the same problem. |
Same here. Does this mean it is currently not possible to use Swarm mode on WSL? |
Experiencing this issue too. |
Try downloading latest version of WSL following the link below https://devblogs.microsoft.com/commandline/windows-subsystem-for-linux-september-2023-update/ |
My colleague found a solution: replacing the ports:
- target: 8080
published: 8000
protocol: tcp
mode: host Tested with Windows 11 10.0.22631. |
Your Windows build number: 19033.1
What you're doing and what's happening:
When I run this command:
Everythin is ok, I can access the nginx service using
http://localhost:80
on windows browser.But when I using docker swarm service:
Create docker stack:
I can't use 'localhost' to access the nginx service on windows.
But the localhost port is opening:
Can't access docker service using 'localhost' on windows.
The text was updated successfully, but these errors were encountered: