Merge pull request #2 from linuxserver/launch-options-wrapper
restructure the wrapper to be simplified and pass CLI args when launched
This commit is contained in:
0
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file → Normal file
0
.github/workflows/call_issue_pr_tracker.yml
vendored
Executable file → Normal file
0
.github/workflows/call_issues_cron.yml
vendored
Executable file → Normal file
0
.github/workflows/call_issues_cron.yml
vendored
Executable file → Normal file
@@ -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
|
||||
#!/bin/bash
|
||||
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