Fixes for the Rocky Linux default container
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
FROM docker.io/library/rockylinux:8
|
||||
|
||||
RUN dnf install -y --allowerasing coreutils \
|
||||
RUN dnf update -y ;\
|
||||
dnf install -y --allowerasing coreutils \
|
||||
cpio \
|
||||
dhclient \
|
||||
e2fsprogs \
|
||||
@@ -22,36 +23,23 @@ RUN dnf install -y --allowerasing coreutils \
|
||||
strace \
|
||||
wget \
|
||||
which \
|
||||
words
|
||||
|
||||
RUN <<EOF
|
||||
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
|
||||
|
||||
mkdir -p /etc/warewulf
|
||||
touch /etc/warewulf/excludes
|
||||
touch /etc/warewulf/container_exit.sh
|
||||
chmod +x /etc/warewulf/container_exit.sh
|
||||
EOF
|
||||
|
||||
COPY <<EOF /etc/warewulf/container_exit.sh
|
||||
#!/bin/sh
|
||||
set -x
|
||||
LANG=C
|
||||
LC_CTYPE=C
|
||||
export LANG LC_CTYPE
|
||||
dnf clean all
|
||||
EOF
|
||||
|
||||
COPY <<EOF /etc/warewulf/excludes
|
||||
/boot/
|
||||
/usr/share/GeoIP
|
||||
EOF
|
||||
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 ;\
|
||||
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
|
||||
Reference in New Issue
Block a user