File Dockerfile.rt of Package elemental-base-os
#!BuildTag: uc-base-os-kernel-rt:%OS_VERSION_ID_SP%-%RELEASE%
#!BuildTag: uc-base-os-kernel-rt:%OS_VERSION_ID_SP%
#!BuildTag: uc-base-os-kernel-rt:latest
ARG OS_IMAGE=bci/bci-base
ARG OS_VERSION=16.0
FROM uc-base-os-common AS target
FROM ${OS_IMAGE}:${OS_VERSION} AS os
COPY --from=target / /target
ARG OS_KERNEL_FLAVOR=rt
ARG OS_BRANDING=SLE
RUN set -euo pipefail; mkdir -p /target
RUN set -euo pipefail; zypper --non-interactive --gpg-auto-import-keys --installroot /target install --no-recommends -- \
kernel-${OS_KERNEL_FLAVOR} \
grub2-branding-${OS_BRANDING} \
shim \
&& \
zypper clean --all
#!ArchExclusiveLine: x86_64
RUN if [ `uname -m` = "x86_64" ]; then zypper --non-interactive --installroot /target install grub2-x86_64-efi; fi
# make ARM happy
#!ArchExclusiveLine: aarch64
RUN if [ `uname -m` = "aarch64" ]; then zypper --non-interactive --installroot /target install grub2-arm64-efi; fi
# make sure /boot is empty.
RUN rm -rf /target/boot && mkdir /target/boot
FROM scratch
COPY --from=os /target /
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=com.suse.sl.micro
LABEL org.opencontainers.image.title="openSUSE Dumbledore RT OS Container"
LABEL org.opencontainers.image.description="Container image for openSUSE Dumbledore RT - a containerized OS layer for Kubernetes."
LABEL org.opencontainers.image.version="%OS_VERSION_ID_SP%-%RELEASE%"
LABEL org.opencontainers.image.url="https://github.com/SUSE/elemental"
LABEL org.opencontainers.image.created="%BUILDTIME%"
LABEL org.opencontainers.image.vendor="SUSE LLC"
LABEL org.opencontainers.image.source="%SOURCEURL%"
LABEL org.opensuse.reference="registry.suse.com/uc-base-os-kernel-rt:%OS_VERSION_ID_SP%-%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
# endlabelprefix
# Generate initrd in /usr/lib/modules/*
RUN kver=$(ls /usr/lib/modules | head -n1) && \
dracut -f --no-hostonly "/usr/lib/modules/${kver}/initrd" "${kver}"
# Install 1920x1080 as default background.png
RUN cp /usr/share/grub2/backgrounds/${OS_BRANDING}/default-169.png /usr/share/grub2/themes/${OS_BRANDING}/background.png
CMD ["/bin/bash"]