安装步骤:
- 下载docker-ce的repo
curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
2. 安装依赖(这是相比centos7的关键步骤)
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
遇到需要选择的就直接选择y就可以
- 安装docker-ce
yum install docker-ce
- 启动docker
systemctl start docker
5.添加到开机启动
sudo systemctl enable docker
6.验证docker是否安装成功
docker version