diff --git a/roles/generate-jenkins/templates/DOCUMENTATION.j2 b/roles/generate-jenkins/templates/DOCUMENTATION.j2 index 8c7c9250..1ae1f7e3 100644 --- a/roles/generate-jenkins/templates/DOCUMENTATION.j2 +++ b/roles/generate-jenkins/templates/DOCUMENTATION.j2 @@ -40,6 +40,10 @@ title: {{ project_name }} {% if readonly_supported is defined and readonly_supported %} {% include "README_SNIPPETS/READONLY.j2" | trim %} +{% endif %} +{% if nonroot_supported is defined and nonroot_supported %} +{% include "README_SNIPPETS/NONROOT.j2" | trim %} + {% endif %} {% if ["CI_SSL='true'", "CI_SSL= 'true'" ,"CI_SSL = 'true'"]|select("in", repo_vars) %} {% include "README_SNIPPETS/STRICT_PROXY.j2" | trim %} diff --git a/roles/generate-jenkins/templates/README.j2 b/roles/generate-jenkins/templates/README.j2 index 0a32cb2c..663138e0 100644 --- a/roles/generate-jenkins/templates/README.j2 +++ b/roles/generate-jenkins/templates/README.j2 @@ -39,6 +39,10 @@ {% if readonly_supported is defined and readonly_supported %} {% include "README_SNIPPETS/READONLY.j2" | trim %} +{% endif %} +{% if nonroot_supported is defined and nonroot_supported %} +{% include "README_SNIPPETS/NONROOT.j2" | trim %} + {% endif %} {% if ["CI_SSL='true'", "CI_SSL= 'true'" ,"CI_SSL = 'true'"]|select("in", repo_vars) %} {% include "README_SNIPPETS/STRICT_PROXY.j2" | trim %} @@ -146,6 +150,9 @@ Containers are configured using parameters passed at runtime (such as those abov {% if readonly_supported is defined and readonly_supported %} | `--read-only=true` | Run container with a read-only filesystem. Please [read the docs](https://docs.linuxserver.io/misc/read-only/). | {% endif %} +{% if nonroot_supported is defined and nonroot_supported %} +| `--user=1000:1000` | Run container with a non-root user. Please [read the docs](https://docs.linuxserver.io/misc/non-root/). | +{% endif %} {% if cap_add_param or opt_cap_add_param or (custom_params is defined and 'sysctl' in (custom_params | map(attribute="name")) ) %} ### Portainer notice diff --git a/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 b/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 new file mode 100644 index 00000000..7ecda520 --- /dev/null +++ b/roles/generate-jenkins/templates/README_SNIPPETS/NONROOT.j2 @@ -0,0 +1,9 @@ +## Non-Root Operation + +This image can be run with a non-root user. For details please [read the docs](https://docs.linuxserver.io/misc/non-root/). +{% if nonroot_message is defined %} + +### Caveats + +{{ nonroot_message | trim }} +{% endif %}