docker install on CentOS 6.9

在epel-repo有帶1.7的docker

yum -y install epel-release
yum -y install docker-io
#升級成1.9.1 參考 https://www.jianshu.com/p/31248c006c06
curl -sSL -O https://get.docker.com/builds/Linux/x86_64/docker-1.9.1
chmod +x docker-1.9.1
mv /usr/bin/docker /usr/bin/docker-1.7
cp ./docker-1.9.1 /usr/bin/docker

docker pull centos:6.9

有問題 先關掉service

service stop docker

#看起來是必須升級kernel
rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm 
yum –enablerepo=elrepo-kernel install kernel-lt -y

另外在CentOS 6.5實際測試,docker 1.7不能執行,主要原因是

relocation error: docker-1.7: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file libdevmapper.so.1.02 with link time reference 需要將libdevmapper更新: yum upgrade device-mapper-libs 

修改/etc/grub.conf 更改default

reboot

https://docs.docker.com/engine/breaking_changes/#engine-110

This entry was posted in System Administration. Bookmark the permalink.

Leave a Reply