自己找到原因了,其他大家不要入坑:
参考帖子:https://www.cnblogs.com/hypnus-ly/p/8683215.html
原因:
The reason you’re having this, is because on Linux, the docker daemon (and your containers) run on the Linux machine itself, so “localhost” is also the host that the container is running on, and the ports are mapped to.
On Windows (and OS X), the docker daemon, and your containers cannot run natively, so only the docker client is running on your Windows machine, but the daemon (and your containers) run in a VirtualBox Virtual Machine, that runs Linux.
因为docker是运行在Linux上的,在Windows中运行docker,实际上还是在Windows下先安装了一个Linux环境,然后在这个系统中运行的docker。也就是说,服务中使用的localhost指的是这个Linux环境的地址,而不是我们的宿主环境Windows。
解决办法:
Step1:新找到Docker宿主环境ip: docker-machine ip default
Step2:得到素质环境ip后,在浏览器中加上启动映射的端口后即可打开。