Skip to content

Commit 75e7f60

Browse files
authored
Merge pull request #19 from linuxserver/non-root
add support for read-only and non-root
2 parents f5c7cba + 1944c4e commit 75e7f60

3 files changed

Lines changed: 23 additions & 8 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ The web app and the server are both accessible at `http://SERVERIP:8088`.
6363

6464
Note: It is recommended to use `http` as the external proto with a reverse proxy due to `https` not working with external plex clients.
6565

66+
## Read-Only Operation
67+
68+
This image can be run with a read-only container filesystem. For details please [read the docs](https://docs.linuxserver.io/misc/read-only/).
69+
70+
## Non-Root Operation
71+
72+
This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).
73+
6674
## Usage
6775

6876
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
@@ -104,6 +112,8 @@ Containers are configured using parameters passed at runtime (such as those abov
104112
| :----: | --- |
105113
| `-p 8088:8088` | Web app and server port |
106114
| `-e AUTH_LIST=plexuser1,plexuser2,email1,machineid1` | If set, only the users defined here and the users of the plex servers defined here will be able to access the server. Use e-mails, plex usernames and/or plex server machine ids, comma separated, no spaces. |
115+
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
116+
| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). |
107117

108118
## Environment variables from files (Docker secrets)
109119

@@ -249,6 +259,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
249259

250260
## Versions
251261

262+
* **19.12.24:** - Add support for read-only and non-root operation.
252263
* **05.12.24:** - Rebase to Alpine 3.21.
253264
* **04.06.24:** - Rebase to Alpine 3.20.
254265
* **26.08.23:** - Rebase to Alpine 3.19. Remove deprecated `AUTOJOIN_ENABLED` & `AUTOJOIN_ROOM` options.

readme-vars.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@ available_architectures:
1313
# container parameters
1414
common_param_env_vars_enabled: false
1515
param_container_name: "{{ project_name }}"
16-
param_usage_include_vols: false
17-
param_volumes:
1816
param_usage_include_ports: true
1917
param_ports:
2018
- {external_port: "8088", internal_port: "8088", port_desc: "Web app and server port"}
2119
# optional container parameters
2220
opt_param_usage_include_env: true
2321
opt_param_env_vars:
2422
- {env_var: "AUTH_LIST", env_value: "plexuser1,plexuser2,email1,machineid1", desc: "If set, only the users defined here and the users of the plex servers defined here will be able to access the server. Use e-mails, plex usernames and/or plex server machine ids, comma separated, no spaces."}
25-
# optional parameters
26-
optional_block_1: false
27-
optional_block_1_items: ""
23+
readonly_supported: true
24+
nonroot_supported: true
2825
# application setup block
2926
app_setup_block_enabled: true
3027
app_setup_block: |
@@ -70,6 +67,7 @@ init_diagram: |
7067
"synclounge:latest" <- Base Images
7168
# changelog
7269
changelogs:
70+
- {date: "19.12.24:", desc: "Add support for read-only and non-root operation."}
7371
- {date: "05.12.24:", desc: "Rebase to Alpine 3.21."}
7472
- {date: "04.06.24:", desc: "Rebase to Alpine 3.20."}
7573
- {date: "26.08.23:", desc: "Rebase to Alpine 3.19. Remove deprecated `AUTOJOIN_ENABLED` & `AUTOJOIN_ROOM` options."}

root/etc/s6-overlay/s6-rc.d/svc-synclounge/run

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ if [ -n "${AUTH_LIST}" ]; then
66
export authentication__authorized="[\"$(echo ${AUTH_LIST} | sed 's|,|", "|g')\"]"
77
fi
88

9-
exec \
10-
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8088" \
11-
s6-setuidgid abc synclounge
9+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
10+
exec \
11+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8088" \
12+
s6-setuidgid abc synclounge
13+
else
14+
exec \
15+
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8088" \
16+
synclounge
17+
fi

0 commit comments

Comments
 (0)