Refactor docker containerrs and add centos-7
These docker containers populate docker.io/warewulf. A new centos-7 container serves as an example for others to build from when required. The new Makefile builds .tar images with Podman which can be imported into Warewulf directly without going through a registry. Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
1
containers/Docker/.gitignore
vendored
Normal file
1
containers/Docker/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.tar
|
||||||
9
containers/Docker/Makefile
Normal file
9
containers/Docker/Makefile
Normal 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
|
||||||
36
containers/Docker/centos-7/Containerfile
Normal file
36
containers/Docker/centos-7/Containerfile
Normal 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
|
||||||
6
containers/Docker/centos-7/container_exit.sh
Executable file
6
containers/Docker/centos-7/container_exit.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
|
LANG=C
|
||||||
|
LC_CTYPE=C
|
||||||
|
export LANG LC_CTYPE
|
||||||
|
yum clean all
|
||||||
2
containers/Docker/centos-7/excludes
Normal file
2
containers/Docker/centos-7/excludes
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/boot/
|
||||||
|
/usr/share/GeoIP
|
||||||
@@ -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
|
|
||||||
7
containers/Docker/openhpc-2/Containerfile
Normal file
7
containers/Docker/openhpc-2/Containerfile
Normal 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
|
||||||
@@ -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
|
|
||||||
35
containers/Docker/rockylinux-8/Containerfile
Normal file
35
containers/Docker/rockylinux-8/Containerfile
Normal 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
|
||||||
6
containers/Docker/rockylinux-8/container_exit.sh
Executable file
6
containers/Docker/rockylinux-8/container_exit.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
|
LANG=C
|
||||||
|
LC_CTYPE=C
|
||||||
|
export LANG LC_CTYPE
|
||||||
|
dnf clean all
|
||||||
2
containers/Docker/rockylinux-8/excludes
Normal file
2
containers/Docker/rockylinux-8/excludes
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/boot/
|
||||||
|
/usr/share/GeoIP
|
||||||
Reference in New Issue
Block a user