parent
40fd9a3f5a
commit
8458b1774c
@ -0,0 +1,34 @@
|
||||
FROM phusion/baseimage:0.9.15
|
||||
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
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
|
||||
# Install Plex
|
||||
RUN apt-get -q update && \
|
||||
apt-get install -qy gdebi-core wget && \
|
||||
wget -P /tmp http://downloads.plexapp.com/plex-media-server/0.9.9.14.531-7eef8c6/plexmediaserver_0.9.9.14.531-7eef8c6_amd64.deb && \
|
||||
gdebi -n /tmp/plexmediaserver_0.9.9.14.531-7eef8c6_amd64.deb && \
|
||||
rm -f /tmp/plexmediaserver_0.9.9.14.531-7eef8c6_amd64.deb && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
#Mappings and ports
|
||||
VOLUME /config
|
||||
VOLUME /data
|
||||
EXPOSE 32400
|
||||
|
||||
|
||||
# Define /config in the configuration file not using environment variables
|
||||
ADD plexmediaserver /etc/default/plexmediaserver
|
||||
|
||||
#Adding Custom files
|
||||
ADD init/ /etc/my_init.d/
|
||||
ADD services/ /etc/service/
|
||||
RUN chmod -v +x /etc/service/*/run
|
||||
RUN chmod -v +x /etc/my_init.d/*.sh
|
@ -1,2 +1,27 @@
|
||||
# plexmediaserver
|
||||
The linuxserver.io version of plexmediaserver (built from lonix's original)
|
||||
lonix/plex
|
||||
=============
|
||||
plexp. with or without plexpass to run the latest edition
|
||||
|
||||
|
||||
sample command:
|
||||
```
|
||||
docker run -d --name=plex --net=host -v /etc/localtime:/etc/localtime:ro -v <path to plex library>:/config -v <path to media>:/data -e PUID=996 -e PGID=996 -e PLEXPASS=1 -p 32400:32400 lonix/plex:1.2
|
||||
```
|
||||
|
||||
You need to map
|
||||
* --net=host for streaming to work.
|
||||
* Port 32400 for plex web-app.
|
||||
* Mount /config for plex config files.
|
||||
* Mount /data for plex media files
|
||||
* Mount /etc/localhost for timesync (Not required)
|
||||
* PLEXPASS set to 1 for Plexpass version, UNSET for Public
|
||||
* GUID and GPID set toyou local plex user group (you may need to create a user on the host (named plex))
|
||||
|
||||
|
||||
This container will update plex on each launch (if update found). It is based on phusion-baseimage with ssh removed. (use nsenter).
|
||||
If the app does not update to the latest version, i need to update a file on server, msg me at <lonixx@gmail.com>
|
||||
|
||||
**Credits**
|
||||
* needo <needo@superhero.org>
|
||||
* Eric Schultz <eric@startuperic.com>
|
||||
* Tim Haak <tim@haak.co.uk>
|
||||
|
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -e /var/run/dbus/pid ]; then rm -f /var/run/dbus/pid; fi
|
||||
mkdir -p /var/run/dbus
|
||||
chown messagebus:messagebus /var/run/dbus
|
||||
dbus-uuidgen --ensure
|
||||
sleep 1
|
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
INSTALLED=`dpkg-query -W -f='${Version}' plexmediaserver`
|
||||
if [ -z "$PLEXPASS" ]; then
|
||||
VERSION=$(curl https://lonix.me/mirror/plex/plexPub.ver)
|
||||
else
|
||||
VERSION=$(curl https://lonix.me/mirror/plex/plexPass.ver)
|
||||
fi
|
||||
if [ "$VERSION" == "$INSTALLED" ]; then
|
||||
exit 0;
|
||||
fi
|
||||
mv /etc/default/plexmediaserver /tmp/
|
||||
apt-get remove --purge -y plexmediaserver
|
||||
wget -P /tmp "http://downloads.plexapp.com/plex-media-server/$VERSION/plexmediaserver_${VERSION}_amd64.deb"
|
||||
gdebi -n /tmp/plexmediaserver_${VERSION}_amd64.deb
|
||||
mv /tmp/plexmediaserver /etc/default/
|
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! "$(id -u plex)" -eq "$PUID" ]; then usermod -u "$PUID" plex ; fi
|
||||
if [ ! "$(id -g plex)" -eq "$PGID" ]; then groupmod -g "$PGID" plex ; fi
|
||||
|
||||
echo "
|
||||
-----------------------------------
|
||||
PLEX GID/UID
|
||||
-----------------------------------
|
||||
Plex uid: $(id -u plex)
|
||||
Plex gid: $(id -g plex)
|
||||
-----------------------------------
|
||||
Plex will now continue to boot.
|
||||
"
|
||||
sleep 2
|
@ -0,0 +1,19 @@
|
||||
# default script for Plex Media Server
|
||||
|
||||
# the number of plugins that can run at the same time
|
||||
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
|
||||
|
||||
# ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
|
||||
PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
|
||||
|
||||
# where the mediaserver should store the transcodes
|
||||
PLEX_MEDIA_SERVER_TMPDIR=/tmp
|
||||
|
||||
# uncomment to set it to something else
|
||||
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support"
|
||||
|
||||
# the user that PMS should run as, defaults to 'plex'
|
||||
# note that if you change this you might need to move
|
||||
# the Application Support directory to not lose your
|
||||
# media library
|
||||
PLEX_MEDIA_SERVER_USER=plex
|
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec avahi-daemon --no-chroot
|
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec dbus-daemon --system --nofork
|
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec /sbin/setuser plex /usr/sbin/start_pms
|
Loading…
Reference in new issue