Get Image
SLE 15 SP6 Kernel Module Development Container
Description
The SLE 15 SP6 Kernel Module Development Container Image includes all necessary tools to build kernel modules for SLE and SLE Micro. It is intended to be used for building out-of-tree kernel modules in restricted environments for the SLE kernel.
Usage
The image can be used to launch a container and build a kernel module. The following example below shows how to do this for the DRBD kernel module:
$ podman run --rm -it --name drbd-build registry.suse.com/bci/bci-sle15-kernel-module-devel:15.6
# zypper -n in coccinelle tar
# curl -Lsf -o - https://pkg.linbit.com/downloads/drbd/9/drbd-9.2.11.tar.gz | tar xzf -
# cd drbd-9.2.11/
# make -C drbd all KDIR=/usr/src/linux-obj/$(uname -m)/default
The built kernel module is then available in
/drbd-9.2.11/drbd/build-current/drbd.ko
. It can be copied to the host system
as follows:
$ podman cp drbd-build:/drbd-9.2.11/drbd/build-current/drbd.ko .
$ sudo modprobe drbd.ko
Alternatively, the kernel module can be built as part of a container build using
a Dockerfile
:
FROM registry.suse.com/bci/bci-sle15-kernel-module-devel:15.6
ENV DRBD_VERSION=9.2.11
WORKDIR /src/
RUN zypper -n in coccinelle tar
RUN set -euxo pipefail; \
curl -Lsf -o - https://pkg.linbit.com/downloads/drbd/9/drbd-${DRBD_VERSION}.tar.gz | tar xzf - ; \
cd drbd-${DRBD_VERSION}; \
make -C drbd all KDIR=/usr/src/linux-obj/$(uname -m)/default
Build the container image, launch the container, and copy the kernel module to the local machine:
$ buildah bud --layers -t drbd-ko .
$ podman run --name drbd drbd-ko
$ podman cp drbd:/src/drbd-9.2.11/drbd/build-current/drbd.ko .
$ podman rm drbd
Licensing
SPDX-License-Identifier: MIT
This documentation and the build recipe are licensed as MIT. The container itself contains various software components under various open source licenses listed in the associated Software Bill of Materials (SBOM).
This image is a tech preview. Do not use it for production. Your feedback is welcome. Please report any issues to the SUSE Bugzilla.
-
Image Data
Last Built: 23 Sep 08:52 UTC
Compressed Size: 213.3 MB
Uncompressed Size: 697.1 MB
Support Level: Techpreview
-
-
Health Index
ANo vulnerabilities found
Last Scan:
4 days ago