From 7a9089b2c6102c02eb26a9642e991abd54559193 Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Wed, 25 May 2022 14:38:05 -0700 Subject: [PATCH] Singularity container recipe updates --- containers/Singularity/centos-8.def | 40 ----------------------------- containers/Singularity/rocky-8.def | 28 +++++++++++++++----- 2 files changed, 21 insertions(+), 47 deletions(-) delete mode 100644 containers/Singularity/centos-8.def diff --git a/containers/Singularity/centos-8.def b/containers/Singularity/centos-8.def deleted file mode 100644 index 8ed203ab..00000000 --- a/containers/Singularity/centos-8.def +++ /dev/null @@ -1,40 +0,0 @@ -BootStrap: docker -From: centos:8 - -%post -dnf install -y --allowerasing coreutils \ - cpio \ - dhclient \ - e2fsprogs \ - ethtool \ - findutils \ - initscripts \ - ipmitool \ - iproute \ - kernel-core \ - net-tools \ - network-scripts \ - nfs-utils \ - openssh-clients \ - openssh-server \ - pciutils \ - psmisc \ - rsync \ - rsyslog \ - strace \ - wget \ - which \ - words - -# These changes make it possible for users to ssh into nodes even -# if there is no shadow entry for the user -sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/system-auth -sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/password-auth - -systemctl unmask console-getty.service dev-hugepages.mount \ - getty.target sys-fs-fuse-connections.mount systemd-logind.service \ - systemd-remount-fs.service - -systemctl enable network - -touch /etc/sysconfig/disable-deprecation-warnings \ No newline at end of file diff --git a/containers/Singularity/rocky-8.def b/containers/Singularity/rocky-8.def index eb924369..50575309 100644 --- a/containers/Singularity/rocky-8.def +++ b/containers/Singularity/rocky-8.def @@ -2,7 +2,8 @@ BootStrap: docker From: rockylinux:8 %post -dnf install -y --allowerasing coreutils \ +dnf update -y ;\ + dnf install -y --allowerasing coreutils \ cpio \ dhclient \ e2fsprogs \ @@ -26,15 +27,28 @@ dnf install -y --allowerasing coreutils \ which \ words -# These changes make it possible for users to ssh into nodes even -# if there is no shadow entry for the user +dnf clean all + sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/system-auth sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/password-auth -systemctl unmask console-getty.service dev-hugepages.mount \ - getty.target sys-fs-fuse-connections.mount systemd-logind.service \ - systemd-remount-fs.service +rm -f /etc/sysconfig/network-scripts/ifcfg-e* +systemctl unmask console-getty.service dev-hugepages.mount getty.target sys-fs-fuse-connections.mount systemd-logind.service systemd-remount-fs.service systemctl enable network -touch /etc/sysconfig/disable-deprecation-warnings \ No newline at end of file +touch /etc/sysconfig/disable-deprecation-warnings + +mkdir -p /etc/warewulf +touch /etc/warewulf/excludes +touch /etc/warewulf/container_exit.sh +chmod +x /etc/warewulf/container_exit.sh + +echo "#!/bin/sh" > /etc/warewulf/container_exit.sh +echo "set -x" >> /etc/warewulf/container_exit.sh +echo "LANG=C" >> /etc/warewulf/container_exit.sh +echo "LC_CTYPE=C" >> /etc/warewulf/container_exit.sh +echo "export LANG LC_CTYPE" >> /etc/warewulf/container_exit.sh +echo "dnf clean all" >> /etc/warewulf/container_exit.sh +echo "/boot/" > /etc/warewulf/excludes +echo "/usr/share/GeoIP" >> /etc/warewulf/excludes \ No newline at end of file