I have been using Dockerfile for my project with a sample code like given below.
RUN groupadd syslog && apt-get update && apt-get -q install -y curl logrotate iproute2
I would like to convert this to pom.xml so that other micro-services can inherit it.
I surely cannot add this under build tag as I cannot and don't want this to get executed at the build time, I rather want this to set up logrotate in the container when the container starts up.
I tried adding few run commands, but that did not work. I am trying to understand which XML tag needs to be used for making sure my container RUNs the command on start up?
Your guidance will be highly appreciated.
Try runs: