docker启动问题排查:the following directives are specified both as a flag and in the configuration file


 今天同事突然反馈docker挂了。好好地怎么挂了?问了问,同事加了个daemon.json文件,用于从私有仓库中拉镜像,文件大概长这样,主要是为了那行insercure-registries

 

 

 看了看好像也没啥问题。先看看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: log-opts: (from flag: map[max-size:50m max-file:5], from file: map[max-size:100m]) 

 配置冲突了。那解决问题倒是简单,冲突的配置删掉就好了。有点奇怪的就是以前也这么配置过,为啥以前好像没见过这个冲突。看看docker.service咋写的

 

 

 哎,好像跟以前不大一样,引入了很多变量。记得其他集群和网上能看到的大多数是这个格式“ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock”

 去看看这些变量是啥。找了找变量路径在docker.service同级目录下的docker.service.d目录中

 

  啊这。。。再看看docker版本

 

 行吧行吧,你赢了

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM