From 7ba595a2afdda6ef8865b632f560caa9097251c0 Mon Sep 17 00:00:00 2001 From: Santhosh Date: Fri, 8 Dec 2023 18:02:29 +0530 Subject: [PATCH 1/2] kairos version update to v2.4.3 --- Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index 59e3b8f..a902b75 100644 --- a/Earthfile +++ b/Earthfile @@ -13,7 +13,7 @@ ARG CUSTOM_TAG ARG ARCH ARG PE_VERSION=v4.1.2 ARG SPECTRO_LUET_VERSION=v1.2.0 -ARG KAIROS_VERSION=v2.4.3-rc3 +ARG KAIROS_VERSION=v2.4.3 ARG K3S_FLAVOR_TAG=k3s1 ARG RKE2_FLAVOR_TAG=rke2r1 ARG BASE_IMAGE_URL=quay.io/kairos From f408674ae0618fff3179c65486742fe89ecca7e8 Mon Sep 17 00:00:00 2001 From: Santhosh Date: Sun, 17 Dec 2023 17:38:01 +0530 Subject: [PATCH 2/2] add sles dockerfile --- README.md | 2 +- slem/Dockerfile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 slem/Dockerfile diff --git a/README.md b/README.md index 2472e42..045763d 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ do so (now or later) by using -c with the switch command. Example: ```shell cp .arg.template .arg ``` -6. To build RHEL core, RHEL FIPS or Ubuntu fips base images switch to respective directories and build the base image. +6. To build RHEL core, RHEL FIPS or Ubuntu fips, sles base images switch to respective directories and build the base image. The base image built can be passed as argument to build the installer and provider images. Follow the instructions in the respective sub-folders (rhel-fips, ubuntu-fips) to create base images. For ubuntu-fips, this image can be used as base image - `gcr.io/spectro-images-public/ubuntu-focal-fips:v4.0_20230817` diff --git a/slem/Dockerfile b/slem/Dockerfile new file mode 100644 index 0000000..7ce6ad0 --- /dev/null +++ b/slem/Dockerfile @@ -0,0 +1,44 @@ +ARG BASE_IMAGE=registry.suse.com/suse/sle-micro-rancher/5.4:latest +FROM $BASE_IMAGE +ADD repos/SUSE* /etc/zypp/repos.d/ +ADD services/* /etc/zypp/services.d/ +RUN zypper --gpg-auto-import-keys ref +RUN zypper in --force-resolution -y \ + cryptsetup \ + nfs-client \ + kernel-firmware-all \ + systemd-network \ + polkit \ + rng-tools \ + nano \ + && zypper cc +ADD repos/opensuse* /etc/zypp/repos.d/ +RUN zypper --gpg-auto-import-keys ref +RUN zypper in --force-resolution -y --no-allow-vendor-change \ + htop \ + fail2ban \ + lldpd \ + nethogs \ + && zypper cc +# NOTE: removed dhcp-client +RUN mkdir -p /run/lock +RUN mkdir -p /usr/libexec +RUN touch /usr/libexec/.keep +COPY --from=quay.io/kairos/framework:v2.4.3_opensuse-leap / / +# Activate Kairos services +RUN systemctl enable cos-setup-reconcile.timer && \ + systemctl enable cos-setup-fs.service && \ + systemctl enable cos-setup-boot.service && \ + systemctl enable cos-setup-network.service +# Remove /etc/dracut.conf.d/90-kairos-network-legacy.conf to allow dracut to build initrd without dhcp-client +RUN rm -f /etc/dracut.conf.d/90-kairos-network-legacy.conf +## Generate initrd +RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \ + ln -sf "${kernel#/boot/}" /boot/vmlinuz +RUN kernel=$(ls /lib/modules | head -n1) && \ + dracut -v -N -f "/boot/initrd-${kernel}" "${kernel}" && \ + ln -sf "initrd-${kernel}" /boot/initrd && depmod -a "${kernel}" +RUN kernel=$(ls /lib/modules | head -n1) && dracut -f "/boot/initrd-${kernel}" "${kernel}" && ln -sf "initrd-${kernel}" /boot/initrd +RUN rm -rf /boot/initramfs-* +RUN rm -rf /etc/zypp/repos.d/* +RUN rm -rf /etc/zypp/services.d/* \ No newline at end of file