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 服务以使更改生效。
参考资料
相关推荐
l***370910 小时前
Docker部署Spring Boot + Vue项目
vue.js·spring boot·docker
我科绝伦(Huanhuan Zhou)11 小时前
MySQL运维必备:24个核心监控参数(含查询语句+异常处理)
运维·数据库·mysql
python百炼成钢11 小时前
44.Linux RTC
linux·运维·实时音视频
玖疯子11 小时前
Docker 极简入门实战大纲
docker
有谁看见我的剑了?11 小时前
Rocky9.6 Samba搭建学习
linux·运维
未来之窗软件服务11 小时前
服务器运维(十六)vlang语言linuxSSH日志分析——东方仙盟炼气期
运维·服务器·服务器运维·东方仙盟
吕了了11 小时前
113 隐藏此电脑中的常用文件夹
运维·windows·系统
L***B56812 小时前
Nginx代理到https地址忽略证书验证配置
运维·nginx·https
源梦想12 小时前
绝地幸存者H5割草网页小游戏Linux部署演示
linux·运维·服务器
拾心2112 小时前
【云运维】K8s管理(二)
运维·容器·kubernetes