Browse Source

workaround for missing start_pms script

master
dave 5 months ago
parent
commit
14d9271a12
2 changed files with 25 additions and 2 deletions
  1. +7
    -2
      Dockerfile
  2. +18
    -0
      start_pms

+ 7
- 2
Dockerfile 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 && \
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 && \


+ 18
- 0
start_pms 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'

Loading…
Cancel
Save