docker apt-get 换源加速

docker apt-get 换源加速

Scroll Down

找了很多个都没啥效果,下面这个是亲测有效的,记录下

先备份下

cp /etc/apt/sources.list /etc/apt/sources.list.bak

echo追加

echo 'deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free' >>/etc/apt/sources.list
echo 'deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free' >>/etc/apt/sources.list

更新apt

apt-get update

apt-get install vim