美文网首页Docker容器Docker容器技术
在ubuntu18.04中使用清华源安装docker

在ubuntu18.04中使用清华源安装docker

作者: jagitch | 来源:发表于2019-08-09 17:40 被阅读1次

卸载旧版本

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

安装

  1. 更新包索引
sudo apt-get update
  1. 安装可以通过https使用仓库的一些相关包
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
  1. 添加GPG key
curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
  1. 验证指纹
sudo apt-key fingerprint 0EBFCD88

应该得到如下内容

pub   rsa4096 2017-02-22 [SCEA]
      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
sub   rsa4096 2017-02-22 [S]
  1. 添加docker-ce的仓库
sudo add-apt-repository \
   "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
  1. 更新包索引
sudo apt-get update
  1. 安装docker
sudo apt-get install docker-ce docker-ce-cli containerd.io

相关文章

网友评论

    本文标题:在ubuntu18.04中使用清华源安装docker

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