Docker 修改配置后无法启动问题

问题描述

在修改 /etc/docker/daemon.json 配置文件后,尝试启动 Docker 守护进程时遇到以下错误:unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: insecure-registries: (from flag: [192.168.50.100], from file: [192.168.10.211])

原因分析

此错误是因为在 daemon.json 中配置了 insecure-registries,同时在 Docker 启动命令行参数中也指定了相同的选项,导致配置冲突。

解决方案
  1. 编辑 /usr/lib/systemd/system/docker.service 文件。
  2. 移除或注释掉 ExecStart 行中的 --registry-mirror=192.168.50.100 参数。
  3. 重启 Docker 服务以使更改生效。
参考资料
相关推荐
一心0921 小时前
ubuntu 20.04.6 sudo 源码包在线升级到1.9.17p1
运维·ubuntu·sudo·漏洞升级
好好学习啊天天向上1 小时前
世上最全:ubuntu 上及天河超算上源码编译llvm遇到的坑,cmake,ninja完整过程
linux·运维·ubuntu·自动性能优化
你想考研啊1 小时前
三、jenkins使用tomcat部署项目
运维·tomcat·jenkins
代码老y2 小时前
Docker:容器化技术的基石与实践指南
运维·docker·容器
典学长编程2 小时前
Linux操作系统从入门到精通!第二天(命令行)
linux·运维·chrome
DuelCode3 小时前
Windows VMWare Centos Docker部署Springboot 应用实现文件上传返回文件http链接
java·spring boot·mysql·nginx·docker·centos·mybatis
你想考研啊5 小时前
四、jenkins自动构建和设置邮箱
运维·jenkins
Code blocks5 小时前
使用Jenkins完成springboot项目快速更新
java·运维·spring boot·后端·jenkins
饥饿的半导体6 小时前
Linux快速入门
linux·运维
杨浦老苏7 小时前
开源服务运行监控工具Lunalytics
docker·群晖·网站监控