How to add vi editor


Hi to all !

Do you know how we can add vi editor to a docker image ?


Hi, which base image are you using (what’s the FROM .... line in your Dockerfile)? That depends on what’s your operating system inside your container. For example if you use resin/raspberrypi3-debian, then it’s Debian based, and you install packages using apt-get. That would mean, you could install packages by having a line like this in your Dockerfile:

RUN apt-get update && apt-get install -y <packages>

where you would need to replace <packages> with the names of the packages you need. You need to search for your required packages. I don’t use vi myself, but seems like either the vim package or elvis-tiny should be suitable for you:

RUN apt-get update && apt-get install -y elvis-tiny