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

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

可以正常启动了~

 

 

 

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值