https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-20.10.21-3.el7.x86_64.rpm
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.6.9-3.1.el7.x86_64.rpm
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-20.10.21-3.el7.x86_64.rpm
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-rootless-extras-20.10.21-3.el7.x86_64.rpm
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-compose-plugin-2.12.2-3.el7.x86_64.rpm
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-scan-plugin-0.21.0-3.el7.x86_64.rpm
yum install -y --downloadonly --downloaddir=./ *.rpm
#打包整个目录
tar -cvf docker10.20.21.tar *
yum install -y *.rpm
启动和运行docker服务
systemctl enable docker.service docker.socket containerd.service
systemctl start docker.service docker.socket containerd.service
#检测安装结果
systemctl status docker.service docker.socket containerd.service
docker version
docker info