1
0

fix: try to install debian packages 3 times

This commit is contained in:
dump_stack() 2023-05-16 17:52:15 +00:00
parent f906e3187f
commit f5b1283690
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -216,20 +216,24 @@ func ContainerCommands(km config.KernelMask) (commands []string) {
"/etc/apt/sources.list") "/etc/apt/sources.list")
} }
cmdf("apt-get update") cmdf("{ apt-get update || apt-get update || apt-get update }")
cmdf("apt-get install -y wget build-essential libelf-dev git")
cmdf("apt-get install -y kmod linux-base") packages := "wget build-essential libelf-dev git kmod linux-base "
cmdf("apt-get install -y initramfs-tools") packages += "initramfs-tools "
switch release { switch release {
case Wheezy: case Wheezy:
cmdf("apt-get install -y gcc-4.6") packages += "gcc-4.6 "
} }
if release < 9 { if release < 9 {
cmdf("apt-get install -y module-init-tools") packages += "module-init-tools "
} }
cmfd("{ apt-get install -y %s "+
"|| apt-get install -y %s "+
"|| apt-get install -y %s }", packages, packages, packages)
cmdf("mkdir -p /lib/modules") cmdf("mkdir -p /lib/modules")
return return