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 服务以使更改生效。
参考资料
相关推荐
zhenshanrenhao2 小时前
#买硬盘欲安装k8s记
云原生·容器·kubernetes
HWL56792 小时前
“preinstall“: “npx only-allow pnpm“
运维·服务器·前端·javascript·vue.js
门前灯3 小时前
Linux系统之iprconfig 命令详解
linux·运维·服务器·iprconfig
tb_first4 小时前
k8sday09
linux·云原生·容器·kubernetes
忧郁的橙子.4 小时前
三、k8s 1.29 之 安装2
linux·运维·服务器
huangyuchi.4 小时前
【Linux系统】动静态库的制作
linux·运维·服务器·动态库·静态库·库的简单制作
闻不多4 小时前
用llamaindex搭建GAR遇到400
android·运维·服务器
jim写博客5 小时前
Linux进程概念(四)环境地址变量
linux·运维·服务器
是小崔啊5 小时前
【Jenkins】01 - Jenkins安装
运维·jenkins
Nie_Xun5 小时前
ubuntu网络共享
linux·运维·ubuntu