docker无法启动:
1 # systemctl restart docker 2 Job for docker.service failed because the control process exited with error code. 3 See “systemctl status docker.service” and “journalctl -xe” for details.
journalctl -xe的提示信息为:
1 docker.service: Main process exited, code=exited, status=1/FAILURE 2 Failed to start Docker Application Container Engine. 3 docker.service: Unit entered failed state. 4 docker.service: Failed with result 'exit-code'. 5 docker.service: Service hold-off time over, scheduling restart. 6 Stopped Docker Application Container Engine. 7 Starting Docker Application Container Engine... 8 Failed to load listeners: no sockets found via socket activation: make sure the service was started by systemd
---------------------
解决方法:
# sudo systemctl edit docker.service
之后编辑: 将其中的fd:// 替换为 unix://
之后保存退出。
测试:
1 $ service docker start 2 $ docker ps -a 3 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES