From 31370b7bad952c11b042513f7d57880edcbf401d Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 10 May 2023 11:20:07 +0000 Subject: [PATCH] Reduce layers --- kernel.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel.go b/kernel.go index 80d1eb0..a13d7e5 100644 --- a/kernel.go +++ b/kernel.go @@ -477,10 +477,11 @@ func generateBaseDockerImage(registry string, commands []config.DockerCommand, d += "RUN sed -i 's;installonly_limit=;installonly_limit=100500;' /etc/yum.conf /etc/dnf/dnf.conf || true\n" d += "RUN yum -y update\n" d += "RUN yum -y groupinstall 'Development Tools'\n" - d += "RUN yum -y install linux-firmware grubby\n" + packages := "linux-firmware grubby" if sk.DistroRelease <= "7" { - d += "RUN yum -y install libdtrace-ctf\n" + packages += " libdtrace-ctf" } + d += fmt.Sprintf("RUN yum -y install %s\n", packages) default: err = fmt.Errorf("%s not yet supported", sk.DistroType.String()) return