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

后端 未结 2 1963
花落未央
花落未央 2021-01-17 01:10

I am attempting to run my ASP.NET Core 1.1 web API in a Docker container, but I cannot connect to the web API from a browser or curl. To troubleshoot, I have a

2条回答
  •  误落风尘
    2021-01-17 01:20

    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
    

提交回复
热议问题