1 检查linxu 内核版本,需要大于 3.10
uname -r
2 安装命令
1 sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2 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
4 sudo yum install docker-ce docker-ce-cli
3 启动docker
sudo systemctl start docker
4 查看是否正常启动,有 client 和 service 两个服务即可
docker version
5 设置开机自动启动
sudo systemctl enable docker
注意:centos 8 默认安装 podman(类似docker的软件) ,会导致启动docker 时失败,可以先卸载。
-
查看是否安装 Podmanrpm -q podman
-
删除Podmandnf remove podman
文章评论
These are truly great ideas in regarding blogging. You have touched some good things here. Any way keep up wrinting. Reid Summerlin
Anytime you want to game, you can recreation on-line. Nerta Sigismondo Lally
Hello! This is my 1st comment here so I just wanted to give a quick shout out and tell you I really enjoy reading your posts. Ken Heath