File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ MAINTAINER Stian Larsen, sparklyballs
55ENV PLEX_INSTALL="https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu"
66
77# global environment settings
8- ENV DEBIAN_FRONTEND="noninteractive"
9- ENV HOME="/config"
10- ENV PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server"
8+ ENV DEBIAN_FRONTEND="noninteractive" \
9+ PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server" \
10+ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
11+ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
12+ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6"
1113
1214# install packages
1315RUN \
2325 "${PLEX_INSTALL}" && \
2426 dpkg -i /tmp/plexmediaserver.deb && \
2527
28+ # change abc home folder to fix plex hanging at runtime with usermod
29+ usermod -d /app abc && \
30+
2631# cleanup
2732 apt-get clean && \
2833 rm -rf \
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ Valid settings for VERSION are:-
100100
101101## Versions
102102
103+ + ** 11.01.17:** Use Plex environemt variables from pms docker,
104+ change abc home folder to /app to alleviate usermod chowning library folder by default (thanks gbooker, plexinc).
103105+ ** 03.01.17:** Use case insensitive version variable matching rather than export and make lowercase.
104106+ ** 17.10.16:** Allow use of uppercase version variable
105107+ ** 01.10.16:** Add TZ info to README.
Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22
33# check for Library existence and permissions
4- if [ ! -d "/config/Library " ]; then
5- mkdir -p /config/Library
6- chown abc:abc /config/Library
7- elif [ ! "$(stat -c %u /config/Library )" = "$PUID" ]; then
8- echo "Change in ownership detected, please be patient while we chown existing files"
9- echo "This could take some time"
10- chown abc:abc -R \
11- /config/Library
4+ if [ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR} " ]; then
5+ mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
6+ chown abc:abc "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
7+ elif [ ! "$(stat -c %u ${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR} )" = "$PUID" ]; then
8+ echo "Change in ownership detected, please be patient while we chown existing files"
9+ echo "This could take some time"
10+ chown abc:abc -R \
11+ "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
1212fi
13+
14+ chown abc:abc \
15+ /config \
16+ /config/*
Original file line number Diff line number Diff line change 11#!/usr/bin/with-contenv bash
22
33echo "Starting Plex Media Server."
4- exec s6-setuidgid abc /usr/sbin/start_pms
4+ exec s6-setuidgid abc /bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver /usr/lib/plexmediaserver/Plex\ Media\ Server'
5+
56
You can’t perform that action at this time.
0 commit comments