admin管理员组

文章数量:1391818

I currently try to make a simple webapp accessible in my Network.

Server Hardfacts:

  • OS Windows 10
  • wsl version 2
  • Ubuntu-18.04 in WSL
  • docker version 28.0.1

I have set an inbound rule to let my port 4200 through the firewall. I also set up a netsh rule like this:

netsh interface portproxy add v4tov4 listenport=4200 listenaddress=0.0.0.0 connectport=4200 connectaddress=<WSL2_IP_Address>

I start my docker container like this:

docker run -d -p 4200:80 --restart unless-stopped --name test <docker-image>

When I run a dev container from wsl, I can open the webinterface through :4200. This only works when I changed the settings in vscode for "Local Port Host" to allInterfaces. So my system firewall does not block or anything. I already tried different advices from the web, but none of them worked for me.

Any ideas on how to access my app from a remote device?

UPDATE: When I activate docker desktop it works. Which settings are required, so I can use it without docker desktop?

本文标签: windowsHow to setup webapp inside docker in wsl to make it accessible in networkStack Overflow