I currently have my host system running Mac OS with docker. I have my Mac OS host system spawning a docker container.
The spawned docker container is currently running ubuntu:19.10
I am trying to build a kernel module inside the docker container
When I run
$> make
I get...
Building coolMod driver...
make -C /lib/modules/`uname -r`/build M=/home/foo/coolMod modules
make[1]: *** /lib/modules/4.19.76-linuxkit/build: No such file or directory. Stop.
make: *** [Makefile:43: coolMod.ko] Error 2
The docker container does not have the kernel headers.
When I try to run:
$> apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.19.76-linuxkit
E: Couldn't find any package by glob 'linux-headers-4.19.76-linuxkit'
E: Couldn't find any package by regex 'linux-headers-4.19.76-linuxkit'
How can I install kernel headers so I can build a kernel module from within my Docker container?
Thank you!