Merge pull request #621 from anderbubble/container-update

Refactor docker containers and add centos-7
This commit is contained in:
Jonathon Anderson
2022-12-23 18:16:28 -07:00
committed by GitHub
11 changed files with 104 additions and 54 deletions

1
containers/Docker/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.tar

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -x
LANG=C
LC_CTYPE=C
export LANG LC_CTYPE
yum clean all

View File

@@ -0,0 +1,2 @@
/boot/
/usr/share/GeoIP

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -x
LANG=C
LC_CTYPE=C
export LANG LC_CTYPE
dnf clean all

View File

@@ -0,0 +1,2 @@
/boot/
/usr/share/GeoIP