技術文檔請注意釋出時間,盡量檢視1年以内的。
測試未通過,失敗!過程僅供參考
環境:
[[email protected] ~]# uname -r
2.6.32-754.35.1.el6.x86_64
現象:
阿裡雲Centos 6.10 更新清華源後無法安裝docker。檢視網上大佬的解釋說Docker 在 CentOS-6.5 或更高的版本的 CentOS 上時,要求系統為64位、系統核心版本為 2.6.32-431 或者更高版本。阿裡雲的這個版本更低 6.10。。。
解決:
0x01--先更新阿裡源
Centos6.10 YumRepo Error: All mirror URLs are not using ftp, http[s] or file.報錯解決方法--20220609已_⎛⎝世界⎠⎞的部落格-CSDN部落格
https://blog.csdn.net/sedbz/article/details/125207705?spm=1001.2014.3001.5501
0x02-- 安裝
[[email protected] ~]# yum install -y epel-release
Setting up Install Process
Package epel-release-6-8.noarch already installed and latest version
Nothing to do
// RPM
[[email protected] ~]# rpm -Uvh https://mirrors.tuna.tsinghua.edu.cn/elrepo/elrepo/el6/x86_64/RPMS/elrepo-release-6-12.el6.elrepo.noarch.rpm
// 安裝docker源
[[email protected] ~]# yum install https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
Setting up Install Process
docker-engine-1.7.1-1.el6.x86_64.rpm | 4.5 MB 00:01
Examining /var/tmp/yum-root-1Rjozo/docker-engine-1.7.1-1.el6.x86_64.rpm: docker-engine-1.7.1-1.el6.x86_64
Marking /var/tmp/yum-root-1Rjozo/docker-engine-1.7.1-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:1.7.1-1.el6 will be installed
--> Processing Dependency: libcgroup for package: docker-engine-1.7.1-1.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 0:0.40.rc1-27.el6_10 will be installed
--> Finished Dependency Resolution
=====================================================================================
Total size: 19 M
Total download size: 131 k
Installed size: 20 M
Is this ok [y/N]: y
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : libcgroup-0.40.rc1-27.el6_10.x86_64 1/2
Installing : docker-engine-1.7.1-1.el6.x86_64 2/2
Verifying : docker-engine-1.7.1-1.el6.x86_64 1/2
Verifying : libcgroup-0.40.rc1-27.el6_10.x86_64 2/2
Installed:
docker-engine.x86_64 0:1.7.1-1.el6
Dependency Installed:
libcgroup.x86_64 0:0.40.rc1-27.el6_10
Complete!
[[email protected] ~]#
0x03-- 驗證
[[email protected] ~]# docker
Usage: docker [OPTIONS] COMMAND [arg...]
A self-sufficient runtime for linux containers.
Options:
--api-cors-header= Set CORS headers in the remote API
-b, --bridge= Attach containers to a network bridge
--bip= Specify network bridge IP
-D, --debug=false Enable debug mode
-d, --daemon=false Enable daemon mode
// 如果報錯。則:
[[email protected] ~]# yum install -y docker-io
或者
[[email protected] ~]# curl -sSL https://get.docker.com | sh
引用:
centos6下安裝docker - 李東平|一線碼農 - 部落格園
https://www.cnblogs.com/newAndHui/p/13508784.html
CentOS6.8上Docker的安裝 - 知乎
https://zhuanlan.zhihu.com/p/86005932