After we setup a docker container, we may want to edit files inside the container. And, sometime we may get the error message on our terminal stating “bash: vi: command not found”
First go inside the docker container by typing the command below. Here we will be using the bash shell.
docker exec -it <container-name> bash
Next, we need to update the linux environment and can then install the vim editor.
apt-get update
apt-get install vim
You can begin using the vim editor to edit files inside the docker container now.