diff --git a/build/.docker/standalone.bake.Dockerfile b/build/.docker/standalone.bake.Dockerfile index 3e4b48e3d9..0dbb9b9c18 100644 --- a/build/.docker/standalone.bake.Dockerfile +++ b/build/.docker/standalone.bake.Dockerfile @@ -30,7 +30,7 @@ RUN apt-get -y update && \ ACCEPT_EULA=Y apt-get -yq install \ postgresql postgresql-client redis-server rabbitmq-server \ nginx sudo gdb nginx-extras supervisor jq util-linux \ - netcat-openbsd xxd openssl && \ + netcat-openbsd xxd openssl tini && \ rm -rf /var/lib/apt/lists/* # Create the 'ds' user that is required by OnlyOffice scripts diff --git a/build/scripts/standalone/entrypoint.sh b/build/scripts/standalone/entrypoint.sh index 7fea010373..85c69bbf49 100644 --- a/build/scripts/standalone/entrypoint.sh +++ b/build/scripts/standalone/entrypoint.sh @@ -448,4 +448,9 @@ fi # -------------------------------------------------------------------- [ -n "$JWT_MESSAGE" ] && echo "$JWT_MESSAGE" -exec /usr/bin/supervisord +# Hand off to supervisord under tini. tini becomes PID 1 and acts as the init +# zombie-reaper: it silently reaps orphaned children of the bundled daemons +# (postgres, redis, nginx, rabbitmq) and of the node services. Without it, +# supervisord would run as PID 1 and log every reaped orphan as a noisy +# "reaped unknown pid" INFO message. +exec /usr/bin/tini -- /usr/bin/supervisord