1、需要的安装包
yum install -y yum-utils
2、设置阿里云镜像
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3、更新yum软件包索引
yum makecache fast
4、安装docker
yum install docker-ce docker-ce-cli containerd.io
5、启动docker
systemctl start docker
6、查看docker是否安装成功
docker version
7、运行hello-world
docker run hello-world