From a2b802a5deeef68f477ec506eb40c0fd418f3e13 Mon Sep 17 00:00:00 2001 From: Jan Willhaus Date: Thu, 14 Dec 2023 09:04:38 +0100 Subject: [PATCH] Add tini for sigterm handling --- Dockerfile.alpine | 4 +++- Dockerfile.slim | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 03f432a..afa5d6e 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -33,7 +33,8 @@ ENV BLACKLIST_USERS '' ENV WHITELIST_USERS '' -RUN addgroup --system jellyplex_user && \ +RUN apk add --no-cache tini && \ + addgroup --system jellyplex_user && \ adduser --system --no-create-home jellyplex_user --ingroup jellyplex_user && \ mkdir -p /app && \ chown -R jellyplex_user:jellyplex_user /app @@ -48,4 +49,5 @@ COPY --chown=jellyplex_user:jellyplex_user . . USER jellyplex_user +ENTRYPOINT ["/sbin/tini", "--"] CMD ["python", "-u", "main.py"] diff --git a/Dockerfile.slim b/Dockerfile.slim index 59c9a02..b15d237 100644 --- a/Dockerfile.slim +++ b/Dockerfile.slim @@ -33,7 +33,11 @@ ENV BLACKLIST_USERS '' ENV WHITELIST_USERS '' -RUN addgroup --system jellyplex_user && \ +RUN apt-get update && \ + apt-get install tini --yes --no-install-recommends && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + addgroup --system jellyplex_user && \ adduser --system --no-create-home jellyplex_user --ingroup jellyplex_user && \ mkdir -p /app && \ chown -R jellyplex_user:jellyplex_user /app @@ -48,4 +52,5 @@ COPY --chown=jellyplex_user:jellyplex_user . . USER jellyplex_user +ENTRYPOINT ["/bin/tini", "--"] CMD ["python", "-u", "main.py"]