1
0

Cleanup after cache kernel package dependencies

This commit is contained in:
dump_stack() 2023-04-07 16:27:56 +00:00
parent 3f8c7fd86b
commit 32b692f752
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -307,7 +307,8 @@ func generateBaseDockerImage(registry string, commands []config.DockerCommand,
d += "RUN apt-get install -y wget git\n" d += "RUN apt-get install -y wget git\n"
// Install a single kernel and headers to ensure all dependencies are cached // Install a single kernel and headers to ensure all dependencies are cached
d += "RUN export PKGNAME=$(apt-cache search --names-only '^linux-headers-[0-9\\.\\-]*-generic' | awk '{ print $1 }' | head -n 1); " + d += "RUN export PKGNAME=$(apt-cache search --names-only '^linux-headers-[0-9\\.\\-]*-generic' | awk '{ print $1 }' | head -n 1); " +
"apt-get install -y $PKGNAME $(echo $PKGNAME | sed 's/headers/image/')\n" "apt-get install -y $PKGNAME $(echo $PKGNAME | sed 's/headers/image/'); " +
"apt-get remove -y $PKGNAME $(echo $PKGNAME | sed 's/headers/image/')\n"
if sk.DistroRelease >= "14.04" { if sk.DistroRelease >= "14.04" {
d += "RUN apt-get install -y libseccomp-dev\n" d += "RUN apt-get install -y libseccomp-dev\n"
} }