ITPub博客

首页 > 云计算 > > 解决docker官方源安装不上的问题

解决docker官方源安装不上的问题

作者:浪花小雨滴 时间:2020-05-11 18:03:56 0 删除 编辑

官方文档有毒 源下不下来 所以这里使用阿里源下载

-------------

Docker 官方apt仓库(不能用)

# 添加 Docker 官方的 GPG 密钥(为了确认所下载软件包的合法性,需要添加软件源的 GPG 密钥)

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

# 设置稳定版本的apt仓库地址

$ sudo add-apt-repository \
   "deb [arch=amd64] Index of linux/ubuntu/ \
   $(lsb_release -cs) \
   stable"

如果你已经添加过官网的源 请在/etc/apt/sources.list 最后那几行删掉(有一个是那刚才添加的国外deb源 不然你每次apt update 都会爆一个蛋疼的错Failed to fetch https://apt.dockerproject.org/repo/dists/ubun),然后执行下面的阿里云安装源

------------

阿里云 apt仓库

$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
     "deb [arch=amd64] Index of /docker-ce/linux/ubuntu/ \
     $(lsb_release -cs) \
     stable"

———————————————

版权声明:本文为CSDN博主「ghostyusheng」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。

原文链接:ubuntu docker-ce最新版安装,docker官方源安装不上,W: Failed to fetch https://apt.dockerproject.org/repo/dists/ubun

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31537575/viewspace-3169246/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-05-16

  • 博文量
    4259
  • 访问量
    39921