在使用centos8.1安装docker时相比centos7版本会遇到一些问题,所以记录下方便其他的同学。
Uninstall old versions
$ sudo yum remove docker
docker-client
docker-client-latest
docker-common
docker-latest
docker-latest-logrotate
docker-logrotate
docker-engine
Install using the repository
$ sudo yum install -y yum-utils
$ sudo yum-config-manager
–add-repo
https://download.docker.com/linux/centos/docker-ce.repo
###安装docker-ce时会需要这个包,所以要先装好。
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
Install Docker Engine
$ sudo yum install docker-ce -y
$ sudo systemctl start docker
$ sudo systemctl enbale docker
$ sudo docker run hello-world