title: How can I access a service running on WSL2 from inside a Docker container?
body: <p>I am using Windows 10 1909 and have installed WSL2, using Ubuntu 20.04, the 19.03.13-beta2 docker version, having installed Docker for Windows Edge version using the WSL2 option. The integration is working pretty great, but I have one issue which I cannot solve.</p>
  <p>On the WSL2 instance, there are services running, exposing some ports (3000, 3001, 3002,...). From one of the docker containers, I need to access the services for a specific development scenario (API Gateway), and this I cannot get to work.</p>
  <p>I have tried using the WSL2 IP address directly, but then the connect just times out. I have also tried using <code>host.docker.internal</code>, which resolves to something else than the WSL2 IP address, but it still doesn't work.</p>
  <p>Is there a special trick I need to pull, or is this kind of routing currently not supported, but will be, or is this for some other reason not possible?</p>
  <p>This illustrates what I am trying to achieve:</p>
  <p><a href="https://i.stack.imgur.com/MnX9y.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MnX9y.png" alt="Accessing WSL2 services from docker container" /></a></p>
  <p>The other routings work - i.e. I can access all the service ports coming from the node.js processes inside WSL2 from the Windows browser, and also I can access the exposed service ports from the containers both from inside WSL2 and from Windows. It's just this missing link I cannot make work.</p>