在阿里云上安装了docker 但是无法启动服务,执行命令:service docker start,系统提示:start: Job failed to start
执行docker -d 出现如下提示:FATA[0000] Shutting down daemon due to errors: Could not find a free IP address range for interface 'docker0'. Please configure its address manually and run 'docker -b docker0'
后来我查资料,docker 自动默认生成的ip路由和阿里云的地址存在冲突,执行如下内容:
删除172的路由命令为route del -net 172.16.0.0 netmask 255.240.0.0
我再次执行,系统正常:
root@iZ94k8m3d7gZ:/# service docker restart
stop: Unknown instance:
docker start/running, process 6267
另外为了永久的删除这条路由,可以执行如下方法:
第一步vi /etc/network/interfaces## 把 "up route add -net 172.16.0.0 netmask 255.240.0.0 gw 10.170.191.247 dev eth0" 这一行注释掉(在这一行最前面加'#')
第二步/etc/init.d/networking restart