如何在网桥模式下使用docker?

时间:2015-11-23 10:14:59

标签: docker

我正在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?

0 个答案:

没有答案