如何查看docker启动报错信息

sudo journalctl -u docker.service

  

-- Logs begin at Wed 2025-04-16 15:57:22 CST, end at Wed 2025-04-16 16:00:53 CST. --
Apr 16 15:57:34 YJT-ASZHZK-V01 systemd[1]: Starting Docker Application Container Engine...
Apr 16 15:57:36 YJT-ASZHZK-V01 dockerd[1174]: unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: Failed to start Docker Application Container Engine.
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: docker.service: Service RestartSec=100ms expired, scheduling restart.
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: docker.service: Scheduled restart job, restart counter is at 1.
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: Stopped Docker Application Container Engine.
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: Starting Docker Application Container Engine...
Apr 16 15:57:36 YJT-ASZHZK-V01 dockerd[1515]: unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 16 15:57:36 YJT-ASZHZK-V01 systemd[1]: Failed to start Docker Application Container Engine.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: docker.service: Service RestartSec=100ms expired, scheduling restart.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: docker.service: Scheduled restart job, restart counter is at 2.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: Stopped Docker Application Container Engine.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: Starting Docker Application Container Engine...
Apr 16 15:57:37 YJT-ASZHZK-V01 dockerd[1557]: unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: Failed to start Docker Application Container Engine.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: docker.service: Service RestartSec=100ms expired, scheduling restart.
Apr 16 15:57:37 YJT-ASZHZK-V01 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.

  

找到错误信息:无法使用配置文件

unable to configure the Docker daemon with file /etc/docker/daemon.json: EOF

找到文件:
/etc/docker/daemon.json

vi修改文件或创建文件:
{
  "registry-mirrors": ["https://iw66opmy.mirror.aliyuncs.com"],
  "insecure-registries": ["192.168.100.200:8088"]
}

  

reboot重启服务器即可

posted @ 2025-04-16 16:23  show-code  阅读(131)  评论(0)    收藏  举报