docker-ce

1. 下载docker-ce的repo

curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo

2. 安装依赖(centos7 不用这一步,centos8需要)

yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

3. 安装docker-ce

yum install docker-ce

4. 启动docker

systemctl start docker

卸载

1. 查询安装过的包

yum list installed | grep docker

输出:

docker-ce.x86_64 ……

docker-ce-cli.x86_64

2. 删除安装的软件包

yum -y remove docker-ce.x86_64

yum -y remove docker-ce-cli.x86_64

3. 删除镜像/容器等

rm -rf /var/lib/docker/

4. 输入docker或docker –version验证是否卸载

docker --version

输出:

-bash: /usr/bin/docker: No such file or directory

posted @ 2021-07-13 09:42  charmtool  阅读(50)  评论(0编辑  收藏  举报