我正在Windows机器上运行Docker Quickstart终端。
当Docker VM设置为使用仅限主机的适配器(默认网络设置)时,我得到:
docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com
xxx@yyy MINGW64 ~
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
a9cca0b96f48 my/server "/bin/bash /start.sh" About an hour a
go Up 30 seconds 0.0.0.0:6083-6084->6083-6084/tcp mycontainer
到目前为止一切顺利,但当Docker VM设置为使用Bridged Adapter时,我得到:
docker is configured to use the default machine with IP 192.168.5.92
For help getting started, check out the docs at https://docs.docker.com
XXX MINGW64 ~
$ docker ps
An error occurred trying to connect: Get http://localhost:2375/v1.21/containers/
json: dial tcp 127.0.0.1:2375: ConnectEx tcp:
绕过它的方法是ssh到Docker VM(在我的情况下是192.168.5.92),但是我从终端开始无法访问我的本地机器。
使用桥接适配器时,有没有办法将Docker Quickstart终端指向Docker VM的正确IP?