美文网首页
Ubuntu20国内安装Docker记录(2024-7)

Ubuntu20国内安装Docker记录(2024-7)

作者: AntiGravity | 来源:发表于2024-07-23 21:40 被阅读0次

    原文

    1. sudo apt update
    2. sudo apt install apt-transport-https ca-certificates curl software-properties-common
    3. sudo -i
    4. curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-ce.gpg
    5. sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
    6. sudo apt update
    7. sudo apt install docker-ce docker-ce-cli containerd.io
    8. sudo nano /etc/docker/daemon.json
    {
    "registry-mirrors": [
            "https://registry.docker-cn.com",
            "https://docker.mirrors.ustc.edu.cn",
            "https://hub-mirror.c.163.com",
            "https://mirror.baidubce.com",
            "https://ccr.ccs.tencentyun.com"
        ]
    }
    
    1. sudo systemctl daemon-reload
    2. sudo systemctl restart docker
    3. sudo docker run hello-world //for test

    相关文章

      网友评论

          本文标题:Ubuntu20国内安装Docker记录(2024-7)

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