信息提示
官方参考地址:https://docs.docker.com/install/linux/docker-ce/centos/
里面包含包下载地址: https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
安装方法和Centos7安装差别不大,可参考我的博客:https://blog.csdn.net/weixin_42182572/article/details/105992925
1、安装依赖
$ yum install -y yum-utils device-mapper-persistent-data lvm2
$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ yum makecache fast
2、安装新版本containerd.io (需要根据网址查找更换)
$ dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
3、安装docker
$ yum install docker-ce docker-ce-cli
4、启动docker
$ systemctl start docker
5、docker开机自启
$ systemctl enable docker