diff --git a/Dockerfile b/Dockerfile index 17404b2..2e32fd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,6 +56,7 @@ RUN apt-get -y update && \ supervisor \ cups \ ctdb \ + tini \ samba-exporter && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ diff --git a/entrypoint.sh b/entrypoint.sh index 1a87007..cce0427 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -41,7 +41,9 @@ if [ "$1" = "ctdb" ]; then mkdir -p "$CLUSTER_SYSDIR_LOCAL/ctdb-run" rm -rf /run/ctdb ln -s "$CLUSTER_SYSDIR_LOCAL/ctdb-run" /run/ctdb - exec /usr/sbin/ctdbd --interactive + + # We cannot run as PID 1 due to orphans (see https://lists.samba.org/archive/samba-technical/2021-July/136753.html) + exec tini -- /usr/sbin/ctdbd --interactive fi if [ -z "$NETBIOS_NAME" ]; then