我有 Ubuntu 16.04,每次我启动 Docker 容器时我的互联网连接就会断开。
我认为 Docker 容器的 IP 地址或端口与互联网连接存在冲突。但也许我错了。我该如何解决这个问题?
这是我的设置:
/etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile
dns=dnsmasq
[ifupdown]
managed=false
[keyfile]
unmanaged-devices=interface-name:docker0;interface-name:vmnet*;interface-name:vboxnet*;interface-name:br-2164968a2156;interface-name:veth*;
nmcli 开发节目
DEVICE TYPE STATE CONNECTION
br-913cc3bb855c bridge connected br-913cc3bb855c
enp3s0 ethernet connected Wired connection 2
wlp2s0 wifi disconnected --
docker0 bridge unmanaged --
lo loopback unmanaged --
/etc/网络/接口
auto lo
iface lo inet loopback
答案1
systemctl stop docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
systemctl start docker