diff --git a/containers/Docker/.gitignore b/containers/Docker/.gitignore new file mode 100644 index 00000000..d874ad67 --- /dev/null +++ b/containers/Docker/.gitignore @@ -0,0 +1 @@ +*.tar diff --git a/containers/Docker/Makefile b/containers/Docker/Makefile new file mode 100644 index 00000000..0343b9b2 --- /dev/null +++ b/containers/Docker/Makefile @@ -0,0 +1,9 @@ +all: centos-7.tar rockylinux-8.tar openhpc-2.tar +.PHONY: all + +%.tar: %/Containerfile + podman save $$(podman build --quiet $*) >$@ + +clean: + rm -rf *.tar +.PHONY: clean diff --git a/containers/Docker/centos-7/Containerfile b/containers/Docker/centos-7/Containerfile new file mode 100644 index 00000000..1d7f23e7 --- /dev/null +++ b/containers/Docker/centos-7/Containerfile @@ -0,0 +1,36 @@ +FROM docker.io/library/centos:7 + +RUN yum update -y \ + && yum install -y \ + coreutils \ + cpio \ + dhclient \ + e2fsprogs \ + ethtool \ + findutils \ + initscripts \ + ipmitool \ + iproute \ + kernel \ + net-tools \ + network-scripts \ + nfs-utils \ + openssh-clients \ + openssh-server \ + pciutils \ + psmisc \ + rsync \ + rsyslog \ + strace \ + wget \ + which \ + words \ + && yum 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 \ + && 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 + +COPY excludes /etc/warewulf/excludes +COPY container_exit.sh /etc/warewulf/container_exit.sh diff --git a/containers/Docker/centos-7/container_exit.sh b/containers/Docker/centos-7/container_exit.sh new file mode 100755 index 00000000..22bdbf51 --- /dev/null +++ b/containers/Docker/centos-7/container_exit.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -x +LANG=C +LC_CTYPE=C +export LANG LC_CTYPE +yum clean all diff --git a/containers/Docker/centos-7/excludes b/containers/Docker/centos-7/excludes new file mode 100644 index 00000000..bf007032 --- /dev/null +++ b/containers/Docker/centos-7/excludes @@ -0,0 +1,2 @@ +/boot/ +/usr/share/GeoIP diff --git a/containers/Docker/openhpc b/containers/Docker/openhpc deleted file mode 100644 index 84cd9da3..00000000 --- a/containers/Docker/openhpc +++ /dev/null @@ -1,7 +0,0 @@ -FROM docker.io/warewulf/rocky:8 - -RUN dnf -y install http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm; \ - sed -i -e 's/^enabled=0/enabled=1/g' /etc/yum.repos.d/*-PowerTools.repo; \ - dnf -y install ohpc-base-compute ohpc-slurm-client chrony lmod-ohpc; \ - dnf -y clean all ;\ - systemctl enable munge diff --git a/containers/Docker/openhpc-2/Containerfile b/containers/Docker/openhpc-2/Containerfile new file mode 100644 index 00000000..1a5e36b3 --- /dev/null +++ b/containers/Docker/openhpc-2/Containerfile @@ -0,0 +1,7 @@ +FROM docker.io/warewulf/rockylinux:8 + +RUN dnf -y install http://repos.openhpc.community/OpenHPC/2/CentOS_8/x86_64/ohpc-release-2-1.el8.x86_64.rpm \ + && sed -i -e 's/^enabled=0/enabled=1/g' /etc/yum.repos.d/*-PowerTools.repo \ + && dnf -y install ohpc-base-compute ohpc-slurm-client chrony lmod-ohpc \ + && dnf -y clean all \ + && systemctl enable munge diff --git a/containers/Docker/rocky-8 b/containers/Docker/rocky-8 deleted file mode 100644 index e26c82dd..00000000 --- a/containers/Docker/rocky-8 +++ /dev/null @@ -1,47 +0,0 @@ -FROM docker.io/library/rockylinux:8 - -RUN dnf update -y ;\ - dnf install -y --allowerasing coreutils \ - cpio \ - dhclient \ - e2fsprogs \ - ethtool \ - findutils \ - initscripts \ - ipmitool \ - iproute \ - kernel-core \ - kernel-modules \ - net-tools \ - network-scripts \ - nfs-utils \ - openssh-clients \ - openssh-server \ - pciutils \ - psmisc \ - rsync \ - rsyslog \ - strace \ - wget \ - which \ - words ;\ - dnf clean all - -RUN 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 ;\ - 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 ;\ - 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 diff --git a/containers/Docker/rockylinux-8/Containerfile b/containers/Docker/rockylinux-8/Containerfile new file mode 100644 index 00000000..1200eb66 --- /dev/null +++ b/containers/Docker/rockylinux-8/Containerfile @@ -0,0 +1,35 @@ +FROM docker.io/library/rockylinux:8 + +RUN dnf update -y \ + && dnf install -y --allowerasing coreutils \ + cpio \ + dhclient \ + e2fsprogs \ + ethtool \ + findutils \ + initscripts \ + ipmitool \ + iproute \ + kernel-core \ + kernel-modules \ + net-tools \ + network-scripts \ + nfs-utils \ + openssh-clients \ + openssh-server \ + pciutils \ + psmisc \ + rsync \ + rsyslog \ + strace \ + wget \ + which \ + words \ + && dnf clean all + +RUN 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 \ + && 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 diff --git a/containers/Docker/rockylinux-8/container_exit.sh b/containers/Docker/rockylinux-8/container_exit.sh new file mode 100755 index 00000000..84993a5f --- /dev/null +++ b/containers/Docker/rockylinux-8/container_exit.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -x +LANG=C +LC_CTYPE=C +export LANG LC_CTYPE +dnf clean all diff --git a/containers/Docker/rockylinux-8/excludes b/containers/Docker/rockylinux-8/excludes new file mode 100644 index 00000000..bf007032 --- /dev/null +++ b/containers/Docker/rockylinux-8/excludes @@ -0,0 +1,2 @@ +/boot/ +/usr/share/GeoIP