1
0

Squash podman layers, not docker layers

This commit is contained in:
dump_stack() 2023-02-11 08:33:20 +00:00
parent bb7c2f94d5
commit 55032f07af
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -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)