Skip to content

Commit 501683a

Browse files
committed
rebase to xenial
1 parent b9224a4 commit 501683a

13 files changed

Lines changed: 111 additions & 715 deletions

File tree

Dockerfile

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,53 @@
1-
FROM linuxserver/baseimage
2-
MAINTAINER Stian Larsen <lonixx@gmail.com>
1+
FROM ubuntu:16.04
2+
MAINTAINER Stian Larsen, sparklyballs
33

4-
# Install Plex
5-
RUN apt-get -q update && \
6-
apt-get install -qy dbus avahi-daemon wget && \
7-
curl -L 'https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu' -o /tmp/plexmediaserver.deb && \
8-
dpkg -i /tmp/plexmediaserver.deb && rm -f /tmp/plexmediaserver.deb && \
9-
apt-get clean && \
10-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4+
# global environment settings
5+
ENV DEBIAN_FRONTEND="noninteractive"
6+
ENV HOME="/config"
7+
ENV TERM="xterm"
118

9+
# add abc user and make folders
10+
RUN \
11+
useradd -u 911 -U -d /config -s /bin/false abc && \
12+
usermod -G users abc && \
13+
mkdir -p \
14+
/config
1215

13-
#Adding Custom files
14-
COPY init/ /etc/my_init.d/
15-
COPY services/ /etc/service/
16-
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
16+
# install packages
17+
RUN \
18+
apt-get update && \
19+
apt-get install -y \
20+
apt-utils && \
21+
apt-get install -y \
22+
avahi-daemon \
23+
curl \
24+
dbus \
25+
wget && \
1726

18-
# Define /config in the configuration file not using environment variables
19-
COPY plexmediaserver /defaults/plexmediaserver
27+
# add s6 overlay
28+
curl -o \
29+
/tmp/s6.tar.gz -L \
30+
https://github.com/just-containers/s6-overlay/releases/download/v1.17.2.0/s6-overlay-amd64.tar.gz && \
31+
tar xvf /tmp/s6.tar.gz -C / && \
2032

21-
#Mappings and ports
22-
VOLUME ["/config"]
33+
# cleanup
34+
apt-get clean && \
35+
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
36+
37+
# install plex
38+
RUN \
39+
curl -o \
40+
/tmp/plexmediaserver.deb -L \
41+
'https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu' && \
42+
dpkg -i /tmp/plexmediaserver.deb && \
43+
rm -f /tmp/plexmediaserver.deb
44+
45+
46+
ENTRYPOINT ["/init"]
47+
48+
# add local files
49+
COPY root/ /
50+
51+
# ports and volumes
52+
VOLUME /config
2353
EXPOSE 32400 32400/udp 32469 32469/udp 5353/udp 1900/udp

LICENSE

Lines changed: 0 additions & 675 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
6666

6767
## Changelog
6868

69-
+ **07.04.2016:** removed `/transcode` volume support (upstream Plex change) and modified PlexPass download method to prevent unauthorised usage of paid PMS
70-
+ **24.09.2015:** added optional support for volume transcoding (/transcode), and various typo fixes.
71-
+ **17.09.2015:** Changed to run chmod only once
72-
+ **19.09.2015:** Plex updated their download servers from http to https
73-
+ **28.08.2015:** Removed plexpass from routine, and now uses VERSION as a combination fix.
74-
+ **18.07.2015:** Moved autoupdate to be hosted by linuxserver.io and implemented bugfix thanks to ljm42.
75-
+ **09.07.2015:** Now with ability to pick static version number.
76-
+ **08.07.2015:** Now with autoupdates. (Hosted by fanart.tv)
77-
+ **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.
69+
+ **30.06.16:** Rebased to xenial and s6 overlay
70+
+ **07.04.16:** removed `/transcode` volume support (upstream Plex change) and modified PlexPass download method to prevent unauthorised usage of paid PMS
71+
+ **24.09.15:** added optional support for volume transcoding (/transcode), and various typo fixes.
72+
+ **17.09.15:** Changed to run chmod only once
73+
+ **19.09.15:** Plex updated their download servers from http to https
74+
+ **28.08.15:** Removed plexpass from routine, and now uses VERSION as a combination fix.
75+
+ **18.07.15:** Moved autoupdate to be hosted by linuxserver.io and implemented bugfix thanks to ljm42.
76+
+ **09.07.15:** Now with ability to pick static version number.
77+
+ **08.07.15:** Now with autoupdates. (Hosted by fanart.tv)
78+
+ **03.07.15:** Fixed a mistake that allowed plex to run as user plex rather than abc (99:100). Thanks to double16 for spotting this.

root/etc/cont-init.d/10_add_user

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
4+
5+
PUID=${PUID:-911}
6+
PGID=${PGID:-911}
7+
8+
if [ ! "$(id -u abc)" -eq "$PUID" ]; then usermod -o -u "$PUID" abc ; fi
9+
if [ ! "$(id -g abc)" -eq "$PGID" ]; then groupmod -o -g "$PGID" abc ; fi
10+
11+
echo "
12+
-------------------------------------
13+
_ _ _
14+
| |___| (_) ___
15+
| / __| | |/ _ \
16+
| \__ \ | | (_) |
17+
|_|___/ |_|\___/
18+
|_|
19+
20+
Brought to you by linuxserver.io
21+
We do accept donations at:
22+
https://www.linuxserver.io/donations
23+
-------------------------------------
24+
GID/UID
25+
-------------------------------------
26+
User uid: $(id -u abc)
27+
User gid: $(id -g abc)
28+
-------------------------------------
29+
"
30+
chown abc:abc /config
31+
chown abc:abc /defaults
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#!/bin/bash
1+
#!/usr/bin/with-contenv bash
22

33
[[ -e /var/run/dbus/pid ]] && rm -f /var/run/dbus/pid
44

55
mkdir -p /var/run/dbus
66
chown messagebus:messagebus /var/run/dbus
77
dbus-uuidgen --ensure
88
sleep 1
9+
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
#!/bin/bash
1+
#!/usr/bin/with-contenv bash
22

33
# opt out for autoupdates
44
[ "$ADVANCED_DISABLEUPDATES" ] && exit 0
55

6-
export DEBIAN_FRONTEND=noninteractive
7-
8-
while ! ping -c1 tools.linuxserver.io &>/dev/null; do :; done
96

107
#The following error is not an error.
118
INSTALLED=$(dpkg-query -W -f='${Version}' plexmediaserver)
@@ -53,3 +50,4 @@ else
5350
echo "No need to update!"
5451
fi
5552
cp -v /defaults/plexmediaserver /etc/default/plexmediaserver
53+
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/with-contenv bash
22

33
if [ ! -d "/config/Library" ]; then
44
mkdir /config/Library
@@ -9,3 +9,4 @@ if [ ! -f "/config/Library/linuxserver-chown.lock" ]; then
99
find /config/Library ! \( -user abc -a -group root \) -print0 | xargs -0 chown abc:root
1010
touch /config/Library/linuxserver-chown.lock
1111
fi
12+

root/etc/services.d/avahi/run

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
until [[ -e /var/run/dbus/system_bus_socket ]]; do
4+
sleep 1s
5+
done
6+
7+
echo "Starting Avahi daemon"
8+
exec avahi-daemon --no-chroot
9+
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
#!/bin/bash
1+
#!/usr/bin/with-contenv bash
2+
23
echo "Starting dbus-daemon"
34
exec dbus-daemon --system --nofork
5+

0 commit comments

Comments
 (0)