From f4c36693ca6f00a846453fc8995ee1b21b17fccc Mon Sep 17 00:00:00 2001 From: Danila Vershinin Date: Fri, 12 Jul 2024 00:31:59 +0500 Subject: [PATCH] Add delay and introduce tini in Dockerfile Increased the delay after starting dbus in the firewalld-tests.sh script to ensure firewalld starts smoothly. Updated Dockerfile.firewalld to include tini at installation and as an entrypoint to handle zombie processes and signal forwarding. --- Dockerfile.firewalld | 4 +++- firewalld-tests.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.firewalld b/Dockerfile.firewalld index e5557ae..087a745 100644 --- a/Dockerfile.firewalld +++ b/Dockerfile.firewalld @@ -1,7 +1,7 @@ FROM rockylinux:9 # Install systemd and firewalld -RUN yum install -y systemd firewalld dbus python3-pip git \ +RUN yum install -y systemd firewalld dbus python3-pip git tini \ && yum clean all \ && systemctl enable firewalld @@ -33,4 +33,6 @@ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == system VOLUME [ "/sys/fs/cgroup" ] +ENTRYPOINT ["/usr/bin/tini", "--"] + CMD ["/sbin/init"] diff --git a/firewalld-tests.sh b/firewalld-tests.sh index a888d79..0435752 100755 --- a/firewalld-tests.sh +++ b/firewalld-tests.sh @@ -2,8 +2,8 @@ set -x systemctl start dbus +sleep 5 systemctl start firewalld - sleep 5 fds block 1.2.3.4