From 8e96931d2645ee9094f432ad063db7d4d4550e3f Mon Sep 17 00:00:00 2001 From: Emilien <4016501+unixfox@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:32:29 +0100 Subject: [PATCH] add message about chromium sandboxing --- Dockerfile | 2 +- README.md | 4 ++++ docker/scripts/startup.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 13a5f6d..a5864d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN apk add --no-cache \ chromium \ chromium-chromedriver -WORKDIR /usr/app/src +WORKDIR /app COPY index.py requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt diff --git a/README.md b/README.md index 0f60ac0..986df16 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,7 @@ These identity tokens (po_token and visitor_data) generated using this tool will visitor_data: XXX ``` 3. Restart Invidious. + +## Why running as root for Docker? + +In "headless: false", Chromium does not support sanboxing when it is not ran by root user. \ No newline at end of file diff --git a/docker/scripts/startup.sh b/docker/scripts/startup.sh index 79508f6..9ba57f1 100755 --- a/docker/scripts/startup.sh +++ b/docker/scripts/startup.sh @@ -10,5 +10,5 @@ sleep 2 echo "[INFO] launching chromium instance" -# Run python script on display 0 +# Run python script on display 99 DISPLAY=:99 python index.py