File Dockerfile.rpi of Package elemental-base-os
#!BuildTag: uc-base-os-rpi:%OS_VERSION_ID_SP%-%RELEASE%
#!BuildTag: uc-base-os-rpi:%OS_VERSION_ID_SP%
#!BuildTag: uc-base-os-rpi:latest
#!ExclusiveArch: aarch64
ARG OS_IMAGE=bci/bci-base
ARG OS_VERSION=16.0
ARG OS_BRANDING=SLE
FROM uc-base-os-common AS target
FROM ${OS_IMAGE}:${OS_VERSION} AS os
COPY --from=target / /target
ARG OS_KERNEL_FLAVOR=default
ARG OS_BRANDING
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 \
grub2-arm64-efi \
raspberrypi-firmware \
raspberrypi-firmware-config \
raspberrypi-firmware-dt \
u-boot-rpiarm64 \
&& \
zypper clean --all
RUN mkdir -p /target/boot/efi && cp -rf /target/boot/vc/* /target/boot/efi/
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 Raspberry Pi OS Container"
LABEL org.opencontainers.image.description="Container image for openSUSE Dumbledore with Raspberry Pi packages - 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-rpi:%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/SLE/default-169.png /usr/share/grub2/themes/SLE/background.png
CMD ["/bin/bash"]