Docker容器中使用vim命令提示bash: vim: command not found

有时候需要临时修改Docker容器中的配置,但是在修改文件时无法使用vim命令:


  root@nginx:/etc/nginx# vim nginx.conf 
  bash: vim: command not found
  root@nginx:/etc/nginx# 

此时需要在容器中手动安装vim


  apt-get update
  apt-get install vim

posted @ 2021-12-16 22:39  ipaler  阅读(269)  评论(0)    收藏  举报