Skip to content

Monthly #340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Blog]({{ lsio_shieldsio_static_blog }})]({{ lsio_blog_url }} "{{ lsio_blog_desc }}")
[![Discord]({{ lsio_shieldsio_discord }})]({{ lsio_discord_url }} "{{ lsio_discord_desc }}")
[![Discourse]({{ lsio_shieldsio_discourse_topics }})]({{ lsio_discourse_url }} "{{ lsio_discourse_desc }}")
[![Fleet]({{ lsio_shieldsio_static_fleet }})]({{ lsio_fleet_url }} "{{ lsio_fleet_desc }}")
[![GitHub]({{ lsio_shieldsio_static_github }})]({{ lsio_github_url }} "{{ lsio_github_desc }}")
[![Open Collective]({{ lsio_shieldsio_opencollective_all }})]({{ lsio_opencollective_url }} "{{ lsio_opencollective_desc }}")
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ Find us at:
* [Blog]({{ lsio_blog_url }}) - {{ lsio_blog_desc }}
* [Discord]({{ lsio_discord_url }}) - {{ lsio_discord_desc }}
* [Discourse]({{ lsio_discourse_url }}) - {{ lsio_discourse_desc }}
* [Fleet]({{ lsio_fleet_url }}) - {{ lsio_fleet_desc }}
* [GitHub]({{ lsio_github_url }}) - {{ lsio_github_desc }}
* [Open Collective]({{ lsio_opencollective_url }}) - {{ lsio_opencollective_desc }}
104 changes: 104 additions & 0 deletions ansible/roles/documentation/templates/README_SNIPPETS/SELKIES.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
**Modern GUI desktop apps have issues with the latest Docker and syscall compatibility, you can use Docker with the `--security-opt seccomp=unconfined` setting to allow these syscalls on hosts with older Kernels or libseccomp**

### Security

{{ "Do not put this on the Internet if you do not know what you are doing." | admonition(flavour=markdown, severity="warning") }}

By default this container has no authentication and the optional environment variables `CUSTOM_USER` and `PASSWORD` to enable basic http auth via the embedded NGINX server should only be used to locally secure the container from unwanted access on a local network. If exposing this to the Internet we recommend putting it behind a reverse proxy, such as [SWAG](https://github.com/linuxserver/docker-swag), and ensuring a secure authentication solution is in place. From the web interface a terminal can be launched and it is configured for passwordless sudo, so anyone with access to it can install and run whatever they want along with probing your local network.

### Options in all Selkies based GUI containers

This container is based on [Docker Baseimage Selkies](https://github.com/linuxserver/docker-baseimage-selkies) which means there are additional environment variables and run configurations to enable or disable specific functionality.

#### Optional environment variables

| Variable | Description |
| :----: | --- |
| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default {% if external_http_port is defined %}{{ external_http_port }}{% else %}3000{% endif %}. |
| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default {% if external_https_port is defined %}{{ external_https_port }}{% else %}3001{% endif %}. |
| CUSTOM_USER | HTTP Basic auth username, abc is default. |
| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth |
| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` |
| TITLE | The page title displayed on the web browser, default "Selkies". |
| START_DOCKER | If set to false a container with privilege will not automatically start the DinD Docker setup. |
| DISABLE_IPV6 | If set to true or any value this will disable IPv6 |
| LC_ALL | Set the Language for the container to run as IE `fr_FR.UTF-8` `ar_AE.UTF-8` |
| NO_DECOR | If set the application will run without window borders in openbox for use as a PWA. |
| NO_FULL | Do not automatically fullscreen applications when using openbox. |

#### Optional run configurations

| Variable | Description |
| :----: | --- |
| `--privileged` | Will start a Docker in Docker (DinD) setup inside the container to use docker in an isolated environment. For increased performance mount the Docker directory inside the container to the host IE `-v /home/user/docker-data:/var/lib/docker`. |
| `-v /var/run/docker.sock:/var/run/docker.sock` | Mount in the host level Docker socket to either interact with it via CLI or use Docker enabled applications. |

### Language Support - Internationalization

The environment variable `LC_ALL` can be used to start this container in a different language than English simply pass for example to launch the Desktop session in French `LC_ALL=fr_FR.UTF-8`. Some supported languages:

* `-e LC_ALL=zh_CN.UTF-8` - Chinese
* `-e LC_ALL=ja_JP.UTF-8` - Japanese
* `-e LC_ALL=ko_KR.UTF-8` - Korean
* `-e LC_ALL=ar_AE.UTF-8` - Arabic
* `-e LC_ALL=ru_RU.UTF-8` - Russian
* `-e LC_ALL=es_MX.UTF-8` - Spanish (Latin America)
* `-e LC_ALL=de_DE.UTF-8` - German
* `-e LC_ALL=fr_FR.UTF-8` - French
* `-e LC_ALL=nl_NL.UTF-8` - Netherlands
* `-e LC_ALL=it_IT.UTF-8` - Italian

{% if show_nvidia is defined %}### Nvidia GPU Support

**Nvidia support is not compatible with Alpine based images as Alpine lacks Nvidia drivers**

Nvidia support is available by leveraging Zink for OpenGL support. This can be enabled with the following run flags:

| Variable | Description |
| :----: | --- |
| --gpus all | This can be filtered down but for most setups this will pass the one Nvidia GPU on the system |
| --runtime nvidia | Specify the Nvidia runtime which mounts drivers and tools in from the host |

The compose syntax is slightly different for this as you will need to set nvidia as the default runtime:

```
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
sudo service docker restart
```

And to assign the GPU in compose:

```
services:
{{ project_name }}:
image: lscr.io/{{ lsio_project_name_short }}/{{ project_name }}:{{ release_tag }}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [compute,video,graphics,utility]
```

{% endif %}### Application management

#### PRoot Apps

If you run system native installations of software IE `sudo apt-get install filezilla` and then upgrade or destroy/re-create the container that software will be removed and the container will be at a clean state. For some users that will be acceptable and they can update their system packages as well using system native commands like `apt-get upgrade`. If you want Docker to handle upgrading the container and retain your applications and settings we have created [proot-apps](https://github.com/linuxserver/proot-apps) which allow portable applications to be installed to persistent storage in the user's `$HOME` directory and they will work in a confined Docker environment out of the box. These applications and their settings will persist upgrades of the base container and can be mounted into different flavors ofSelkiess based containers on the fly. This can be achieved from the command line with:

```
proot-apps install filezilla
```

PRoot Apps is included in all Selkies based containers, a list of linuxserver.io supported applications is located [HERE](https://github.com/linuxserver/proot-apps?tab=readme-ov-file#supported-apps).

#### Native Apps

It is possible to install extra packages during container start using [universal-package-install](https://github.com/linuxserver/docker-mods/tree/universal-package-install). It might increase starting time significantly. PRoot is preferred.

```yaml
environment:
- DOCKER_MODS=linuxserver/mods:universal-package-install
- INSTALL_PACKAGES=libfuse2|git|gdb
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ The architectures supported by this image are:
| riscv64 | {{ '✅ | riscv64-\<version tag\>' }} |
{% endif %}
| arm64 | {{ '✅ | arm64v8-\<version tag\>' if 'arm64' in (available_architectures | map(attribute="arch") ) else '❌ |' }} |
| armhf | {{ '✅ | arm32v7-\<version tag\>' if 'armhf' in (available_architectures | map(attribute="arch") ) else '❌ |' }} |
4 changes: 4 additions & 0 deletions ansible/roles/documentation/templates/documentation.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ description: "{{ noter(project_blurb) | trim }}"
{% if kasm_blurb is defined %}
{% include "README_SNIPPETS/KASM.j2" | trim %}

{% endif %}
{% if selkies_blurb is defined %}
{% include "README_SNIPPETS/SELKIES.j2" | trim %}

{% endif %}
{% if readonly_supported is defined and readonly_supported %}
{% include "README_SNIPPETS/READONLY.j2" | trim %}
Expand Down
4 changes: 4 additions & 0 deletions ansible/roles/documentation/templates/readme.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
{% if kasm_blurb is defined %}
{% include "README_SNIPPETS/KASM.j2" | trim %}

{% endif %}
{% if selkies_blurb is defined %}
{% include "README_SNIPPETS/SELKIES.j2" | trim %}

{% endif %}
{% if readonly_supported is defined and readonly_supported %}
{% include "README_SNIPPETS/READONLY.j2" | trim %}
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/github/templates/call_issue_pr_tracker.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request_review:
types: [submitted,edited,dismissed]

permissions:
contents: read

jobs:
manage-project:
permissions:
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/github/templates/call_issues_cron.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
- cron: '{{ 60 | random(seed=('docker-' + project_name + '-minute')) }} {{ 24 | random(seed=('docker-' + project_name + '-hour')) }} * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
stale:
permissions:
Expand Down
15 changes: 9 additions & 6 deletions ansible/roles/github/templates/external_trigger.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name: External Trigger Main
on:
workflow_dispatch:

permissions:
contents: read

jobs:
external-trigger-{{ ls_branch|regex_replace('[^a-zA-Z0-9-]','-') }}:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -107,8 +110,8 @@ jobs:
"username": "Github Actions"}' ${{ '{{' }} secrets.DISCORD_WEBHOOK {{ '}}' }}
exit 1
fi
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
image="{{ better_vars.LS_USER }}/{{ project_name }}"
tag="{{ release_tag }}"
Expand Down Expand Up @@ -164,8 +167,8 @@ jobs:
exit 1
fi
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
exit 0
{% if external_type == "alpine_repo" and better_vars.MULTIARCH == 'true' %}
elif [[ $(curl -sL "{{ better_vars.DIST_REPO }}aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"{{ better_vars.DIST_REPO_PACKAGES }}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]{% if build_armhf %} || [[ $(curl -sL "{{ better_vars.DIST_REPO }}armv7/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"{{ better_vars.DIST_REPO_PACKAGES }}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]{% endif %}; then
Expand Down Expand Up @@ -197,7 +200,7 @@ jobs:
"username": "Github Actions"}' ${{ '{{' }} secrets.DISCORD_WEBHOOK {{ '}}' }}
else
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
if [[ "${artifacts_found}" == "true" ]]; then
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
fi
Expand All @@ -217,7 +220,7 @@ jobs:
--data-urlencode "description=GHA external trigger https://github.com/${{ '{{' }} github.repository {{ '}}' }}/actions/runs/${{ '{{' }} github.run_id {{ '}}' }}" \
--data-urlencode "Submit=Submit"
echo "**** Notifying Discord ****"
TRIGGER_REASON="A version change was detected for {{ project_name }} tag {{ release_tag }}. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
TRIGGER_REASON="A version change was detected for {{ project_name }} tag {{ release_tag }}. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
"username": "Github Actions"}' ${{ '{{' }} secrets.DISCORD_WEBHOOK {{ '}}' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '{{ 60 | random(seed=(project_name + '-external-minute')) }} * * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
external-trigger-scheduler:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/github/templates/greetings.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Greetings

on: [pull_request_target, issues]

permissions:
contents: read

jobs:
greeting:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: '{{ 60 | random(seed=(project_name + '-minute')) }} {{ 24 | random(seed=(project_name + '-hour')) }} * * {{ 7 | random(seed=(project_name + '-day')) }}'
workflow_dispatch:

permissions:
contents: read

jobs:
package-trigger-scheduler:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions ansible/vars/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ lsio_discord_url: "https://linuxserver.io/discord"
lsio_discourse_url: "https://discourse.{{ lsio_short_url }}"
lsio_docker_hub_url: "https://hub.docker.com/r/{{ lsio_project_name_short }}"
lsio_docs_url: "https://docs.{{ lsio_short_url }}"
lsio_fleet_url: "https://fleet.{{ lsio_short_url }}"
lsio_github_url: "https://github.com/{{ lsio_project_name_short }}"
lsio_gitlab_url: "https://gitlab.com/{{ lsio_project_name }}"
lsio_mods_url: "https://mods.{{ lsio_short_url }}/?mod={{ project_name }}"
Expand All @@ -38,7 +37,6 @@ arch_armhf: "armhf"
lsio_blog_desc: "all the things you can do with our containers including How-To guides, opinions and much more!"
lsio_discord_desc: "realtime support / chat with the community and the team."
lsio_discourse_desc: "post on our community forum."
lsio_fleet_desc: "an online web interface which displays all of our maintained images."
lsio_github_desc: "view the source for all of our repositories."
lsio_mods_desc: "view available mods for this container."
lsio_universal_mods_desc: "view available universal mods."
Expand Down Expand Up @@ -72,7 +70,6 @@ lsio_shieldsio_jenkins_build: "https://img.shields.io/jenkins/build?{{ lsio_badg
lsio_shieldsio_microbadger_layers: "https://img.shields.io/microbadger/layers/{{ lsio_project_name_short }}/{{ project_name }}.svg?{{ lsio_badge_url_parameters }}"
lsio_shieldsio_opencollective_all: "https://img.shields.io/opencollective/all/{{ lsio_project_name_short }}.svg?{{ lsio_badge_url_parameters }}&label=Supporters&logo=open%20collective"
lsio_shieldsio_static_blog: "https://img.shields.io/static/v1.svg?{{ lsio_badge_url_parameters }}&label={{ lsio_project_name }}&message=Blog"
lsio_shieldsio_static_fleet: "https://img.shields.io/static/v1.svg?{{ lsio_badge_url_parameters }}&label={{ lsio_project_name }}&message=Fleet"
lsio_shieldsio_static_github_package: "https://img.shields.io/static/v1.svg?{{ lsio_badge_url_parameters }}&label={{ lsio_project_name }}&message=GitHub%20Package&logo=github"
lsio_shieldsio_static_github: "https://img.shields.io/static/v1.svg?{{ lsio_badge_url_parameters }}&label={{ lsio_project_name }}&message=GitHub&logo=github"
lsio_shieldsio_static_gitlab_registry: "https://img.shields.io/static/v1.svg?{{ lsio_badge_url_parameters }}&label={{ lsio_project_name }}&message=GitLab%20Registry&logo=gitlab"
Expand Down