Skip to content

Commit 3b7c8dd

Browse files
authored
Merge pull request #410 from linuxserver/ro-update
2 parents 4d1b0e1 + 9e313af commit 3b7c8dd

File tree

6 files changed

+28
-2
lines changed

6 files changed

+28
-2
lines changed

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ ENV DEBIAN_FRONTEND="noninteractive" \
2323
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
2424
PLEX_MEDIA_SERVER_USER="abc" \
2525
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
26-
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
26+
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" \
27+
TMPDIR=/run/plex-temp
2728

2829
RUN \
2930
echo "**** install runtime packages ****" && \

Dockerfile.aarch64

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ ENV DEBIAN_FRONTEND="noninteractive" \
2020
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
2121
PLEX_MEDIA_SERVER_USER="abc" \
2222
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
23-
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
23+
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" \
24+
TMPDIR=/run/plex-temp
2425

2526
RUN \
2627
echo "**** install runtime packages ****" && \

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ Valid settings for VERSION are:-
7777
+ **`public`**: will update plexpass users to the latest public version, useful for plexpass users that don't want to be on the bleeding edge but still want the latest public updates.
7878
+ **`<specific-version>`**: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass.
7979

80+
## Read-Only Operation
81+
82+
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
83+
84+
### Caveats
85+
86+
* Runtime update of Plex (and thus Plexpass builds) is not supported.
87+
* Transcode directory must be mounted to a host path or tmpfs.
88+
8089
### Hardware Acceleration
8190

8291
Many desktop applications need access to a GPU to function properly and even some Desktop Environments have compositor effects that will not function without a GPU. However this is not a hard requirement and all base images will function without a video device mounted into the container.
@@ -161,6 +170,7 @@ Containers are configured using parameters passed at runtime (such as those abov
161170
| `-v /config` | Plex library location. *This can grow very large, 50gb+ is likely for a large collection.* |
162171
| `-v /tv` | Media goes here. Add as many as needed e.g. `/movies`, `/tv`, etc. |
163172
| `-v /movies` | Media goes here. Add as many as needed e.g. `/movies`, `/tv`, etc. |
173+
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
164174

165175
## Environment variables from files (Docker secrets)
166176

readme-vars.yml

+6
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ app_setup_block: |
7272
+ **`<specific-version>`**: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass.
7373
7474
readme_hwaccel: true
75+
76+
readonly_supported: true
77+
readonly_message: |
78+
* Runtime update of Plex (and thus Plexpass builds) is not supported.
79+
* Transcode directory must be mounted to a host path or tmpfs.
80+
7581
# changelog
7682
changelogs:
7783
- {date: "18.07.24:", desc: "Rebase to Ubuntu Noble."}

root/etc/s6-overlay/s6-rc.d/init-plex-chown/run

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4+
mkdir -p /run/plex-temp
5+
46
# create folders
57
if [[ ! -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" ]]; then
68
mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"
@@ -35,5 +37,6 @@ fi
3537

3638
# permissions (non-recursive) on config root and folders
3739
lsiown abc:abc \
40+
/run/plex-temp \
3841
/config \
3942
/config/*

root/etc/s6-overlay/s6-rc.d/init-plex-update/run

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/usr/bin/with-contenv bash
22
# shellcheck shell=bash
33

4+
if [[ -z ${LSIO_READ_ONLY_FS} ]] || [[ -z ${LSIO_NON_ROOT_USER} ]]; then
5+
echo "Runtime update not supported with read-only or non-root operation, skipping."
6+
exit 0
7+
fi
8+
49
# If docker manages versioning exit
510
if [[ -n "${VERSION}" ]] && [[ "${VERSION}" == "docker" ]]; then
611
echo "Docker is used for versioning skip update check"

0 commit comments

Comments
 (0)