1.切换docker内apt-get镜像源为清华源
备份源:mv /etc/apt/sources.list /etc/apt/sources.list.bak
执行新源
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" >/etc/apt/sources.list
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free" >>/etc/apt/sources.list
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >>/etc/apt/sources.list
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >>/etc/apt/sources.list
2.执行apt-get update,然后安装vim
apt-get update
apt-get install vim
3.检查是否成功
vim --help