From b39f99467b72f450aec5bff77b6b8a3e002c5d52 Mon Sep 17 00:00:00 2001 From: bt90 Date: Thu, 12 Jan 2023 19:10:02 +0000 Subject: [PATCH 1/4] Start processes via exec --- rootfs/etc/services.d/cron/run | 2 +- rootfs/etc/services.d/influxdb/run | 2 +- rootfs/etc/services.d/scrutiny/run | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rootfs/etc/services.d/cron/run b/rootfs/etc/services.d/cron/run index 0c6025f2..a5ac065d 100755 --- a/rootfs/etc/services.d/cron/run +++ b/rootfs/etc/services.d/cron/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv bash echo "starting cron" -cron -f -L 15 +exec cron -f -L 15 diff --git a/rootfs/etc/services.d/influxdb/run b/rootfs/etc/services.d/influxdb/run index 99cf1e12..b94c9969 100644 --- a/rootfs/etc/services.d/influxdb/run +++ b/rootfs/etc/services.d/influxdb/run @@ -14,4 +14,4 @@ EOF fi echo "starting influxdb" -influxd run +exec influxd run diff --git a/rootfs/etc/services.d/scrutiny/run b/rootfs/etc/services.d/scrutiny/run index 3fac4a65..1adfdf28 100644 --- a/rootfs/etc/services.d/scrutiny/run +++ b/rootfs/etc/services.d/scrutiny/run @@ -4,4 +4,4 @@ echo "waiting for influxdb" until $(curl --output /dev/null --silent --head --fail http://localhost:8086/health); do echo "influxdb not ready" && sleep 5; done echo "starting scrutiny" -scrutiny start +exec scrutiny start From 39240f8214abd06a0b9ae57591e55fbe0b521a2f Mon Sep 17 00:00:00 2001 From: bt90 Date: Thu, 12 Jan 2023 19:13:18 +0000 Subject: [PATCH 2/4] Switch to entrypoint --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7d35bef9..a0608102 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -47,4 +47,4 @@ RUN chmod +x /opt/scrutiny/bin/scrutiny && \ chmod -R ugo+rwx /opt/scrutiny/config -CMD ["/init"] +ENTRYPOINT ["/init"] From d2a490296eb3ddea54dbade40dc8f30e51cccb01 Mon Sep 17 00:00:00 2001 From: bt90 Date: Thu, 12 Jan 2023 19:16:34 +0000 Subject: [PATCH 3/4] Use exec --- rootfs/etc/services.d/collector-once/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/etc/services.d/collector-once/run b/rootfs/etc/services.d/collector-once/run index 7a5cb678..d0b0df8c 100644 --- a/rootfs/etc/services.d/collector-once/run +++ b/rootfs/etc/services.d/collector-once/run @@ -10,4 +10,4 @@ s6-svc -O /var/run/s6/services/collector-once until $(curl --output /dev/null --silent --head --fail http://localhost:8080/api/health); do echo "scrutiny api not ready" && sleep 5; done echo "starting scrutiny collector (run-once mode. subsequent calls will be triggered via cron service)" -/opt/scrutiny/bin/scrutiny-collector-metrics run +exec /opt/scrutiny/bin/scrutiny-collector-metrics run From ab879b452afe6226547b746b65412dce7bd2bf1a Mon Sep 17 00:00:00 2001 From: bt90 Date: Thu, 12 Jan 2023 19:16:44 +0000 Subject: [PATCH 4/4] Use exec --- docker/entrypoint-collector.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/entrypoint-collector.sh b/docker/entrypoint-collector.sh index 7c781839..268df4d4 100755 --- a/docker/entrypoint-collector.sh +++ b/docker/entrypoint-collector.sh @@ -25,4 +25,4 @@ fi # now that we have the env start cron in the foreground echo "starting cron" -su -c "cron -f -L 15" root +exec cron -f -L 15