当前位置: 首页 > article >正文

刚安装docker并启动docker服务: systemctl restart docker报错解决

root:/home/lzw# sudo systemctl restart docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xeu docker.service" for details.

1、问题描述
启动docker服务: 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.

2、问题解决
1、进入docker目录:cd /etc/docker/

2、修改daemon的类型:mv daemon.json daemon.conf

3、重启docker:systemctl restart docker

我的就是这样解决的。其他百度的方式不行。

上述修改如下:
上述确实解决了这个无法启动的问题,但是又出现了镜像没有配置成功,导致连helloworld的镜像都无法拉取。查阅了多个资料,发现文件daemon.json这样并没有错,大家都是如此。
然后仔细查阅文件的内容,发现有一个镜像地址后面少了一个英文逗号,简直了,如下所示:

sudo tee /etc/docker/daemon.json <<-'EOF'
{
    "registry-mirrors": [
        "https://docker.1ms.run",
        "https://docker.1panel.live",
        "https://docker.iyuu.cn",
        "https://docker.5s6.com",
        "https://d.rakin.cn"  #就是这里忘记了逗号
        "https://docker.1panel.dev",
        "https://docker.foreverlink.love",
        "https://dytt.online",
        "https://func.ink",
        "https://lispy.org",
        "https://docker.xiaogenban1993.com",
        "https://docker.xn--6oq72ry9d5zx.cn",
        "https://docker.zhai.cm",
        "https://docker.5z5f.com",
        "https://a.ussh.net",
        "https://docker.cloudlayer.icu",
        "https://docker.linkedbus.com",
        "https://docker.m.daocloud.io"
    ]
}
EOF


http://www.kler.cn/a/570649.html

相关文章:

  • [RN]React Native知识框架图详解
  • Golang的图形用户界面设计
  • python爬虫Scapy框架(1)
  • 分布式中间件:Redis介绍
  • 蓝桥杯 - 每日打卡(类斐波那契循环数)
  • 国产编辑器EverEdit - 超多样式设置
  • 深入解析 Rust 异步编程中的 Traits
  • 计算机毕业设计SpringBoot+Vue.js医院后台管理系统(源码+文档+PPT+讲解)
  • 【Elasticsearch】Data Streams
  • 03 HarmonyOS Next仪表盘案例详解(二):进阶篇
  • 【三.大模型实战应用篇】【6.自然语言转SQL:AI与数据库的无缝对接】
  • doris: Hive Catalog
  • 基于提示驱动的潜在领域泛化的医学图像分类方法(Python实现代码和数据分析)
  • unity pico开发 五 UI交互
  • io学习----->标准io
  • 【2025年2月28日稳定版】小米路由器4C刷机Immortalwrt 23.05.4系统搭载mentohust 0.3.1插件全记录
  • java中代理模式 之 静态代理模式
  • 2025GDC全球开发者大会 | 函子科技现场演示DeepSeek+OpenAI协同调用,手把手传授无代码+AI变现方案
  • SFP28(25 Gigabit Small Form-factor Pluggable)详解
  • C++(蓝桥杯常考点)