From 55032f07af7def1fa823cb31373268a95ef3c2fa Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 11 Feb 2023 08:33:20 +0000 Subject: [PATCH] Squash podman layers, not docker layers --- kernel.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel.go b/kernel.go index fafa25e..0c59bf9 100644 --- a/kernel.go +++ b/kernel.go @@ -98,7 +98,7 @@ func (cmd *KernelDockerRegenCmd) Run(kernelCmd *KernelCmd, g *Globals) (err erro args := []string{"build"} _, err = exec.Command("which", "podman").CombinedOutput() - if err != nil { + if err == nil { args = append(args, "--squash-all") } args = append(args, "-t", d.ContainerName, imagePath) @@ -354,7 +354,7 @@ func generateBaseDockerImage(registry string, commands []config.DockerCommand, args := []string{"build"} _, err = exec.Command("which", "podman").CombinedOutput() - if err != nil { + if err == nil { args = append(args, "--squash-all") } args = append(args, "-t", sk.DockerName(), imagePath) @@ -428,7 +428,7 @@ func dockerImageAppend(sk config.KernelMask, pkgname string) (err error) { args := []string{"build"} _, err = exec.Command("which", "podman").CombinedOutput() - if err != nil { + if err == nil { args = append(args, "--squash-all") } args = append(args, "-t", sk.DockerName(), imagePath)