如果是命令行启动,添加如下参数:--add-host=host.docker.internal:host-gateway如果是docker-compose.xml启动,添加如下参数:extra_hosts: - host.docker.internal:host-gateway然后将 localhost或者是 127.0.0.1 替换成 host.docker.internal Last modification:June 13, 2022 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 1 If you think my article is useful to you, please feel free to appreciate