[root@96-8-0-231 ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2025-07-04 18:07:52 CST; 1 day 19h ago
Docs: https://docs.docker.com
Process: 682908 ExecStart=/usr/bin/dockerd --data-root=/home/docker (code=exited, status=203/EXEC)
Main PID: 682908 (code=exited, status=203/EXEC)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@96-8-0-231 ~]# systemctl restart docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
原因最常见的:
原因1、修改SELinux的安全策略,为防止docker启动异常,设置/etc/selinux/config内SELINUX参数为disabled
vi /etc/selinux/config 键盘按 i 修改SELINUX值为disabled 键盘按ESC 输入:wq 保存并退出 |
chmod +x /etc/systemd/system/docker.service
systemctl daemon-reload
systemctl start docker
原因2:cat /etc/docker/daemon.json文件,json格式有误
复制到AI进行检查
其他:手动运行 dockerd
调试
# 停止 Docker 服务
sudo systemctl stop docker
# 手动debug模式运行dockerd (路径根据自己的来)
查看错误 sudo /usr/bin/dockerd --debug --data-root=/home/docker