美文网首页
安装docker

安装docker

作者: 飞跑的蛤蟆 | 来源:发表于2021-02-06 19:21 被阅读0次

    卸载旧版本的docker

    sudo apt-get remove docker docker-engine docker.io containerd runc
    

    更新apt源Update the apt package index

    sudo apt-get update
    

    安装一些包让apt源使用https install packages to allow apt to use a repository over HTTPS:

    sudo apt-get install \
        apt-transport-https \
        ca-certificates \
        curl \
        gnupg-agent \
        software-properties-common
    

    添加 docker官方的GPK密钥 Add Docker’s official GPG key:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    

    添加docker标准版的镜像源 Use the following command to set up the stable repository.

    sudo add-apt-repository \
       "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) \
       stable"
    

    Update the apt package index

    sudo apt-get update
    

    install the latest version of Docker Engine and containerd, or go to the next step to install a specific version:

    sudo apt-get install docker-ce docker-ce-cli containerd.io
    

    将当前用于加入到docker组里 adding your user to the “docker” group

    sudo usermod -aG docker <your-user>
    

    更新docker组

    newgrp docker
    

    相关文章

      网友评论

          本文标题:安装docker

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