docker更新后容器无法连接
更新docker后,我的容器无法连接到远程主机:docker更新后容器无法连接,docker,Docker,更新docker后,我的容器无法连接到远程主机: # d run -i -t busybox wget google.com Connecting to google.com (216.58.209.14:80) wget: can't connect to remote host (216.58.209.14): Connection refused 起初我认为这是一个网络问题,但后来 清除所有docker包 移除docker桥: ip链路设置dev docker0已关闭 brctl de
# d run -i -t busybox wget google.com
Connecting to google.com (216.58.209.14:80)
wget: can't connect to remote host (216.58.209.14): Connection refused
起初我认为这是一个网络问题,但后来
- 清除所有docker包
- 移除docker桥: ip链路设置dev docker0已关闭 brctl delbr docker0
- 安装最新版本
# d run -i -t busybox ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=51 time=18.099 ms
我的主机可以设置:
# wget google.com
--2015-04-14 11:09:56-- http://google.com/
Resolving google.com (google.com)... 216.58.209.14, 2a00:1450:4017:803::200e
但我的集装箱还是装不下
我的ifconfig是:
docker0 Link encap:Ethernet HWaddr 56:84:7a:fe:97:99
inet addr:172.17.42.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::5484:7aff:fefe:9799/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:35 errors:0 dropped:0 overruns:0 frame:0
TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2116 (2.1 KB) TX bytes:7552 (7.5 KB)
您可能需要询问的一些配置:
/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
-------------------
# uname -a
Linux bor-asus4 3.8.0-39-generic #57~precise1-Ubuntu SMP Tue Apr 1 20:04:50 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
-------------------
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
-------------------
# d -v
Docker version 1.5.0, build a8a31ef
非常感谢您对我如何从容器连接的任何评论 “有趣的”是,当你为google.com显示一个IP时,DNS解析似乎起作用,我记得即使不可用,curl也会尝试使用代理,那么是什么给了
d run-I-t busybox env
?你看到HTTP_代理了吗?嗨,我正在使用我刚才拉的busybox。因此,使用默认的envs:PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin主机名=2753a7b98f7b TERM=xterm HOME=/root