Merge remote-tracking branch 'linuxserver/master'
Conflicts: Dockerfile init/11_new_user.sh
This commit is contained in:
commit
e000e5bd94
6 changed files with 42 additions and 32 deletions
10
Dockerfile
10
Dockerfile
|
|
@ -1,9 +1,5 @@
|
||||||
FROM phusion/baseimage:0.9.16
|
FROM linuxserver/baseimage
|
||||||
MAINTAINER Stian Larsen <lonixx@gmail.com>
|
MAINTAINER Stian Larsen <lonixx@gmail.com>
|
||||||
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
ENV HOME /root
|
|
||||||
|
|
||||||
|
|
||||||
# Use baseimage-docker's init system
|
# Use baseimage-docker's init system
|
||||||
CMD ["/sbin/my_init"]
|
CMD ["/sbin/my_init"]
|
||||||
|
|
@ -11,8 +7,8 @@ CMD ["/sbin/my_init"]
|
||||||
|
|
||||||
# Install Plex
|
# Install Plex
|
||||||
RUN apt-get -q update && \
|
RUN apt-get -q update && \
|
||||||
VERSION=$(curl https://raw.githubusercontent.com/linuxserver/misc-files/master/plex-version/public) && \
|
VERSION=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "version" | cut -d '"' -f 4) && \
|
||||||
apt-get install -qy dbus avahi-daemon gdebi-core wget && \
|
apt-get install -qy dbus gdebi-core avahi-daemon wget && \
|
||||||
wget -P /tmp "http://downloads.plexapp.com/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb" && \
|
wget -P /tmp "http://downloads.plexapp.com/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb" && \
|
||||||
gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb && \
|
gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb && \
|
||||||
rm -f /tmp/plexmediaserver_${VERSION}_amd64.deb && \
|
rm -f /tmp/plexmediaserver_${VERSION}_amd64.deb && \
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ docker create \
|
||||||
--name=plex \
|
--name=plex \
|
||||||
--net=host \
|
--net=host \
|
||||||
-e PLEXPASS=1 \
|
-e PLEXPASS=1 \
|
||||||
|
-e VERSION="0.9.12.4.1192-9a47d21" \
|
||||||
-e PUID=<UID> -e PGID=<GID> \
|
-e PUID=<UID> -e PGID=<GID> \
|
||||||
-v </path/to/library>:/config \
|
-v </path/to/library>:/config \
|
||||||
-v <path/to/tvseries>:/data/tvshows \
|
-v <path/to/tvseries>:/data/tvshows \
|
||||||
|
|
@ -28,6 +29,7 @@ docker create \
|
||||||
* `-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 /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 PLEXPASS=1` - Set to 1 if you have a Plex Pass, if not don't specify it.
|
* `-e PLEXPASS=1` - Set to 1 if you have a Plex Pass, if not don't specify it.
|
||||||
|
* `-e VERSION` - Set this to a full version number if you want to use a spesific version e.g. "0.9.12.4.1192-9a47d21"
|
||||||
* `-e PGID` for for GroupID - see below for explanation
|
* `-e PGID` for for GroupID - see below for explanation
|
||||||
* `-e PUID` for for UserID - see below for explanation
|
* `-e PUID` for for UserID - see below for explanation
|
||||||
|
|
||||||
|
|
@ -48,3 +50,10 @@ Part of what makes our containers work so well is by allowing you to specify you
|
||||||
* IronicBadger <ironicbadger@linuxserver.io>
|
* IronicBadger <ironicbadger@linuxserver.io>
|
||||||
|
|
||||||
Auto-updating Ubuntu (phusion) based Plex Media Server container, brought to you by LinuxServer.io
|
Auto-updating Ubuntu (phusion) based Plex Media Server container, brought to you by LinuxServer.io
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
+ **18.07.2015:** Moved autoupdate to be hosted by linuxserver.io and implented bugfix thanks to ljm42.
|
||||||
|
+ **09.07.2015:** Now with ability to pick static versionnumber.
|
||||||
|
+ **08.07.2015:** Now with autoupdates. (Hosted by fanart.tv)
|
||||||
|
+ **03.07.2015:** Fixed a mistake that allowed plex to run as user plex rather than abc (99:100). Thanks to double16 for spotting this.
|
||||||
|
|
|
||||||
15
init/11_new_user.sh
Normal file
15
init/11_new_user.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$(id -u abc)" != "$PUID" ]; then usermod -o -u "$PUID" abc ; fi
|
||||||
|
if [ "$(id -g abc)" != "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
|
||||||
|
|
||||||
|
echo "
|
||||||
|
-----------------------------------
|
||||||
|
Plex GID/UID
|
||||||
|
-----------------------------------
|
||||||
|
Plex uid: $(id -u abc)
|
||||||
|
Plex gid: $(id -g abc)
|
||||||
|
-----------------------------------
|
||||||
|
Plex will now continue to boot.
|
||||||
|
"
|
||||||
|
sleep 2
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
|
INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
|
||||||
if [ "$PLEXPASS" == "1" ]; then
|
if [ $VERSION ]; then
|
||||||
VERSION=$(curl https://raw.githubusercontent.com/linuxserver/misc-files/master/plex-version/plexpass)
|
echo "Useing version: $VERSION from Manual"
|
||||||
|
elif [ "$PLEXPASS" == "1" ]; then
|
||||||
|
VERSION=$(curl -s https://tools.linuxserver.io/latest-plexpass.json | grep "version" | cut -d '"' -f 4)
|
||||||
|
echo "Useing version: $VERSION from Plexpass latest"
|
||||||
else
|
else
|
||||||
VERSION=$(curl https://raw.githubusercontent.com/linuxserver/misc-files/master/plex-version/public)
|
VERSION=$(curl -s https://tools.linuxserver.io/latest-plex.json| grep "version" | cut -d '"' -f 4)
|
||||||
|
echo "Useing version: $VERSION from Public latest"
|
||||||
fi
|
fi
|
||||||
if [ "$VERSION" == "$INSTALLED" ]; then
|
if [ "$VERSION" == "$INSTALLED" ]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ -n "$PUID" -a "$(id -u abc)" != "$PUID" ]; then usermod -u "$PUID" abc ; fi
|
|
||||||
if [ -n "$PGID" -a "$(id -g abc)" != "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
|
|
||||||
|
|
||||||
# There will be a lot of files in the config and searching through all of them will take a long time.
|
|
||||||
# Only Plex should modify these, so do a quick test to see if we need to search deeper.
|
|
||||||
if [ -n "$( find /config -maxdepth 2 -not \( -user abc -a -group abc \) )" ]; then
|
|
||||||
find /config -not \( -user abc -a -group abc \) -exec chown abc:abc {} +
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "
|
|
||||||
-----------------------------------
|
|
||||||
Plex GID/UID
|
|
||||||
-----------------------------------
|
|
||||||
Plex uid: $(id -u abc)
|
|
||||||
Plex gid: $(id -g abc)
|
|
||||||
-----------------------------------
|
|
||||||
Plex will now continue to boot.
|
|
||||||
"
|
|
||||||
sleep 2
|
|
||||||
7
init/99_chown_plex_owned_files.sh
Normal file
7
init/99_chown_plex_owned_files.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
if [ -d "/config/Library" ]; then
|
||||||
|
find /config/Library ! \( -user abc -a -group abc \) -exec chown -hv abc:abc {} \;
|
||||||
|
fi
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue