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

可以正常启动了~

 

 

 

你可能感兴趣的:(docker)