From d35a2ba2cbb771c6753029e88381b3016842d77e Mon Sep 17 00:00:00 2001 From: mallory98e <115917396+mallory98e@users.noreply.github.com> Date: Fri, 19 Jan 2024 14:37:56 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 87d6cf0..c2dda09 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,17 @@ should have been destroyed. as PID 1 and immediately spawns your command as a child process, taking care to properly handle and forward signals as they are received. +## Best example of using dumb-init + +This will start some services then don't let your docker container collapse (finish). + + /entrypoint.sh + +#!/usr/bin/dumb-init /bin/bash +/etc/init.d/cron start +echo "|`date`| => Mini docker started" >> /var/log/startup.log +sleep infinity + ## Why you need an init system From 5a51ee9949093434e54b073b6ebe9b9472c54b02 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:38:46 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2dda09..47f8596 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This will start some services then don't let your docker container collapse (fin /entrypoint.sh #!/usr/bin/dumb-init /bin/bash -/etc/init.d/cron start +/etc/init.d/cron start echo "|`date`| => Mini docker started" >> /var/log/startup.log sleep infinity