docker很诚实的告诉我们要运行这个命令:journalctl -xe
然后你就会看到报错的详细信息
ERROR: ZONE_CONFLICT: 'docker0' already bound to a zone
然后去修改防火墙的配置就可以了
- Check if docker zone exists in firewall-cmd
$ firewall-cmd --get-active-zones
- If "docker" zone is available, change interface to docker0 (not persisted)
$ sudo firewall-cmd --zone=docker --change-interface=docker0
- If "docker" zone is available, change interface to docker0 (persisted, thanks rbjorklin)
$ sudo firewall-cmd --permanent --zone=docker --change-interface=docker0 //permanent表示永久性写入
$ sudo systemctl restart firewalld
网友评论