workaround for missing start_pms script

This commit is contained in:
dave 2020-06-19 16:43:05 -07:00
parent 5cc05af59d
commit 14d9271a12
2 changed files with 25 additions and 2 deletions

View File

@ -1,6 +1,11 @@
FROM ubuntu:bionic FROM ubuntu:focal
RUN apt-get update && \ ADD start_pms /usr/sbin/
RUN chmod +x /usr/sbin/start_pms && \
groupadd --gid 101 plex && \
useradd --uid 101 --gid 101 plex && \
apt-get update && \
apt-get install -y wget sudo && \ apt-get install -y wget sudo && \
wget -q -O /tmp/plex.deb "https://plex.tv/downloads/latest/1?channel=16&build=linux-ubuntu-x86_64&distro=ubuntu" && \ wget -q -O /tmp/plex.deb "https://plex.tv/downloads/latest/1?channel=16&build=linux-ubuntu-x86_64&distro=ubuntu" && \
dpkg -i /tmp/plex.deb && \ dpkg -i /tmp/plex.deb && \

18
start_pms Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash
echo "Starting Plex Media Server."
home=/var/lib/plexmediaserver/
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR:-${home}/Library/Application Support}"
export PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
export PLEX_MEDIA_SERVER_INFO_VENDOR=Docker
export PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container"
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
if [ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]; then
/bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
chown plex:plex "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
fi
exec /bin/sh -c 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server'