From 094d2071e2c9af11847c1ebaabe0d80b10901e34 Mon Sep 17 00:00:00 2001 From: Evan Champion <110177090+evan314159@users.noreply.github.com> Date: Sun, 15 Mar 2026 12:45:15 +0800 Subject: [PATCH 1/2] init-plex-chown/run: use TMPDIR instead of hardcoded /run/plex-temp Changes init-plex-chown/run to use TMPDIR instead of hardcoded /run/plex-temp Plex uses TMPDIR to store transcodes of music to WAV format for music analysis (and maybe other things). LS.io container sets TMPDIR=/run/plex-temp. With read-only root this means the /run tmpfs needs to have enough memory to store music analysis transcodes. LS.io container hardcoded /run/plex-temp in init so TMPDIR could not be flexibly changed -- changed to use TMPDIR and clean on restart in case of unclean shutdown. Plex container is marked as supporting read-only root. --- README.md | 2 ++ root/etc/s6-overlay/s6-rc.d/init-plex-chown/run | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 94c14297..e0be438f 100644 --- a/README.md +++ b/README.md @@ -371,6 +371,8 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **15.03.26:** - Allow TMPDIR to be changed to better support read-only containers +* **15.03.26:** - Fix initial claim setup on non-root containers * **04.11.24:** - Add Nvidia capability needed for h265 * **18.07.24:** - Rebase to Ubuntu Noble. * **12.02.24:** - Use universal hardware acceleration blurb diff --git a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/run b/root/etc/s6-overlay/s6-rc.d/init-plex-chown/run index f98e6699..47b1c1e4 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-plex-chown/run +++ b/root/etc/s6-overlay/s6-rc.d/init-plex-chown/run @@ -1,7 +1,11 @@ #!/usr/bin/with-contenv bash # shellcheck shell=bash -mkdir -p /run/plex-temp +# remove plex temporary directory after unclean stop +if [[ -d "${TMPDIR}" ]]; then + rm -rf "${TMPDIR}" +fi +mkdir -p ${TMPDIR} # create folders if [[ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]]; then @@ -40,7 +44,7 @@ if [[ -z ${LSIO_NON_ROOT_USER} ]]; then # permissions (non-recursive) on config root and folders lsiown abc:abc \ - /run/plex-temp \ + "${TMPDIR}" \ /config \ /config/* fi From a56f4d3e85b425f79aaa4a9260c63d8b29d94de4 Mon Sep 17 00:00:00 2001 From: Evan Champion <110177090+evan314159@users.noreply.github.com> Date: Tue, 17 Mar 2026 06:34:26 +0800 Subject: [PATCH 2/2] Update readme-vars.yml --- readme-vars.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme-vars.yml b/readme-vars.yml index 2ad47e0d..9f7a516b 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -125,6 +125,8 @@ init_diagram: | "plex:latest" <- Base Images # changelog changelogs: + - {date: "15.03.26:", desc: "Allow TMPDIR to be changed to better support read-only containers"} + - {date: "15.03.26:", desc: "Fix initial claim setup on non-root containers"} - {date: "04.11.24:", desc: "Add Nvidia capability needed for h265"} - {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."} - {date: "12.02.24:", desc: "Use universal hardware acceleration blurb"}