From af90b02febfa61bf79d90a89588df70f71980ac4 Mon Sep 17 00:00:00 2001 From: Corey Sotiropoulos Date: Sun, 4 May 2025 19:35:59 -0400 Subject: [PATCH] Fix issue with crash loops Docker Compose starts the services with the executables as PID 1, which has special signal handling. Run the executables through tini for proper signal handling. --- docker/alpine.Dockerfile | 1 + docker/ubuntu.Dockerfile | 1 + entrypoint.sh | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile index 2ca6798..f586f62 100644 --- a/docker/alpine.Dockerfile +++ b/docker/alpine.Dockerfile @@ -13,6 +13,7 @@ RUN --mount=type=cache,target=/var/cache/apk,sharing=locked \ mariadb-connector-c \ openssl \ python3 \ + tini \ tzdata \ zeromq \ zlib diff --git a/docker/ubuntu.Dockerfile b/docker/ubuntu.Dockerfile index 5095e82..74018ef 100644 --- a/docker/ubuntu.Dockerfile +++ b/docker/ubuntu.Dockerfile @@ -19,6 +19,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ libzmq5 \ mariadb-client \ python3 \ + tini \ tzdata \ zlib1g diff --git a/entrypoint.sh b/entrypoint.sh index 8273dd8..6fb998c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,4 +11,4 @@ export XI_NETWORK_SQL_PASSWORD export XI_NETWORK_SQL_LOGIN export XI_NETWORK_SQL_DATABASE -exec "$@" +exec /usr/bin/tini -- "$@"