Docker更新后,容器无法连接

时间:2015-04-14 08:23:12

标签: 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 bridge:

    ip link set dev docker0 down

    brctl delbr docker0

  • 安装最新的

我仍然得到错误。容器可以ping通,因此不应该是网络问题:

# 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:

# 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

有关如何从容器连接的任何评论都非常感谢!!!

0 个答案:

没有答案