Open davidwudv opened 4 years ago
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
Hi, is there any progress on this issue ?
- docker run -p 80:80 nginx 🆗
- docker-compose up on the below file 🆗
- docker stack up on the below file ❌
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
section in docker-compose.override.yaml
with the below, then it should work with localhost:8000
from Windows (provided that the port is 8000)
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.![Screenshot_20191204125208](https://user-images.githubusercontent.com/4150570/70113790-064eff00-1695-11ea-9d7f-f99741cc54b4.png)
But the localhost port is opening:![Screenshot_20191204125221](https://user-images.githubusercontent.com/4150570/70113797-0bac4980-1695-11ea-9afc-6eaf05497165.png)