容器中可以通过特定的域名访问宿主机的服务 host.docker.internal 参考docker官网文档如下: I want to connect from a container to a service on the host