mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-05-16 22:14:48 +00:00
* separate kernel series hashing Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de> * fix issues with the update component sha script - add bsd/gnu cross compatibility for sed - also replace in */test.sh files - replace potentially problematic xargs - remove potentially problematic word boundary \b Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de> * Move common kernel files to dedicated folder Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de> * run update-kernel-yamls Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de> --------- Signed-off-by: Chris Irrgang <chris.irrgang@gmx.de>
24 lines
646 B
Docker
24 lines
646 B
Docker
# This Dockerfile extracts the kernel headers from the kernel image
|
|
# and then compiles a simple hello world kernel module against them.
|
|
# In the last stage, it creates a package, which can be used for
|
|
# testing.
|
|
|
|
FROM linuxkit/kernel:6.12.59-0ef72d722190ecfe0b3b37711f9a871a696e301a AS ksrc
|
|
|
|
# Extract headers and compile module
|
|
FROM linuxkit/kernel:6.6.71-builder AS build
|
|
RUN apk add build-base elfutils-dev
|
|
|
|
COPY --from=ksrc /kernel-dev.tar /
|
|
RUN tar xf kernel-dev.tar
|
|
|
|
WORKDIR /kmod
|
|
COPY ./src/* ./
|
|
RUN make all
|
|
|
|
# Package
|
|
FROM alpine:3.17
|
|
COPY --from=build /kmod/hello_world.ko /
|
|
COPY check.sh /check.sh
|
|
ENTRYPOINT ["/bin/sh", "/check.sh"]
|