zl程序教程

您现在的位置是:首页 >  工具

当前栏目

docker修改daemon.json 添加私有仓库重启报错

DockerJSONJSON 报错 修改 添加 重启 仓库
2023-06-13 09:11:30 时间

问题描述

在修改 /etc/docker/daemon.json 添加 私有仓库地址后,重启出现如下报错 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

解决方案

1.查看 /usr/lib/systemd/system/docker.service

删除$INSECURE_REGISTRY \ 这一行 大约在倒数15行

2.deamon.json 是否有多行,行尾是否添加 ,

如果你是多行配置文件,那么请每行以 ,结尾