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 服务以使更改生效。
参考资料
相关推荐
能不能别报错33 分钟前
openclaw-linux部署教程+mimo-v2-pro
linux·运维·服务器
小虎卫远程打卡app2 小时前
光通信与视频编码前沿技术综述:从超大容量传输到实时神经网络编码
运维·网络·信息与通信·视频编解码
ToB营销学堂2 小时前
B2B营销自动化新解法:MarketUP聚焦高转化场景
大数据·运维·自动化
TK云大师-KK2 小时前
TikTok自动化直播遇到内容重复问题?这套技术方案了解一下
大数据·运维·人工智能·矩阵·自动化·新媒体运营·流量运营
蓝羽天空2 小时前
Ubuntu 24.04 安装 Docker
linux·ubuntu·docker
T0uken2 小时前
WSL:离线配置 Ubuntu 开发环境
linux·运维·ubuntu
暮秋4742 小时前
ubuntu部署阿里通义千问模型
运维·ubuntu·大模型
维度攻城狮2 小时前
Docker-Ubuntu安装并启动Chrome浏览器
chrome·ubuntu·docker·安装