1.进入容器 docker exec -it 容器名称(容器ID) /bin/bash
[root@localhost ~]# docker exec -it jax-tomcat2 /bin/bash
2.更新 apt-get update
[root@e77e903e08ef:/usr/local/tomcat# apt-get update
3.下载 aptt install vim
apt-get install vim
---------------------------------------------------------------------------
# apt-get update 升级vim
# apt-get install vim 安装vim
root@6e98acc7698b:/# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim