I installed Docker Desktop for Windows in my Windows 10 computer, and created a hyper-v
virtual machine named MobyLinuxVM. I deployed a mongodb
to a new container, and mapped the port to MobyLinuxVM 27017 port. The MobyLinuxVM virtual machine ip is 10.0.75.2
, and the host win10 machine ip is 192.168.1.10. The MobyLinuxVM use a internal network type hyper-v virtual switch named DockerNAT, it is the default switch for the MobyLinuxVM.
Now I can access the Mongo database from the host win10 machine. But how can I access the mongo database from other machine? I try to change the MobyLinuxVM machine network adapter to another external network type virtual switch, but I cannot get the MobyLinuxVM virtual machine IP, and I try to log in the virtual machine by SSH, but didn't konw the user name and password.
So how to access the database deployed in a windows docker container from other machine?