Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container not able to communicate with other service running on localhost #9694

Closed
1 of 2 tasks
alia5gar opened this issue Feb 25, 2023 · 3 comments
Closed
1 of 2 tasks

Comments

@alia5gar
Copy link

alia5gar commented Feb 25, 2023

Version

Microsoft Windows [Version 10.0.19044.2604]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.79

Distro Version

Ubuntu 20.04

Other Software

Docker version 23.0.1, build a5ee5b1 (Running in WSL)
Docker engine is installed inside of WSL

Repro Steps

  1. Install docker engine in WSL
  2. Start a docker container also specify the container port and the host port in the run command (I have a mockserver/mockserver image running in the container)
  3. Start another service in WSL (In my case a python unicorn server)

Expected Behavior

Docker container should be able to reach the service running on localhost

We get the expected result when --net=host is passed in the docker run command

Actual Behavior

Calling the service running locally from the docker container, give connection refuse error

Diagnostic Logs

No response

@ghost
Copy link

ghost commented Feb 28, 2023

What wsl --version are you running?

@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

1 similar comment
@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant