Tech Preview

SUSE Linux BCI SLES 16.0 Kernel Module Development

SLES 16 Kernel module development container based on the SUSE Linux Base Container Image.

Get Image
Digest:
sha256:6d6926d754140443729d2cf3f3902c8807303f3bfd28a049eb26eb187a9c5f56
6d6926d75
Repository:
registry.suse.com/bci/bci-sle16-kernel-module-devel:16.0

SUSE Linux BCI 16 Kernel Module Development Container

RedistributableSupport Level SLSA Provenance: Available

Description

The SUSE Linux BCI Kernel Module Development Container Image includes all necessary tools to build kernel modules for SLES and SL Micro. It is intended to be used for building out-of-tree kernel modules in restricted environments for the SLES 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-sle16-kernel-module-devel:16.0
# zypper -n install 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-sle16-kernel-module-devel:16.0
ENV DRBD_VERSION=9.2.11
WORKDIR /src/
RUN zypper -n install 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: 10 Dec 14:21 UTC

    Compressed Size: 260.6 MB

    Uncompressed Size: 784.7 MB

    Support Level: Techpreview

    Supported until: 30 Nov 2027


  • Health Index
    A

    No vulnerabilities found

    Last Scan:

    1 day ago