Skip to content

Commit

Permalink
Add tini for sigterm handling
Browse files Browse the repository at this point in the history
  • Loading branch information
janw committed Dec 14, 2023
1 parent faef0ae commit 431eae1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -48,4 +49,5 @@ COPY --chown=jellyplex_user:jellyplex_user . .

USER jellyplex_user

ENTRYPOINT ["/sbin/tini", "--"]
CMD ["python", "-u", "main.py"]
7 changes: 6 additions & 1 deletion Dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -48,4 +52,5 @@ COPY --chown=jellyplex_user:jellyplex_user . .

USER jellyplex_user

ENTRYPOINT ["/bin/tini", "--"]
CMD ["python", "-u", "main.py"]

0 comments on commit 431eae1

Please sign in to comment.