鍍金池/ 問答/Linux/ Docker啟動容器時出現(xiàn)錯誤

Docker啟動容器時出現(xiàn)錯誤

在centos7(裝在虛擬機(jī)上)中用docker啟動一個hadoop容器
命令如下:
docker run -i -t --name Master2 -h Master2 registry.cn-hangzhou.aliyuncs.com/kaibb/hadoop /bin/bash
然后出現(xiàn)了如下錯誤:
Error response from daemon: updating the store state of sandbox failed: failed to update store for object type *libnetwork.sbState: json: cannot unmarshal object into Go struct field sbState.ExtDNS of type string.
請問各位大佬這個問題是怎么回事,是docker版本低了還是需要設(shè)置非默認(rèn)的DNS?

回答
編輯回答
不將就

rm -rf /var/lib/docker 然后重啟docker確實可以解決這個問題,但是鏡像全部沒有了

2017年10月27日 06:46
編輯回答
維他命

我只要運(yùn)行docker build就會報錯
sj@sj-Lenovo-Y520-15IKBN:~$ docker build -t hello-docker . Sending build context to Docker daemon 1.473GB Step 1/10 : FROM ubuntu ---> 16508e5c265d Step 2/10 : MAINTAINER SJ ---> Using cache ---> 9793b5597c05 Step 3/10 : RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 ---> Running in c321977f3fef E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation The command '/bin/sh -c apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10' returned a non-zero code: 255

2017年8月2日 09:09
編輯回答
不將就

正在運(yùn)行的十幾個鏡像加容器,全被樓上一個rm命令毀了,樓上有搞清楚你要刪的是什么嗎?毀不該輕信你,不要在這里禍害別人了!

2017年10月15日 22:00
編輯回答
舊城人

運(yùn)行

rm -rf /var/lib/docker

再重啟docker

看評論有感:不理解rm等基本命令,就不要學(xué)docker了。

2017年11月16日 15:30