Store the default kernel modules
This commit is contained in:
parent
3ec919abc1
commit
668bc1e391
@ -250,9 +250,11 @@ type KernelInfo struct {
|
|||||||
ContainerName string
|
ContainerName string
|
||||||
|
|
||||||
// Runtime information
|
// Runtime information
|
||||||
KernelPath string
|
KernelPath string
|
||||||
InitrdPath string
|
InitrdPath string
|
||||||
RootFS string
|
ModulesPath string
|
||||||
|
|
||||||
|
RootFS string
|
||||||
|
|
||||||
// Debug symbols
|
// Debug symbols
|
||||||
VmlinuxPath string
|
VmlinuxPath string
|
||||||
|
15
kernel.go
15
kernel.go
@ -482,6 +482,13 @@ func copyKernels(name string) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmd = exec.Command("docker", "cp", containerID+":/lib/modules", target)
|
||||||
|
rawOutput, err = cmd.CombinedOutput()
|
||||||
|
if err != nil {
|
||||||
|
log.Println(string(rawOutput))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -658,9 +665,11 @@ func genDockerKernels(dii dockerImageInfo, newkcfg *config.KernelConfig,
|
|||||||
KernelRelease: k,
|
KernelRelease: k,
|
||||||
ContainerName: name,
|
ContainerName: name,
|
||||||
|
|
||||||
KernelPath: kernelsBase + genKernelPath(files, k),
|
KernelPath: kernelsBase + genKernelPath(files, k),
|
||||||
InitrdPath: kernelsBase + genInitrdPath(files, k),
|
InitrdPath: kernelsBase + genInitrdPath(files, k),
|
||||||
RootFS: rootfs,
|
ModulesPath: kernelsBase + "modules/" + k,
|
||||||
|
|
||||||
|
RootFS: rootfs,
|
||||||
}
|
}
|
||||||
newkcfg.Kernels = append(newkcfg.Kernels, ki)
|
newkcfg.Kernels = append(newkcfg.Kernels, ki)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user