Closed pertsodian closed 2 years ago
I guess the other side of the argument is to create our own base image separately, instead of calling microdnf update in every build. This sounds like better idea..
In case someone else runs into this, but cannot afford to manage own base image, I think this could be a good alternative:
dockerBaseImage := "basestage",
dockerCommands := Seq(
Cmd("FROM", ActualBaseDockerImage, "as basestage"),
Cmd("RUN", "microdnf update -y && microdnf clean all"),
Cmd("")
) ++ dockerCommands.value
Expected behaviour
Allow via settings so that we can have the following in generated Dockerfile
As I understand, we need this so that we can stay up to date if there are any security updates
Actual behaviour
dockerCommands is a Seq so we can only append or prepend, or write from scratch
I would not mind writing from scratch since our use case is very simple. So I could just take the generated Dockerfile, add my favorite extra commands at my favorite spots and override the dockerCommands entirely.
However, with the multiple-layers changes, we have these /1 /2 etc. Those could look a little too raw (?), plus I'm not sure if they are subjected to be changed in subsequent versions.
Information
rpm --version
): 20.10.10