安装docker
一、版本要求
系统版本:CentOS 7及以上,内核版本:3.8及以上
查看系统版本
cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)
查看内核版本
uname -a
Linux target 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
二、yum安装gcc相关
yum install gcc-c++
三、安装需要的软件包
Set up the repository
yum install -y yum-utils
四、设置镜像仓库
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
安装docker-ce前:更新yum软件包的索引
centos 7:
yum makecache fast
centos 8:
yum