I am using Docker Windows with WSL2.
From some answers I understand that connecting to an IP address exposed to the host network can be done from within a Docker container without any particular setup, but I cannot do it. Note that I do not want to access localhost, but a specific IP address (and port) of another device exposed to the host network.
I read a couple reasons on what could be the issue:
- Missing firewall exception to allow communication between the external IP and the IP of the container.
- I may have to use network_mode: "host", which however only seems to work in Linux
Many thanks.