diff --git a/Dockerfile b/Dockerfile index 26a889b..3204aed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:focal # set version label ARG BUILD_DATE @@ -22,10 +22,18 @@ ENV DEBIAN_FRONTEND="noninteractive" \ PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ + echo "**** add Intel repo ****" && \ + curl -sL https://repositories.intel.com/graphics/intel-graphics.key | apt-key add - && \ + echo 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main' > /etc/apt/sources.list.d/intel.list && \ echo "**** install runtime packages ****" && \ apt-get update && \ apt-get install -y \ jq \ + intel-igc-cm=1.0.128+i699.3~u20.04 \ + intel-opencl-icd=21.49.21786+i643~u20.04 \ + libigc1=1.0.10409+i699.3~u20.04 \ + libigdfcl1=1.0.10409+i699.3~u20.04 \ + libigdgmm11=21.3.3+i643~u20.04 \ udev \ unrar \ wget && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index a005fdd..ffe9a7a 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal # set version label ARG BUILD_DATE diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 279bbe7..e4ce32e 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,4 +1,4 @@ -FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy +FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal # set version label ARG BUILD_DATE diff --git a/README.md b/README.md index f8578ce..b471958 100644 --- a/README.md +++ b/README.md @@ -299,7 +299,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **16.10.22:** - Rebase to jammy. Update to s6v3. Remove opencl packages (bundled with plex). * **18.07.22:** - Pin all opencl related driver packages. * **16.05.22:** - Pin opencl version. * **04.03.22:** - Increase verbosity of video device permissions fix, attempt to fix missing group rw. diff --git a/readme-vars.yml b/readme-vars.yml index 9a1e7e2..dc0718d 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -107,7 +107,6 @@ app_setup_block: | # changelog changelogs: - - { date: "16.10.22:", desc: "Rebase to jammy. Update to s6v3. Remove opencl packages (bundled with plex)." } - { date: "18.07.22:", desc: "Pin all opencl related driver packages." } - { date: "16.05.22:", desc: "Pin opencl version." } - { date: "04.03.22:", desc: "Increase verbosity of video device permissions fix, attempt to fix missing group rw." } diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/run b/root/etc/cont-init.d/40-chown-files old mode 100755 new mode 100644 similarity index 77% rename from root/etc/s6-overlay/s6-rc.d/init-plex-chown/run rename to root/etc/cont-init.d/40-chown-files index b64fe98..b2e3c31 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/run +++ b/root/etc/cont-init.d/40-chown-files @@ -16,9 +16,8 @@ if [ ! "$(stat -c %u /config/Library)" = "$PUID" ]; then fi # remove plex pid after unclean stop -if [[ -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" ]]; then - rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" -fi +[[ -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" ]] && \ +rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid" # permissions (non-recursive) on config root and folders chown abc:abc \ diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/run b/root/etc/cont-init.d/45-plex-claim old mode 100755 new mode 100644 similarity index 93% rename from root/etc/s6-overlay/s6-rc.d/init-plex-claim/run rename to root/etc/cont-init.d/45-plex-claim index c597876..7841f54 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/run +++ b/root/etc/cont-init.d/45-plex-claim @@ -1,10 +1,6 @@ #!/usr/bin/with-contenv bash -if grep -qs "PlexOnlineToken" "/config/Library/Application Support/Plex Media Server/Preferences.xml"; then - echo "**** Server already claimed ****" - exit 0 -elif [ -z "$PLEX_CLAIM" ]; then - echo "**** Server is unclaimed, but no claim token has been set ****" +if grep -qs "PlexOnlineToken" "/config/Library/Application Support/Plex Media Server/Preferences.xml" || [ -z "$PLEX_CLAIM" ]; then exit 0 fi PREFNAME="/config/Library/Application Support/Plex Media Server/Preferences.xml" @@ -80,4 +76,4 @@ if [ -n "$PlexOnlineToken" ]; then sed -i "s/\/>/ PlexOnlineToken=\"${PlexOnlineToken}\"\/>/g" "${PREFNAME}" else echo "Unable to claim Plex server. Either manually claim by connecting to http://serverip:32400/web from the same network subnet, or recreate container with a new claim token." -fi +fi \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/run b/root/etc/cont-init.d/50-gid-video similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/run rename to root/etc/cont-init.d/50-gid-video diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-update/run b/root/etc/cont-init.d/60-plex-update similarity index 100% rename from root/etc/s6-overlay/s6-rc.d/init-plex-update/run rename to root/etc/cont-init.d/60-plex-update diff --git a/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-plex-update b/root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-plex-update deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/dependencies.d/init-config b/root/etc/s6-overlay/s6-rc.d/init-plex-chown/dependencies.d/init-config deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/type b/root/etc/s6-overlay/s6-rc.d/init-plex-chown/type deleted file mode 100644 index 3d92b15..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/up b/root/etc/s6-overlay/s6-rc.d/init-plex-chown/up deleted file mode 100644 index 2d5ad2f..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-plex-chown/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/dependencies.d/init-plex-chown b/root/etc/s6-overlay/s6-rc.d/init-plex-claim/dependencies.d/init-plex-chown deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/type b/root/etc/s6-overlay/s6-rc.d/init-plex-claim/type deleted file mode 100644 index 3d92b15..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/up b/root/etc/s6-overlay/s6-rc.d/init-plex-claim/up deleted file mode 100644 index 56750b8..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-claim/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-plex-claim/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/dependencies.d/init-plex-claim b/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/dependencies.d/init-plex-claim deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/type b/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/type deleted file mode 100644 index 3d92b15..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/up b/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/up deleted file mode 100644 index 05f6fde..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-gid-video/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-plex-gid-video/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-update/dependencies.d/init-plex-gid-video b/root/etc/s6-overlay/s6-rc.d/init-plex-update/dependencies.d/init-plex-gid-video deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-update/type b/root/etc/s6-overlay/s6-rc.d/init-plex-update/type deleted file mode 100644 index 3d92b15..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-update/type +++ /dev/null @@ -1 +0,0 @@ -oneshot \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-update/up b/root/etc/s6-overlay/s6-rc.d/init-plex-update/up deleted file mode 100644 index 6b6b164..0000000 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-update/up +++ /dev/null @@ -1 +0,0 @@ -/etc/s6-overlay/s6-rc.d/init-plex-update/run \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/svc-plex/dependencies.d/init-services b/root/etc/s6-overlay/s6-rc.d/svc-plex/dependencies.d/init-services deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/svc-plex/notification-fd b/root/etc/s6-overlay/s6-rc.d/svc-plex/notification-fd deleted file mode 100644 index e440e5c..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-plex/notification-fd +++ /dev/null @@ -1 +0,0 @@ -3 \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/svc-plex/run b/root/etc/s6-overlay/s6-rc.d/svc-plex/run deleted file mode 100755 index ba42c34..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-plex/run +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/with-contenv bash - -echo "Starting Plex Media Server. . . (you can ignore the libusb_init error)" -export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m) -export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r) -exec \ - s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 32400" \ - s6-setuidgid abc "/usr/lib/plexmediaserver/Plex Media Server" diff --git a/root/etc/s6-overlay/s6-rc.d/svc-plex/type b/root/etc/s6-overlay/s6-rc.d/svc-plex/type deleted file mode 100644 index 1780f9f..0000000 --- a/root/etc/s6-overlay/s6-rc.d/svc-plex/type +++ /dev/null @@ -1 +0,0 @@ -longrun \ No newline at end of file diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-chown b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-chown deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-claim b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-claim deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-gid-video b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-gid-video deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-update b/root/etc/s6-overlay/s6-rc.d/user/contents.d/init-plex-update deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-plex b/root/etc/s6-overlay/s6-rc.d/user/contents.d/svc-plex deleted file mode 100644 index e69de29..0000000 diff --git a/root/etc/services.d/plex/run b/root/etc/services.d/plex/run new file mode 100644 index 0000000..9db8cdc --- /dev/null +++ b/root/etc/services.d/plex/run @@ -0,0 +1,8 @@ +#!/usr/bin/with-contenv bash + +echo "Starting Plex Media Server." +export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m) +export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r) +exec \ + s6-setuidgid abc \ + /usr/lib/plexmediaserver/Plex\ Media\ Server