Tech Preview

SLE BCI SLE 15 SP5 Kernel Module Development

SLE 15 Kernel module development container based on the SLE Base Container Image.

Get Image
Digest:
sha256:02b5e99ac6c32e32d04e2a252271695c66f2fd7053aa35a017ccd672cb44f2bd
02b5e99ac
Repository:
registry.suse.com/bci/bci-sle15-kernel-module-devel:15.5

SLE 15 SP5 Kernel Module Development Container

RedistributableSupport Level SLSA Provenance: Available

Description

The SLE 15 SP5 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.5
# 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.5
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: 11 Sep 16:08 UTC

    Compressed Size: 220.7 MB

    Uncompressed Size: 716.4 MB

    Support Level: Techpreview

    Supported until: 31 Dec 2024


  • Health Index
    A

    No vulnerabilities found

    Last Scan:

    1 day ago