如何在DigitalOcean与Docker进行通信(网络)?

时间:2015-09-28 00:22:02

标签: docker digital-ocean

我正在尝试将Docker - Build, Ship, and Run Any App, AnywhereSimple Cloud Infrastructure for Developers | DigitalOcean一起使用,使用以下容器:Docker Hubnp1/docker-tor-clientonly

根据作者的说明,我能够运行容器:

mbp:~ alexus$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                      NAMES
bdcdabe8ab1d        nagev/tor           "/bin/sh -c '/usr/loc"   40 minutes ago      Up 40 minutes       127.0.1.1:9150->9150/tcp   tor_instance
mbp:~ alexus$ 

我应该使用什么IP地址在浏览器中设置代理?

1 个答案:

答案 0 :(得分:0)

如果你使用工具箱安装docker,这里有修复:

# run the container with all IPs, do not limit to 127.0.1.1
$ docker run -d --name tor_instance -p 9150:9150 nagev/tor

# find out the docker IP
$ docker-machine ip default
192.168.99.100

# test the IP and port is available.
telnet 192.168.99.100 9150
Trying 192.168.99.100...
Connected to 192.168.99.100.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

然后你应该可以立即设置套接字。