Since you are using a ready-made Docker image, and want additional package(s) on top of it, writing a Dockerfile would be "automation" of the commands. Using this you can create a new image with what you want pre-installed.
RUN apt-get update && apt-get upgrade && apt-get install -y vim
Then use the
docker build command to build an image with a name (tag) that you want.
Example below creates image named
my-phpapache:7.4, you can use a name that makes sense to you. This image will have
docker build -t my-phpapache:7.4 .
., this should be run in the same directory as the
You may find that using the
Dockerfile to copy configuration into the image may eliminate the need to have
vim installed in it.