解决办法使用apt-get install安装
更换国内源的时候会出现GPG无法验证的问题,故使用不用GPG验证的,因为docker容器没有验证GPG的工具所以只能先用这个源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
cat <<EOF >/etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
EOF
apt update
apt install vim
mv /etc/apt/sources.list.bak /etc/apt/sources.list