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
版权声明:本文标题:windows - How to setup webapp inside docker in wsl to make it accessible in network? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744760875a2623747.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论