1、卸载旧版
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
2。设置仓库 Set up the repository
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3、安装
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
4、启动
sudo systemctl start docker
5、测试运行hello-world 镜像
sudo docker run hello-world
Install Docker Engine on CentOS | Docker Docs
标签:Engine,CentOS,sudo,ce,yum,Docker,docker From: https://www.cnblogs.com/lrzy/p/17735979.html