I have two different server machine with gitlab-runner hosted. I use one as development version, the other one as production release. I have the same configuration on both machine, so the lastest release of gitlab-runner and the lastest release of Docker/docker-compose.
Into my dockerfiles I need to download net-tools package in order to use netstat command. The builder docker is an official image of OpenJDK 14 and it is RHEL based. So, in order to install a new package, i can use only dnf/microdnf or yum.
Ok, everything should work simple and clear as exposed so far. But... when the machines try to run the command:
RUN microdnf install net-tools
On staging machine:
/bin/sh: microdnf: command not found
Instead, on production machine:
Job succeeded.
Okay, so what about yum? Let's change Dockerfile's net-tools installation
RUN yum install net-tools -y
Pipeline started, job scheduled and... staging machine:
Job succeeded.
On production machine, as you can figure:
/bin/sh: yum: command not found
I feel i little bit trapped because there is not another way to install package (dnf should be another possible way but it is not install on both docker images) and I don't want apply a workaround that can "test" the installation via microdnf or yum.
I hope I've made the problem as clear as I can.