restructure the wrapper to be simplified and pass CLI args when launched
This commit is contained in:
14
.github/workflows/call_issue_pr_tracker.yml
vendored
Normal file
14
.github/workflows/call_issue_pr_tracker.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: Issue & PR Tracker
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened,reopened,labeled,unlabeled]
|
||||
pull_request_target:
|
||||
types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled]
|
||||
|
||||
jobs:
|
||||
manage-project:
|
||||
permissions:
|
||||
issues: write
|
||||
uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1
|
||||
secrets: inherit
|
||||
13
.github/workflows/call_issues_cron.yml
vendored
Normal file
13
.github/workflows/call_issues_cron.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Mark stale issues and pull requests
|
||||
on:
|
||||
schedule:
|
||||
- cron: '58 21 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1
|
||||
secrets: inherit
|
||||
@@ -2,7 +2,7 @@ name: Package Trigger Scheduler
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '03 7 * * 2'
|
||||
- cron: '9 9 * * 3'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
3
.github/workflows/permissions.yml
vendored
3
.github/workflows/permissions.yml
vendored
@@ -1,9 +1,10 @@
|
||||
name: Permission check
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- '**/run'
|
||||
- '**/finish'
|
||||
- '**/check'
|
||||
jobs:
|
||||
permission_check:
|
||||
uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1
|
||||
|
||||
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@@ -56,7 +56,7 @@ pipeline {
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
|
||||
env.PULL_REQUEST = env.CHANGE_ID
|
||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/call_invalid_helper.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
|
||||
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml'
|
||||
}
|
||||
script{
|
||||
env.LS_RELEASE_NUMBER = sh(
|
||||
@@ -228,17 +228,14 @@ pipeline {
|
||||
}
|
||||
sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash'''
|
||||
sh '''#! /bin/bash
|
||||
set -e
|
||||
docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest
|
||||
docker run --rm \
|
||||
-e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \
|
||||
-e FILE_NAME="shellcheck-result.xml" \
|
||||
-e MIMETYPE="text/xml" \
|
||||
-v ${WORKSPACE}:/mnt \
|
||||
-e SECRET_KEY=\"${S3_SECRET}\" \
|
||||
-e ACCESS_KEY=\"${S3_KEY}\" \
|
||||
-t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \
|
||||
python /upload.py'''
|
||||
-v ${WORKSPACE}:/mnt \
|
||||
-e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \
|
||||
-e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \
|
||||
ghcr.io/linuxserver/baseimage-alpine:3.17 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\
|
||||
apk add --no-cache py3-pip && \
|
||||
pip install s3cmd && \
|
||||
s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :'''
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -275,7 +272,7 @@ pipeline {
|
||||
echo "Jenkinsfile is up to date."
|
||||
fi
|
||||
# Stage 2 - Delete old templates
|
||||
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md\n.github/ISSUE_TEMPLATE/issue.bug.md\n.github/ISSUE_TEMPLATE/issue.feature.md"
|
||||
OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml"
|
||||
for i in ${OLD_TEMPLATES}; do
|
||||
if [[ -f "${i}" ]]; then
|
||||
TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}"
|
||||
@@ -292,7 +289,7 @@ pipeline {
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
|
||||
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
|
||||
echo "Deleting old templates"
|
||||
echo "Deleting old and deprecated templates"
|
||||
rm -Rf ${TEMPDIR}
|
||||
exit 0
|
||||
else
|
||||
|
||||
@@ -110,6 +110,7 @@ services:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Etc/UTC
|
||||
- CHROME_CLI="https://www.linuxserver.io/" #optional
|
||||
volumes:
|
||||
- /path/to/config:/config
|
||||
ports:
|
||||
@@ -128,6 +129,7 @@ docker run -d \
|
||||
-e PUID=1000 \
|
||||
-e PGID=1000 \
|
||||
-e TZ=Etc/UTC \
|
||||
-e CHROME_CLI="https://www.linuxserver.io/" `#optional` \
|
||||
-p 3000:3000 \
|
||||
-p 3001:3001 \
|
||||
-v /path/to/config:/config \
|
||||
@@ -148,6 +150,7 @@ Container images are configured using parameters passed at runtime (such as thos
|
||||
| `-e PUID=1000` | for UserID - see below for explanation |
|
||||
| `-e PGID=1000` | for GroupID - see below for explanation |
|
||||
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |
|
||||
| `-e CHROME_CLI="https://www.linuxserver.io/"` | Specify one or multiple Chromium CLI flags, this string will be passed to the application in full. |
|
||||
| `-v /config` | Users home directory in the container, stores local files and settings |
|
||||
| `--shm-size=` | This is needed for any modern website to function like youtube. |
|
||||
| `--security-opt seccomp=unconfined` | For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker. Chromium runs in no-sandbox test mode without it. |
|
||||
@@ -261,4 +264,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **01.04.23:** - Preserve arguments passed to Chromium and restructure to use wrapper.
|
||||
* **18.03.23:** - Initial release.
|
||||
|
||||
@@ -31,6 +31,10 @@ param_ports:
|
||||
- { external_port: "3001", internal_port: "3001", port_desc: "HTTPS Chromium desktop gui." }
|
||||
custom_params:
|
||||
- { name: "shm-size", name_compose: "shm_size", value: "1gb",desc: "This is needed for any modern website to function like youtube." }
|
||||
# optional variables
|
||||
opt_param_usage_include_env: true
|
||||
opt_param_env_vars:
|
||||
- { env_var: "CHROME_CLI", env_value: "\"https://www.linuxserver.io/\"", desc: "Specify one or multiple Chromium CLI flags, this string will be passed to the application in full."}
|
||||
opt_security_opt_param: true
|
||||
opt_security_opt_param_vars:
|
||||
- { run_var: "seccomp=unconfined", compose_var: "seccomp:unconfined", desc: "For Docker Engine only, many modern gui apps need this to function on older hosts as syscalls are unknown to Docker. Chromium runs in no-sandbox test mode without it." }
|
||||
@@ -71,4 +75,5 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "01.04.23:", desc: "Preserve arguments passed to Chromium and restructure to use wrapper." }
|
||||
- { date: "18.03.23:", desc: "Initial release." }
|
||||
|
||||
@@ -1,22 +1,2 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Only start in no-sandbox mode on unpriv systems
|
||||
if grep -q 'Seccomp: 0' /proc/1/status; then
|
||||
chromium-browser \
|
||||
--ignore-gpu-blocklist \
|
||||
--no-first-run \
|
||||
--password-store=basic \
|
||||
--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
|
||||
--start-maximized \
|
||||
--user-data-dir > /dev/null 2>&1
|
||||
else
|
||||
chromium-browser \
|
||||
--ignore-gpu-blocklist \
|
||||
--no-first-run \
|
||||
--no-sandbox \
|
||||
--password-store=basic \
|
||||
--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
|
||||
--start-maximized \
|
||||
--test-type \
|
||||
--user-data-dir > /dev/null 2>&1
|
||||
fi
|
||||
chromium-browser ${CHROME_CLI}
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
<openbox_menu xmlns="http://openbox.org/3.4/menu">
|
||||
<menu id="root-menu" label="MENU">
|
||||
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
|
||||
<item label="Chromium" icon="/usr/share/icons/hicolor/48x48/apps/chromium.png"><action name="Execute"><command>/usr/bin/chromium-browser --password-store=basic --no-sandbox --ignore-gpu-blocklist --user-data-dir --no-first-run --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' --start-maximized --test-type</command></action></item>
|
||||
<item label="Chromium" icon="/usr/share/icons/hicolor/48x48/apps/chromium.png"><action name="Execute"><command>/usr/bin/chromium-browser</command></action></item>
|
||||
</menu>
|
||||
</openbox_menu>
|
||||
|
||||
26
root/usr/bin/chromium-browser
Executable file
26
root/usr/bin/chromium-browser
Executable file
@@ -0,0 +1,26 @@
|
||||
#! /bin/bash
|
||||
|
||||
BIN=/usr/lib/chromium/chromium-launcher.sh
|
||||
|
||||
# Run normally on privved containers or modified un non priv
|
||||
if grep -q 'Seccomp: 0' /proc/1/status; then
|
||||
${BIN} \
|
||||
--ignore-gpu-blocklist \
|
||||
--no-first-run \
|
||||
--password-store=basic \
|
||||
--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
|
||||
--start-maximized \
|
||||
--user-data-dir \
|
||||
"$@" > /dev/null 2>&1
|
||||
else
|
||||
${BIN} \
|
||||
--ignore-gpu-blocklist \
|
||||
--no-first-run \
|
||||
--no-sandbox \
|
||||
--password-store=basic \
|
||||
--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' \
|
||||
--start-maximized \
|
||||
--test-type \
|
||||
--user-data-dir \
|
||||
"$@" > /dev/null 2>&1
|
||||
fi
|
||||
Reference in New Issue
Block a user