From 99952b90b7cd847ab32b8a8d1384aeb375ff5efe Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Thu, 17 Feb 2022 07:50:39 +0000 Subject: [PATCH] Updated container recipes to include kernel and use upstream base containers --- containers/Docker/centos-8 | 5 +-- containers/Docker/rocky-8 | 5 +-- containers/Singularity/centos-8.def | 49 ++++++++++++++++++++--------- containers/Singularity/rocky-8.def | 49 ++++++++++++++++++++--------- 4 files changed, 74 insertions(+), 34 deletions(-) diff --git a/containers/Docker/centos-8 b/containers/Docker/centos-8 index 4df5070e..f1fe0f65 100644 --- a/containers/Docker/centos-8 +++ b/containers/Docker/centos-8 @@ -24,8 +24,6 @@ RUN dnf install -y --allowerasing coreutils \ which \ words -RUN sed -i 's/^root:.:/root::/g' /etc/passwd - # These changes make it possible for users to ssh into nodes even # if there is no shadow entry for the user RUN sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/system-auth @@ -34,3 +32,6 @@ RUN sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/p RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ systemd-remount-fs.service + +RUN systemctl enable network +RUN touch /etc/sysconfig/disable-deprecation-warnings diff --git a/containers/Docker/rocky-8 b/containers/Docker/rocky-8 index 9c500913..2e0a9969 100644 --- a/containers/Docker/rocky-8 +++ b/containers/Docker/rocky-8 @@ -24,8 +24,6 @@ RUN dnf install -y --allowerasing coreutils \ which \ words -RUN sed -i 's/^root:.:/root::/g' /etc/passwd - # These changes make it possible for users to ssh into nodes even # if there is no shadow entry for the user RUN sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/system-auth @@ -34,3 +32,6 @@ RUN sed -i -e '/^account.*pam_unix\.so\s*$/s/\s*$/\ broken_shadow/' /etc/pam.d/p RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ systemd-remount-fs.service + +RUN systemctl enable network +RUN touch /etc/sysconfig/disable-deprecation-warnings diff --git a/containers/Singularity/centos-8.def b/containers/Singularity/centos-8.def index a3a6e66f..8ed203ab 100644 --- a/containers/Singularity/centos-8.def +++ b/containers/Singularity/centos-8.def @@ -1,21 +1,40 @@ -BootStrap: yum -OSVersion: 8 -MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/BaseOS/x86_64/os -Include: dnf - +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 - sed -i 's/^root:.:/root::/g' /etc/passwd +# 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 - dnf install -y basesystem bash chkconfig coreutils e2fsprogs \ - ethtool filesystem findutils gawk grep initscripts iproute \ - iputils net-tools nfs-utils pam psmisc rsync sed setup \ - shadow-utils rsyslog tzdata util-linux words zlib tar less \ - gzip which util-linux openssh-clients openssh-server dhclient \ - pciutils vim-minimal shadow-utils strace cronie crontabs cpio \ - wget centos-release ipmitool yum network-scripts +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 +systemctl enable network - touch /etc/sysconfig/disable-deprecation-warnings \ No newline at end of file +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 1f37857f..eb924369 100644 --- a/containers/Singularity/rocky-8.def +++ b/containers/Singularity/rocky-8.def @@ -1,21 +1,40 @@ -BootStrap: yum -OSVersion: 8 -MirrorURL: http://dl.rockylinux.org/pub/rocky/%{OSVERSION}/BaseOS/x86_64/os/ -Include: dnf - +BootStrap: docker +From: rockylinux: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 - sed -i 's/^root:.:/root::/g' /etc/passwd +# 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 - dnf install -y basesystem bash chkconfig coreutils e2fsprogs \ - ethtool filesystem findutils gawk grep initscripts iproute \ - iputils net-tools nfs-utils pam psmisc rsync sed setup \ - shadow-utils rsyslog tzdata util-linux words zlib tar less \ - gzip which util-linux openssh-clients openssh-server dhclient \ - pciutils vim-minimal shadow-utils strace cronie crontabs cpio \ - wget rocky-release ipmitool yum network-scripts +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 +systemctl enable network - touch /etc/sysconfig/disable-deprecation-warnings \ No newline at end of file +touch /etc/sysconfig/disable-deprecation-warnings \ No newline at end of file