How to run vi on docker container?
问题 I have installed docker on my host virtual machine. And now want to create a file using vi . But it's showing me an error: bash: vi: command not found 回答1: login into container with the following command: docker exec -it <container> bash Then , run the following command . apt-get update apt-get install vim 回答2: Your container probably haven't installed it out of the box. Run apt-get install vim in the terminal and you should be ready to go. 回答3: The command to run depends on what base image