1. Switch the apt-get image source in docker to Tsinghua source
Backup source: mv /etc/apt/sources.list /etc/apt/sources.list.bak
execute new source
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. Execute apt-get update, and then install vim
apt-get update
apt-get install vim
3. Check whether it is successful
vim --help