docker中ubuntu源更新慢加速 换为国内

Posted Alex·G

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker中ubuntu源更新慢加速 换为国内相关的知识,希望对你有一定的参考价值。

本来以为是Ubuntu打包的镜像,换了阿里源老是报错100公钥不可用,结果发现是Debian的操作系统,换位Debian的操作系统打包的,换位Debian的源即可

#源如果使用错误也会报错,没有Debian10的源,使用9.x的阿里源也能解决解决

cat /etc/issue  #查看版本
cat /etc/os-release 

cat > /etc/apt/sources.list <<eof
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
eof


########################################################
cat > /etc/apt/sources.list <<eof
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
eof

  

  

 

 

 

 

以上是关于docker中ubuntu源更新慢加速 换为国内的主要内容,如果未能解决你的问题,请参考以下文章

004_加速国内docker源下载速度

Docker中使用163 Hub 镜像下载加速(Centos 6)

Docker-镜像源加速配置

Nuget镜像国内加速

Ubuntu18.04下修改docker镜像源

Yarn 国内加速,修改镜像源