Docker build copying wrong linux kernel headers

128 Views Asked by At

I have two linux kernels installed on my machine: 5.15.0-52-generic and 5.15.73-rt52. The rt52 kernel is a kernel patched with PREEMPT_RT. When I boot into the PREEMPT_RT patched kernel and build a docker image, only the headers for 5.15.0-52-generic are copied into /usr/src in the image. On the host there are files for both 5.15.0-52-generic and 5.15.73-rt52 kernels in /usr/src. Why is Docker copying the wrong headers and how can I make it either copy all headers or copy the headers that are related to the kernel that I'm currently running on?

0

There are 0 best solutions below