WSL2 Windows 10 - docker run cannot bind to docker host IP #3325
Unanswered
torsten-liermann
asked this question in
Q&A
Replies: 1 comment
-
I can confirm that binding to a host IP like that works 100% with Docker Desktop for Windows (WSL2 backend), but indeed fails with Rancher Desktop on Windows. In my case, I need to bind to only a specific IP on the host interface so that only access from that network is possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It looks like on windows 10 with wsl2 binding a port to docker host doesn't work:
docker run -p 172.18.146.186:8081:8080 nginx
ends indocker: Error response from daemon: driver failed programming external connectivity on endpoint nginx (3df0e9d0190f81eaf0258ede900340d129b97ed35dead7a1cef6915655d5581a): Error starting userland proxy: listen tcp4 172.18.146.186:8081: bind: cannot assign requested address.
docker run -p 8081:8080 nginx
unfortunately only bind to 127.0.0.1
This worked with Docker Desktop for Windows -- if I remember correctly.
Beta Was this translation helpful? Give feedback.
All reactions