Install vi command in docker container

  1. When using the docker container, sometimes there is no vim installed in it. When you type the vim command, the prompt says: vim: command  not  found, you need to install vim at this time, but when you type the apt-get install vim command, it prompts:  
  2. Reading package lists... Done  
  3. Building dependency tree         
  4. Reading state information... Done  
  5. E: Unable to locate package vim  
  6. At this time, you need to type: apt-get  update . The function of this command is to synchronize the indexes of the sources listed in /etc/apt/sources.list and /etc/apt/sources.list.d, so that the latest version can be obtained. package.  
  7. After the update is complete, type the command: apt-get install vim command.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326618063&siteId=291194637