报错如下:
[root@i docker]# systemctl restart docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@i docker]# systemctl status docker.service
...
Jul 15 01:54:20 localhost.localdomain dockerd-current[44951]: Error starting daemon: Error initializing network controller
Jul 15 01:54:20 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, ...URE
Jul 15 01:54:20 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Jul 15 01:54:20 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Jul 15 01:54:20 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
...
说明docker0网络未通,也就是说你需要创建docker0
[root@i ~]# brctl addbr docker0
[root@i ~]# ip addr add 172.17.0.1/16 dev docker0
[root@i ~]# ip link set dev docker0 up
[root@i ~]# systemctl restart docker