更换国内源 /etc/apt/source.list
可以先apt-get install vim
#进入容器
docker exec -it 容器ID /bin/bashmv /etc/apt/source.list /etc/apt/source.list.bd
vim /etc/apt/source.list#此处我使用腾讯云的源
deb http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian-security buster/updates main
deb-src http://mirrors.cloud.tencent.com/debian/ buster main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.cloud.tencent.com/debian/ buster-backports main non-free contrib#此命令如果报错,需要更换其他源,我试了163源是不行的,腾讯源可以
apt-get update
参考文章:
Debian 更换国内源_debian 源-CSDN博客