feat: add support for bypassing gosu in container image

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl 2024-04-08 10:42:24 -04:00
commit 98fed8843b
No known key found for this signature in database
2 changed files with 13 additions and 8 deletions

View file

@ -6,6 +6,7 @@ ARG BRANCH
ARG COMMIT
ENV TAUTULLI_DOCKER=True
ENV TAUTULLI_DOCKER_GOSU=True
ENV TZ=UTC
WORKDIR /app
@ -21,8 +22,8 @@ RUN \
touch /config/DOCKER
VOLUME /config
CMD [ "python", "Tautulli.py", "--datadir", "/config" ]
ENTRYPOINT [ "./start.sh" ]
CMD [ "python", "Tautulli.py", "--datadir", "/config" ]
EXPOSE 8181
HEALTHCHECK --start-period=90s CMD curl -ILfSs http://localhost:8181/status > /dev/null || curl -ILfkSs https://localhost:8181/status > /dev/null || exit 1

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
if [[ "$TAUTULLI_DOCKER" == "True" ]]; then
if [[ "$TAUTULLI_DOCKER_GOSU" == "True" ]]; then
PUID=${PUID:-1000}
PGID=${PGID:-1000}
@ -11,6 +12,9 @@ if [[ "$TAUTULLI_DOCKER" == "True" ]]; then
echo "Running Tautulli using user tautulli (uid=$(id -u tautulli)) and group tautulli (gid=$(id -g tautulli))"
exec gosu tautulli "$@"
else
exec tautulli "$@"
fi
else
python_versions=("python3.11" "python3.10" "python3.9" "python3.8" "python3" "python")
for cmd in "${python_versions[@]}"; do