Skip to content

Commit f160c46

Browse files
authored
Merge pull request #305 from linuxserver/nonroot-readme
2 parents e259200 + be3834d commit f160c46

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

roles/generate-jenkins/templates/DOCUMENTATION.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ title: {{ project_name }}
4040
{% if readonly_supported is defined and readonly_supported %}
4141
{% include "README_SNIPPETS/READONLY.j2" | trim %}
4242

43+
{% endif %}
44+
{% if nonroot_supported is defined and nonroot_supported %}
45+
{% include "README_SNIPPETS/NONROOT.j2" | trim %}
46+
4347
{% endif %}
4448
{% if ["CI_SSL='true'", "CI_SSL= 'true'" ,"CI_SSL = 'true'"]|select("in", repo_vars) %}
4549
{% include "README_SNIPPETS/STRICT_PROXY.j2" | trim %}

roles/generate-jenkins/templates/README.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
{% if readonly_supported is defined and readonly_supported %}
4040
{% include "README_SNIPPETS/READONLY.j2" | trim %}
4141

42+
{% endif %}
43+
{% if nonroot_supported is defined and nonroot_supported %}
44+
{% include "README_SNIPPETS/NONROOT.j2" | trim %}
45+
4246
{% endif %}
4347
{% if ["CI_SSL='true'", "CI_SSL= 'true'" ,"CI_SSL = 'true'"]|select("in", repo_vars) %}
4448
{% include "README_SNIPPETS/STRICT_PROXY.j2" | trim %}
@@ -146,6 +150,9 @@ Containers are configured using parameters passed at runtime (such as those abov
146150
{% if readonly_supported is defined and readonly_supported %}
147151
| `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). |
148152
{% endif %}
153+
{% if nonroot_supported is defined and nonroot_supported %}
154+
| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). |
155+
{% endif %}
149156
{% if cap_add_param or opt_cap_add_param or (custom_params is defined and 'sysctl' in (custom_params | map(attribute="name")) ) %}
150157

151158
### Portainer notice
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Non-Root Operation
2+
3+
This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/).
4+
{% if nonroot_message is defined %}
5+
6+
### Caveats
7+
8+
{{ nonroot_message | trim }}
9+
{% endif %}

0 commit comments

Comments
 (0)