1.进入docker容器
docker exec -it xxx /bin/bash
2.执行安装命令(apt-get 或者yum)
apt-get update apt-get install -y vim
如果apt-get命令失败,则使用yum命令