- 一般docker容器中不会安装vim,直接apt安装出现以下错误

更改源
mv /etc/apt/sources.list /etc/apt/sources.list.bakecho "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free" >/etc/apt/sources.listecho "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free" >>/etc/apt/sources.listecho "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free" >>/etc/apt/sources.listecho "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free" >>/etc/apt/sources.list

执行apt-get update

- 安装 apt-get install -y vim

- 之后可以正常使用vim
