From 5dff444de268ef55a554391573bc0859c352d531 Mon Sep 17 00:00:00 2001 From: ZhengKeli Date: Sun, 27 Sep 2026 15:13:51 +0000 Subject: [PATCH] fix(docker): let cloudreve receive SIGTERM by exec-ing it as PID 1 The image entrypoint is `sh ./entrypoint.sh`, so the shell stays PID 1 and cloudreve runs as its child. SIGTERM from `docker stop` is sent to PID 1 (sh): as PID 1 without an installed handler the kernel drops it, and the shell would not forward it to children anyway. The container is therefore only stopped by SIGKILL after the stop timeout (10s default), which also hard-kills supervisord/aria2. Use `exec ./cloudreve` so the binary replaces the shell as PID 1 and receives SIGTERM directly for graceful shutdown. --- .build/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build/entrypoint.sh b/.build/entrypoint.sh index ba4875f6..ce63c7bb 100755 --- a/.build/entrypoint.sh +++ b/.build/entrypoint.sh @@ -1,2 +1,2 @@ supervisord -c ./aria2.supervisor.conf -./cloudreve \ No newline at end of file +exec ./cloudreve \ No newline at end of file