美文网首页
Centos7安装和卸载docker

Centos7安装和卸载docker

作者: 我的女友漏气了 | 来源:发表于2018-11-02 16:09 被阅读0次

    https://docs.docker.com/install/linux/docker-ce/centos/#install-using-the-convenience-script

    安装

    yum install -y gcc
    yum install -y yum-utils device-mapper-persistent-data lvm2
    yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    yum makecache fast
    yum -y install docker-ce
    systemctl start docker
    systemctl enable docker
    docker version
    mkdir -p /etc/docker
    vi /etc/docker/daemon.json

    {"registry-mirrors":["https://tzi94mpq.mirror.aliyuncs.com"]}

    systemctl daemon-reload
    systemctl restart 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
    systemctl stop docker
    yum remove docker-ce
    rm -rf /var/lib/docker
    2019-03-19 补充
    网络慢,下载镜像慢,终止了,文件可能被锁了。卸了B的,重装。
    记得删除/etc/docker/daemon.json

    相关文章

      网友评论

          本文标题:Centos7安装和卸载docker

          本文链接:https://www.haomeiwen.com/subject/fxscxqtx.html