admin管理员组文章数量:1310193
I am developing in Windows 11 and was running Docker Desktop (development in remote containers with VSCode) and I am now evaluating a switch to podman (have done a clean install of new WSL2 Ubuntu 22.04, the installed podman and docker-compose), but I cannot solve an issue that seems to be related to networking / WSL2 networking.
I can access my podman containers (from windows) with localhost, but not with 127.0.0.1.
In my full setup, I am running an nginx container as a reverse proxy for my front-end and my back-end containers. I have created a fake domain in my hosts file (mapped to 127.0.0.1) and have issued a certificate so that I can connect to my web app with .
I can replicate the problem with one single container, for example:
podman run --name nginx -P -d nginx
I then check the ports assigned: 0.0.0.0:32939->80/tcp
I then try to connect from the windows host: I can connect with "curl http://localhost:32939", but not with "curl http://127.0.0.1:32939". If I run the command above on my machine with docker destop (so "docker run --name nginx -P -d nginx"), I can connect from a windows shell to "localhost" and "127.0.0.1". What do I need to change on my podman / wsl2 config so that I can connect with 127.0.0.1 to my podman container (and use my fake domain) ?
本文标签: wsl2Can connect to rootless podman container with localhost but not with 127001Stack Overflow
版权声明:本文标题:wsl2 - Can connect to rootless podman container with localhost but not with 127.0.0.1 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741832474a2400016.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论