centos安装docker

卸载docker

yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine \
                  docker-ce

安装docker

yum install -y yum-utils \
           device-mapper-persistent-data \
           lvm2 --skip-broken

更新本地镜像源:

yum-config-manager \
    --add-repo \
    https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo

yum makecache fast

安装docker:

yum install -y docker-ce
systemctl start docker
posted @ 2023-10-10 15:15  IWing  阅读(6)  评论(0编辑  收藏  举报