【问题标题】:connect to server runned in windows docker container连接到在 windows docker 容器中运行的服务器
【发布时间】:2018-11-02 09:13:01
【问题描述】:

我是 docker 的新手。我需要通过docker toolbox 在 Windows 7*64 上使用它。 我需要连接到下面的服务器:

运行服务器:

docker run -p 4444:4444 mycontainerWithServer

之后我打开新的 docker 工具箱窗口并尝试连接到localhost:4444。我收到 ConnectionRefused 错误。

【问题讨论】:

标签: docker docker-toolbox docker-for-windows


【解决方案1】:

因为您使用的是 Docker 工具箱,所以您无法访问 localhost 上的容器。该工具箱默认使用192.168.99.100,因为它在Linux VM 上运行。尝试用虚拟机 IP 替换 localhost。

【讨论】:

    猜你喜欢
    • 2023-03-27
    • 2019-07-20
    • 2022-01-16
    • 2017-06-02
    • 1970-01-01
    • 1970-01-01
    • 2021-07-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多