根据 Docker 文档https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
我应该可以使用host.docker.internal
。但是,如果我按照示例操作,则会收到以下错误:
/ # curl http://host.docker.internal:8000
curl: (6) Could not resolve host: host.docker.internal