https://docs.docker.com
安装
1、查看内容版本
[martin@localhost ~]$ sudo cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
2、卸载就版本
[martin@localhost ~]$ sudo yum remove docker ^Ccker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate
3、安装仓库
[root@localhost ~]# sudo yum install -y yum-utils
[root@localhost ~]# sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
4、开启存储仓库
[root@localhost ~]# sudo yum-config-manager --enable docker-ce-nightly
5、开启测试仓库(执行4即可,5不用执行)
[root@localhost ~]# sudo yum-config-manager --enable docker-ce-test
6、查询可安装的版本
7、安装docker
[root@localhost ~]# yum -y install docker-ce-20.10.9
8、启动docker
[root@localhost ~]# sudo systemctl start docker