问题:出现官网源无法完全下载的问题
解决方案:
1.换源
sudo apt edit-sources 或是 sudoedit /etc/apt/sources.list然后默认 然后就可以写入了
然后就可以加入阿里镜像源非常nice!
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
更新源列表并安装依赖文件
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common
获取密钥
curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/debian/gpg | sudo apt-key add -
1) 添加docker下载源(amd64版本,如使用树莓派开发板则使用arm版本):
sudo add-apt-repository
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/debian
$(lsb_release -cs)
stable"
以下指令均以sudo执行
apt update
apt install -y docker-ce
systemctl start docker
systemctl enable docker