Ubuntu 22.04 安装 docker

Ubuntu·Docker · 2024-11-26

删除旧版 docker

apt remove -y docker docker-engine docker.io containerd runc

更新包

apt update

安装依赖

apt install ca-certificates curl gnupg lsb-release -y

添加Docker官方GPG密钥

国内:

curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
# 出现错误,则执行
curl -s http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/NAME.gpg --import

添加Docker软件源

add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

安装docker

apt install docker-ce docker-ce-cli containerd.io -y
  1. RoWrism 2024-11-30

    Can I ask a quick question about your site? https://google.com/?Wrism

    RoWrism

    1. Etnous (作者)  2024-12-01
      @RoWrism

      Please

Theme Jasmine by Kent Liao