ERROR: ZONE_CONFLICT: 'docker0'

2021-09-16  本文已影响0人  SmalltalkVoice

docker很诚实的告诉我们要运行这个命令:journalctl -xe
然后你就会看到报错的详细信息
ERROR: ZONE_CONFLICT: 'docker0' already bound to a zone

然后去修改防火墙的配置就可以了

  1. Check if docker zone exists in firewall-cmd
$ firewall-cmd --get-active-zones
  1. If "docker" zone is available, change interface to docker0 (not persisted)
$ sudo firewall-cmd --zone=docker --change-interface=docker0
  1. 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
上一篇下一篇

猜你喜欢

热点阅读