2

I want to run mongodb inside docker container (without installing it on host machine) and work with it locally.

For linux I do:

docker run --network=host mongo

and all works as I want. I am able to connect to mongodb which runs on localhost:27017.

But when I do the same on Windows 10 machine, I can't connect to localhost:27017 from host machine. When I run command as above, in console I see that mongodb is running and waiting for connections. But I can't connect from windows host.

So, how to make it work?

Maksim Nesterenko
  • 5,661
  • 11
  • 57
  • 91

0 Answers0