commit
950d6b298a
5 changed files with 25 additions and 20 deletions
|
|
@ -4,9 +4,9 @@ MAINTAINER Stian Larsen <lonixx@gmail.com>
|
||||||
# Install Plex
|
# Install Plex
|
||||||
RUN apt-get -q update && \
|
RUN apt-get -q update && \
|
||||||
PLEXURL=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "ubuntu64" | cut -d '"' -f 4) && \
|
PLEXURL=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "ubuntu64" | cut -d '"' -f 4) && \
|
||||||
apt-get install -qy dbus gdebi-core avahi-daemon wget && \
|
apt-get install -qy dbus avahi-daemon wget && \
|
||||||
wget -P /tmp "$PLEXURL" && \
|
wget -P /tmp "$PLEXURL" && \
|
||||||
gdebi -n /tmp/plexmediaserver_*_amd64.deb && \
|
dpkg -i /tmp/plexmediaserver_*_amd64.deb && \
|
||||||
rm -f /tmp/plexmediaserver_*_amd64.deb && \
|
rm -f /tmp/plexmediaserver_*_amd64.deb && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
@ -22,4 +22,4 @@ ADD plexmediaserver /defaults/plexmediaserver
|
||||||
|
|
||||||
#Mappings and ports
|
#Mappings and ports
|
||||||
VOLUME ["/config", "/transcode"]
|
VOLUME ["/config", "/transcode"]
|
||||||
EXPOSE 32400
|
EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ docker create \
|
||||||
--net=host \
|
--net=host \
|
||||||
-e VERSION=plexpass \
|
-e VERSION=plexpass \
|
||||||
-e PUID=<UID> -e PGID=<GID> \
|
-e PUID=<UID> -e PGID=<GID> \
|
||||||
-v </path/to/transcode>:/transcode \
|
|
||||||
-v </path/to/library>:/config \
|
-v </path/to/library>:/config \
|
||||||
-v <path/to/tvseries>:/data/tvshows \
|
-v <path/to/tvseries>:/data/tvshows \
|
||||||
-v </path/to/movies>:/data/movies \
|
-v </path/to/movies>:/data/movies \
|
||||||
|
|
@ -30,7 +29,6 @@ docker create \
|
||||||
|
|
||||||
* `--net=host` - Shares host networking with container, **required**.
|
* `--net=host` - Shares host networking with container, **required**.
|
||||||
* `-v /config` - Plex library location. *This can grow very large, 50gb+ is likely for a large collection.*
|
* `-v /config` - Plex library location. *This can grow very large, 50gb+ is likely for a large collection.*
|
||||||
* `-v /transcode` *(optional)* - Transcode directory to offload heavy writes in a docker container.
|
|
||||||
* `-v /data/xyz` - Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc.
|
* `-v /data/xyz` - Media goes here. Add as many as needed e.g. `/data/movies`, `/data/tv`, etc.
|
||||||
* `-e VERSION=` - *(optional)* - Permits specific version selection e.g. `0.9.12.4.1192-9a47d21`, also supports `plexpass` or `latest`
|
* `-e VERSION=` - *(optional)* - Permits specific version selection e.g. `0.9.12.4.1192-9a47d21`, also supports `plexpass` or `latest`
|
||||||
* `-e PGID=` for for GroupID - see below for explanation
|
* `-e PGID=` for for GroupID - see below for explanation
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
chown -c abc:abc /transcode
|
|
||||||
|
|
@ -10,18 +10,31 @@ while ! ping -c1 tools.linuxserver.io &>/dev/null; do :; done
|
||||||
#The following error is not an error.
|
#The following error is not an error.
|
||||||
INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
|
INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
|
||||||
|
|
||||||
[ "$PLEXPASS" ] && echo "PLEXPASS is deprecated, please use VERSION"
|
|
||||||
|
|
||||||
if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then
|
#Get stuff from things.
|
||||||
VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
|
PLEX_TOKEN=$( sed -n 's/.*PlexOnlineToken="//p' "/config/Library/Application Support/Plex Media Server/Preferences.xml" | sed "s/\".*//")
|
||||||
echo "Using version: $VERSION from Plexpass latest"
|
[ -z "$PLEX_TOKEN" ] && echo "Plex token not avalible, please login " && exit 0
|
||||||
elif [[ $VERSION = "latest" || -z $VERSION ]]; then
|
PLEX_LATEST=$(curl -s "https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=$PLEX_TOKEN"| cut -d "/" -f 5 )
|
||||||
VERSION=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "version" | cut -d '"' -f 4)
|
|
||||||
echo "Using version: $VERSION from Public latest"
|
[ "$PLEXPASS" ] && echo "PLEXPASS is deprecated, please use VERSION"
|
||||||
|
if [[ -z $VERSION && "$PLEXPASS" == "1" || $VERSION = "plexpass" ]]; then echo "VERSION=plexpass is depricated please use version latest"; fi
|
||||||
|
|
||||||
|
|
||||||
|
#Start update rutine
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$VERSION" = latest || "$VERSION" = plexpass ]]; then
|
||||||
|
VERSION=$PLEX_LATEST
|
||||||
|
echo "Target version: $VERSION set by: latest\plexpass"
|
||||||
|
elif [[ -z "$VERSION" ]]; then
|
||||||
|
echo "Target version: Version not set, Defaulting to supplied version"
|
||||||
else
|
else
|
||||||
echo "Using version: $VERSION from Manual"
|
echo "Target version: $VERSION set by: manually"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
last=130
|
last=130
|
||||||
if [[ "$VERSION" == "" ]]; then
|
if [[ "$VERSION" == "" ]]; then
|
||||||
echo "ERROR: No version found, running installed version $INSTALLED"
|
echo "ERROR: No version found, running installed version $INSTALLED"
|
||||||
|
|
@ -33,7 +46,7 @@ elif [[ "$VERSION" != "$INSTALLED" ]]; then
|
||||||
last=$?
|
last=$?
|
||||||
done
|
done
|
||||||
apt-get remove --purge -y plexmediaserver
|
apt-get remove --purge -y plexmediaserver
|
||||||
gdebi -n /tmp/plexmediaserver_"${VERSION}"_amd64.deb
|
dpkg -i /tmp/plexmediaserver_"${VERSION}"_amd64.deb
|
||||||
else
|
else
|
||||||
echo "No need to update!"
|
echo "No need to update!"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
|
||||||
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
|
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
|
||||||
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
|
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
|
||||||
|
|
||||||
# where the mediaserver should store the transcodes
|
|
||||||
PLEX_MEDIA_SERVER_TMPDIR=/transcode
|
|
||||||
|
|
||||||
# uncomment to set it to something else
|
# uncomment to set it to something else
|
||||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support"
|
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue