File Dockerfile of Package baseos-headers

#!BuildTag: baseos-headers:latest baseos-headers:v1.5
#

FROM baseos:latest
# This _should_ be OK, becuase if baseos is rebuilt for whatever
# reason, as baseos-headers depends on it, it should be rebuilt
# automatically as well

# remove redundant packages from baseos
RUN zypper --non-interactive remove \
    apparmor-parser \
    apparmor-utils \
    apparmor-abstractions \
    ca-certificates \
    ca-certificates-mozilla \
    wicked \
    iotop \
    ipmitool \
    kdump \
    nfs-utils \
    nginx \
    numactl \
    supportutils \
    tcpdump \
    traceroute \
    xorriso \
    fio \
    audit \
    smartmontools \
    hwinfo \
    usbutils \
    sysvinit-tools \
    k9s \
    yip \
    elemental-toolkit \
    tmux \
    sensors \
    yq \
    nvme-cli \
    kubevirt-virtctl \
    bind-utils

# Install/Config needed packages
# next line doesn't work because of OBS parsing Dockerfiles to find
# dependenies - it fails with "unresolvable: nothing provides
# kernel-default-devel = $, (got version 5.14.21-150400.24.100
# provided by kernel-default-devel), (got version 5.14.21-150400.24.100.2)
# because the parser isn't running that inline bit of shell.... 
#RUN zypper --non-interactive install kernel-default-devel=$(rpm -q --qf '%{Version}-%{Release}' kernel-default)
RUN zypper --non-interactive in \
    kernel-source \
    gawk \
    gcc \
    python \
    kmod \
    flex \
    bison \
    make

# required for modules_prepare
RUN zypper --non-interactive in \
    openssl-devel \
    libelf-devel \
    bc \
    libopenssl1_1-hmac

RUN cp /boot/config-*-default /usr/src/linux/.config
RUN make -C /usr/src/linux oldconfig
RUN make -C /usr/src/linux modules_prepare
RUN zcat /boot/symvers-*.gz > /usr/src/linux/Module.symvers

# Show installed package version
RUN zypper se -s -i

# Save some space
RUN zypper clean --all && \
    rm -rf /var/log/update* && \
    >/var/log/lastlog && \
    rm -rf /boot/vmlinux*

openSUSE Build Service is sponsored by