完全相同的问题Docker容器引擎启动失败,正如我得到的dockerd failed to start daemon: Error initializing network controller: list bridge addresses failed: PredefinedLocalScopeDefaultNetworks List no available network
:
$ journalctl -xeu docker.service | grep 'failed to start daemon'
Nov 23 21:56:08 myhost dockerd[525139]: failed to start daemon: Error initializing network controller: list bridge addresses failed: PredefinedLocalScopeDefaultNetworks List: [172.17.0.0/16 172.18.0.0/16 172.19.0.0/16 172.20.0.0/16 172.21.0.0/16 172.22.0.0/16 172.23.0.0/16 172.24.0.0/16 172.25.0.0/16 172.26.0.0/16 172.27.0.0/16 172.28.0.0/16 172.29.0.0/16 172.30.0.0/16 172.31.0.0/16 192.168.0.0/20 192.168.16.0/20 192.168.32.0/20 192.168.48.0/20 192.168.64.0/20 192.168.80.0/20 192.168.96.0/20 192.168.112.0/20 192.168.128.0/20 192.168.144.0/20 192.168.160.0/20 192.168.176.0/20 192.168.192.0/20 192.168.208.0/20 192.168.224.0/20 192.168.240.0/20]: no available network
但该解决方案对我来说不起作用。
我发现原因是--bip
docker 不再有标志:
/usr/bin/docker daemon --debug --bip=192.168.0.0/20
unknown flag: --bip
See 'docker --help'.
我成立作品是:
ip link add name docker0 type bridge
ip addr add dev docker0 172.17.0.1/16
systemctl daemon-reload
systemctl start docker
但是,我相信这种更改不会在重新启动后持续存在,因此需要一个永久的解决方案。