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

前端之家收集整理的这篇文章主要介绍了ubuntu docker-ce最新版安装,docker官方源安装不上,W: Failed to fetch https://apt.dockerproject.org/repo/dists/ubun前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

-------------
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] https://download.docker.com/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] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
     $(lsb_release -cs) \
     stable"
原文链接:https://www.f2er.com/ubuntu/349511.html

猜你在找的Ubuntu相关文章