重装docker engine

# 重装docker engine
ref:https://docs.docker.com/engine/install/centos/
摘要:卸载命令
Uninstall Docker Engine
Uninstall the Docker Engine, CLI, and Containerd packages:
$ sudo yum remove -y docker-ce docker-ce-cli containerd.io

Images, containers, volumes, or customized configuration files on your host are not automatically removed. To delete all images, containers, and volumes:
$ sudo rm -rf /var/lib/docker

You must delete any edited configuration files manually.

Install using the repository
安装准备工具
修改镜像源站点
#根据需要修改为腾讯云等等docker镜像站
正式安装
启动服务,设置开机启动
sudo yum install -y yum-utils
sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

sed -i 's%download.docker.com%mirrors.cloud.tencent.com/docker-ce%' /etc/yum.repos.d/docker-ce.repo    

sudo yum update -y
##sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo yum install docker-ce -y
systemctl daemon-reload
systemctl start docker
systemctl status docker
systemctl enable docker
posted @ 2022-05-24 22:31  leftoy  阅读(84)  评论(0)    收藏  举报