1:进入docker环境
docker exec -it php bash
2:修改apt源 我的镜像是debin9
cd /etc/apt
echo "">sources.list
echo "deb http://mirrors.163.com/debian/ buster main non-free contrib">>sources.list
echo "deb http://mirrors.163.com/debian/ buster-updates main non-free contrib">>sources.list
echo "deb http://mirrors.163.com/debian/ buster-backports main non-free contrib">>sources.list
echo "deb-src http://mirrors.163.com/debian/ buster main non-free contrib">>sources.list
echo "deb-src http://mirrors.163.com/debian/ buster-updates main non-free contrib">>sources.list
echo "deb-src http://mirrors.163.com/debian/ buster-backports main non-free contrib">>sources.list
echo "deb http://mirrors.163.com/debian-security/ buster/updates main non-free contrib">>sources.list
echo "deb-src http://mirrors.163.com/debian-security/ buster/updates main non-free contrib">>sources.list
3:更新apt
apt-get update
4:安装vim
apt-get install vim