mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-19 21:03:21 -07:00
feat: add support for bypassing gosu in container image
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
parent
d019efcf91
commit
98fed8843b
2 changed files with 13 additions and 8 deletions
|
@ -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
|
||||
|
|
18
start.sh
18
start.sh
|
@ -1,16 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ "$TAUTULLI_DOCKER" == "True" ]]; then
|
||||
PUID=${PUID:-1000}
|
||||
PGID=${PGID:-1000}
|
||||
if [[ "$TAUTULLI_DOCKER_GOSU" == "True" ]]; then
|
||||
PUID=${PUID:-1000}
|
||||
PGID=${PGID:-1000}
|
||||
|
||||
groupmod -o -g "$PGID" tautulli
|
||||
usermod -o -u "$PUID" tautulli
|
||||
groupmod -o -g "$PGID" tautulli
|
||||
usermod -o -u "$PUID" tautulli
|
||||
|
||||
find /config \! \( -uid $(id -u tautulli) -gid $(id -g tautulli) \) -print0 | xargs -0r chown tautulli:tautulli
|
||||
find /config \! \( -uid $(id -u tautulli) -gid $(id -g tautulli) \) -print0 | xargs -0r chown tautulli:tautulli
|
||||
|
||||
echo "Running Tautulli using user tautulli (uid=$(id -u tautulli)) and group tautulli (gid=$(id -g tautulli))"
|
||||
exec gosu tautulli "$@"
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue