如何在 DigitalOcean 与 Docker 通信(网络)?
How to communicate (network) with Docker at DigitalOcean?
我正在尝试使用 Docker - Build, Ship, and Run Any App, Anywhere with Simple Cloud Infrastructure for Developers | DigitalOcean, using following container: Docker Hub, np1/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 地址在浏览器中设置代理?
如果您使用工具箱安装 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.
那么你现在应该可以设置套接字了。
我正在尝试使用 Docker - Build, Ship, and Run Any App, Anywhere with Simple Cloud Infrastructure for Developers | DigitalOcean, using following container: Docker Hub, np1/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 地址在浏览器中设置代理?
如果您使用工具箱安装 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.
那么你现在应该可以设置套接字了。