forked from Tautulli/Tautulli-Docker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change base image and all Plexpy references to Tautulli
- Loading branch information
1 parent
4965181
commit 3f7b8a1
Showing
4 changed files
with
98 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,75 @@ | ||
FROM lsiobase/alpine.python:3.7 | ||
# Forked from https://github.com/linuxserver/docker-plexpy | ||
FROM alpine:3.7 | ||
|
||
# set version label | ||
ARG BUILD_DATE | ||
ARG VERSION | ||
LABEL build_version="Tautulli version:- ${VERSION} Build-date:- ${BUILD_DATE}" | ||
# set version for s6 overlay | ||
ARG OVERLAY_VERSION="v1.21.4.0" | ||
ARG OVERLAY_ARCH="amd64" | ||
|
||
# environment variables | ||
ENV PS1="$(whoami)@$(hostname):$(pwd)$ " \ | ||
HOME="/root" \ | ||
TERM="xterm" | ||
|
||
# install packages | ||
RUN \ | ||
apk add --no-cache --virtual=build-dependencies \ | ||
echo "**** install build packages ****" && \ | ||
apk add --no-cache --virtual=build-dependencies \ | ||
autoconf \ | ||
automake \ | ||
curl \ | ||
g++ \ | ||
gcc \ | ||
linux-headers \ | ||
make \ | ||
python-dev && \ | ||
|
||
# install pycryptodomex Plexapi | ||
pip install --no-cache-dir -U \ | ||
pycryptodomex plexapi && \ | ||
|
||
# cleanup | ||
python2-dev \ | ||
tar && \ | ||
echo "**** install runtime packages ****" && \ | ||
apk add --no-cache \ | ||
bash \ | ||
coreutils \ | ||
curl \ | ||
git \ | ||
py2-lxml \ | ||
py2-pip \ | ||
python2 \ | ||
shadow \ | ||
tar \ | ||
tzdata \ | ||
vnstat \ | ||
wget && \ | ||
echo "**** install pip packages ****" && \ | ||
pip install --no-cache-dir -U \ | ||
pip && \ | ||
pip install --no-cache-dir -U \ | ||
plexapi \ | ||
pycryptodomex && \ | ||
echo "**** add s6 overlay ****" && \ | ||
curl -o \ | ||
/tmp/s6-overlay.tar.gz -L \ | ||
"https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}.tar.gz" && \ | ||
tar xfz \ | ||
/tmp/s6-overlay.tar.gz -C / && \ | ||
echo "**** create abc user and make folders ****" && \ | ||
groupmod -g 1000 users && \ | ||
useradd -u 911 -U -d /config -s /bin/false abc && \ | ||
usermod -G users abc && \ | ||
mkdir -p \ | ||
/app \ | ||
/config \ | ||
/defaults && \ | ||
echo "**** cleanup ****" && \ | ||
apk del --purge \ | ||
build-dependencies && \ | ||
build-dependencies && \ | ||
rm -rf \ | ||
/root/.cache | ||
/root/.cache \ | ||
/tmp/* | ||
|
||
# add local files | ||
COPY root/ / | ||
|
||
ENTRYPOINT ["/init"] | ||
|
||
# add local files | ||
# add local files | ||
COPY root/ / | ||
|
||
# ports and volumes | ||
# ports and volumes | ||
VOLUME /config /logs | ||
EXPOSE 8181 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
PUID=${PUID:-911} | ||
PGID=${PGID:-911} | ||
|
||
groupmod -o -g "$PGID" abc | ||
usermod -o -u "$PUID" abc | ||
|
||
echo ' | ||
------------------------------------ | ||
_______ _ _ _ _ | ||
|__ __| | | | | (_) | ||
| | __ _ _ _| |_ _ _| | |_ | ||
| |/ _` | | | | __| | | | | | | | ||
| | (_| | |_| | |_| |_| | | | | | ||
|_|\__,_|\__,_|\__|\__,_|_|_|_| | ||
|
||
------------------------------------' | ||
echo "GID/UID | ||
User uid: $(id -u abc) | ||
User gid: $(id -g abc) | ||
------------------------------------ | ||
" | ||
chown abc:abc /app | ||
chown abc:abc /config | ||
chown abc:abc /defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
#If variable $ADVANCED_GIT_BRANCH, set branch to $ADVANCED_GIT_BRANCH, otherwise, default to master | ||
# If variable $ADVANCED_GIT_BRANCH, set branch to $ADVANCED_GIT_BRANCH, otherwise, default to master | ||
[ "$ADVANCED_GIT_BRANCH" ] || \ | ||
ADVANCED_GIT_BRANCH="master" | ||
|
||
[ "$ADVANCED_GIT_REPO" ] || \ | ||
ADVANCED_GIT_REPO="https://github.com/tautulli/tautulli.git" | ||
ADVANCED_GIT_REPO="https://github.com/Tautulli/Tautulli.git" | ||
|
||
# install app | ||
[[ ! -d "/opt/plexpy/.git" ]] && \ | ||
git clone --branch $ADVANCED_GIT_BRANCH $ADVANCED_GIT_REPO /opt/plexpy | ||
INSTALL_FOLDER="/app/tautulli" | ||
|
||
# permissions | ||
# Install app | ||
[[ ! -d "${INSTALL_FOLDER}/.git" ]] && \ | ||
git clone --branch "$ADVANCED_GIT_BRANCH" "$ADVANCED_GIT_REPO" "${INSTALL_FOLDER}" | ||
|
||
# Permissions | ||
chown -R abc:abc \ | ||
/config \ | ||
/opt/plexpy | ||
"${INSTALL_FOLDER}" |
2 changes: 1 addition & 1 deletion
2
root/etc/services.d/plexpy/run → root/etc/services.d/tautulli/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
exec \ | ||
s6-setuidgid abc python /opt/plexpy/PlexPy.py \ | ||
s6-setuidgid abc python /app/tautulli/Tautulli.py \ | ||
--datadir /config |