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.
Example Dockerfile
:
FROM pimcore/pimcore:PHP7.4-apache
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 vim
installed.
docker build -t my-phpapache:7.4 .
Note the .
, this should be run in the same directory as the Dockerfile
.
You may find that using the Dockerfile
to copy configuration into the image may eliminate the need to have vim
installed in it.