美文网首页
docker安装

docker安装

作者: Arnoux | 来源:发表于2019-04-12 10:45 被阅读0次

    Ubuntu

    sudo apt-get remove docker docker-engine docker.io containerd runc
    sudo apt-get update
    sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get install -y docker-ce docker-ce-cli containerd.io
    sudo docker run hello-world
    

    Centos

    sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    sudo yum install -y docker-ce docker-ce-cli containerd.io
    yum list docker-ce --showduplicates | sort -r
    sudo yum install docker-ce-18.09.1 docker-ce-cli-18.09.1 containerd.io
    sudo systemctl start docker
    sudo docker run hello-world
    

    相关文章

      网友评论

          本文标题:docker安装

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