docker容器中访问本地宿主机的服务

容器中可以通过特定的域名访问宿主机的服务

host.docker.internal

参考docker官网文档如下:
I want to connect from a container to a service on the host

你可能感兴趣的:(docker,容器,运维)