docker学习总结:启动失败,报错:unable to configure the Docker daemon with file

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/guangyacyb/article/details/85242613

ubuntu14.04 安装docker,照着步骤来,不知怎么就启动失败:

sudo service docker start

报错:

start: Job failed to start

查看日志:/var/log/upstart/docker.log,显示以下错误:

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:
 registry-mirrors: (from flag: [http://f2d6cb40.m.daocloud.io/], from file: [https://6l3iump6.mirror.aliyuncs.com])

从错误信息来看,应该是启动参数(flag)和配置文件 /etc/docker/daemon.json 的仓库冲突了,关于这个错误,官方教程有给出说明:Troubleshoot the daemon,其中flag 后面的 "http://f2d6cb40.m.daocloud.io/" 应该是 docker文件 /etc/default/docker 指定的~

但是我看不太懂,于是我按照错误信息,找到 /etc/docker/daemon.json 文件,把里面的内容从:

{                                                                
    "registry-mirrors": ["https://6l3iump6.mirror.aliyuncs.com"],
    "dns": ["10.11.56.23","10.11.56.22"]
}

改成了:

{ 
}

去掉了上面导致冲突的内容。再次执行:

sudo service docker start

可以正常启动了~

扫描二维码关注公众号,回复: 4653480 查看本文章

猜你喜欢

转载自blog.csdn.net/guangyacyb/article/details/85242613