官方指导文档
https://docs.docker.com/engine/install/centos/
1.卸载旧的 (首次安装可以跳过这步)
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
2.设置 Docker 存储库
sudo yum install -y yum-utils sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
3.安装 Docker 引擎
sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin
4.启动 Docker
sudo systemctl start docker
5.通过运行hello world 镜像 来验证 Docker 引擎是否已正确安装
sudo docker run hello-world
扩展
1.查看docker运行状态
systemctl status docker
参考资料:
https://www.bilibili.com/video/BV1gr4y1U7CY/?p=11&vd_source=6176e79b66461eb74da787cb8321925b
标签:centos,sudo,ce,yum,docker,Docker,搭建 From: https://www.cnblogs.com/liqi175/p/16759931.html