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 服务以使更改生效。
参考资料
相关推荐
always20223 小时前
AI运行时 · 06 - Kata 与 K8s 集成:RuntimeClass / CSI kata-directvolume / 性能开销与调优
人工智能·容器·kubernetes
stormsha5 小时前
中文路径让 MySQL 起不来:Failed to find valid data directory 与 Illegal byte sequence
运维·数据库·mysql
stormsha6 小时前
MySQL 报 `data directory has files in it`:初始化失败一次,之后就永久起不来
运维·数据库·mysql
csdn_aspnet7 小时前
使用 Docker 配置 PostgreSQL 和 pgAdmin 4
数据库·docker·postgresql·pgadmin4
Maiko Star8 小时前
Docker保姆级部署AI应用程序(FastAPI)
docker·容器·fastapi
沙老师11 小时前
Linux Purification Plan - More Modification
linux·运维·服务器
Decay__12 小时前
PostgreSQL 高可用与容灾架构 —— 流复制、Patroni、Keepalived+VIP、读写分离与两地三中心
运维·数据库·sql·postgresql
A-刘晨阳1 天前
Kubernetes 查询证书有效期及续签证书(适用于二进制部署)
云原生·容器·kubernetes·证书·cfssl
tz5251 天前
Superpowers 游戏开发实战应用场景大纲
linux·运维·服务器
倔强的石头_1 天前
Linux 电脑也能被 UU 远程连进去了:Linux PC 端内测上手,主控和被控我都试了
运维