Docker在 centos 6.x 下面默认最新的版本是1.7, 然而这个并不符合我的实际需求, 尤其我需要 docker-compose 来作为编配工具部署swarm, 所以只有使用二进制的安装包了
首先参考官方文档,
我下载了最新的 Docker binary 版本, 然后卸载了原来的版本,
yum erase docker-engine
然后
mv docker/* /usr/bin
然后
sudo dockerd &
然后出错啦....
[root@dev141 src]# INFO[0000] libcontainerd: new containerd process, pid: 29287 WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=4096ERRO[0001] devmapper: Udev sync is not supported. This will lead to data loss and unexpected behavior. Install a dynamic binary to use devicemapper or select a different storage driver. For more information, see https://docs.docker.com/engine/reference/commandline/daemon/#daemon-storage-driver-option ERRO[0001] [graphdriver] prior storage driver "devicemapper" failed: driver not supported FATA[0001] Error starting daemon: error initializing graphdriver: driver not supported
然后我开始写这篇文章, 方便自己哪天忘了...
安装 centos 6.x 缺的
yum install udev udev-devel device-mapper-libs
然后错误依旧...
然后我醒悟过来, 删掉了/var/lib/docker, 然后就好了...至于为什么... 我想可能是数据格式不一致了... 待后面有时间深入研究...