docker报错问题

先查看状态,一般会有提示
systemctl status docker.service

修改配置文件之后
systemctl daemon-reload

报错1

Creating network “cve-2018-1000861_default” with the default driver
ERROR: cannot create network d009d2683a6315136438f0cdac177c38aad225df2471324a850f298e6565bc62 (br-d009d2683a63): conflicts with network 8186400e06b1d590b1463197d0e0a5da3b9f1421e6d4049781eee46d46aa33ce (br-8186400e06b1): networks have overlapping IPv4

表示将要创建的网络aa90481a8822 和 原有网络b811025ad90d 冲突。

执行 docker network ls 查看docker网络

docker network rm b811025ad90d

执行 ip addr 查看服务器的网络配置

删除掉网桥 brctl delbr br-b811025ad90d

(如果没有brctl命令,通过 yum install -y bridge-utils 安装)

重启docker服务即可 systemctl restart docker

报错2

Creating network “cve-2018-1000861_default” with the default driver
Pulling jenkins (vulhub/jenkins:2.138)…
ERROR: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:60226->[::1]:53: read: connection refused

拒绝连接

vi /etc/resolv.conf

nameserver 8.8.4.4
nameserver 8.8.8.8

报错3

[root@ce-docker ~]# systemctl restart docker

Job for docker.service failed because start of the service was attempted too often. See “systemctl status docker.service” and “journalctl -xe” for details.
To force a start use “systemctl reset-failed docker.service” followed by “systemctl start docker.service” again.

[root@ce-docker ~]# vim /etc/docker/daemon.json
[root@ce-docker ~]# mv /etc/docker/daemon.json /etc/docker/daemon.conf
[root@ce-docker ~]# systemctl start docker

报错4

Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-0f556fac2ce6 -j RETURN: iptables: No chain/target/match by that name.
(exit status 1))

原因是关闭防火墙之后docker需要重启,执行以下命令重启docker即可:
service docker restart

报错5

Can’t find a suitable configuration file in this directory or any
重启docker
service docker restart

参考:https://www.bbsmax.com/A/Gkz19gPgzR/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值