Install both headers and image
This commit is contained in:
parent
c0dd0ae07b
commit
a5bfe334cb
@ -305,8 +305,9 @@ func generateBaseDockerImage(registry string, commands []config.DockerCommand,
|
|||||||
d += "RUN apt-get update\n"
|
d += "RUN apt-get update\n"
|
||||||
d += "RUN apt-get install -y build-essential libelf-dev\n"
|
d += "RUN apt-get install -y build-essential libelf-dev\n"
|
||||||
d += "RUN apt-get install -y wget git\n"
|
d += "RUN apt-get install -y wget git\n"
|
||||||
// Install a single kernel to ensure all dependencies are cached
|
// Install a single kernel and headers to ensure all dependencies are cached
|
||||||
d += "RUN apt-get install -y $(apt-cache search --names-only '^linux-headers-[0-9\\.\\-]*-generic' | awk '{ print $1 }' | head -n 1)\n"
|
d += "RUN 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"
|
||||||
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"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user