今天同事突然反饋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版本
行吧行吧,你贏了