How do I connect to a container hosted in Docker Toolbox?

霸气de小男生 提交于 2019-12-01 14:16:45
Peter

I have found the answer in another question here.

Because Docker Toolbox is running on a lightweight Linux VM, it has its own IP address. One needs either to map localhost to the VM using DOCKER_HOST ir access the VM via it's IP address, found using the command:

docker-machine ip default

As you are running on VM, you need to follow this docker document from here.

After that run the following command to check the IP address of your VM.

docker-machine ip default

Start the nginx and hit [ip default address]:port in the browser. It works!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!