diff --git a/Dockerfile b/Dockerfile index eb54548..dc85129 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,10 @@ ADD . /app RUN npm run bundle -FROM ghcr.io/puppeteer/puppeteer:16.1.0 AS dist +FROM ghcr.io/puppeteer/puppeteer:22.10.0 AS dist + +RUN apt-get install -y libgbm-dev xvfb COPY --from=builder /app/dist /dist -ENTRYPOINT ["node", "/dist/index.js"] +ENTRYPOINT [ "xvfb-run", "--server-args='-screen 0 1200x800x24'", "node", "/dist/index.js"] diff --git a/src/run.ts b/src/run.ts index f58740e..a1a86dc 100644 --- a/src/run.ts +++ b/src/run.ts @@ -22,8 +22,9 @@ export async function run( headless: false, executablePath: chrome_path, args: [ - // `--no-sandbox`, - // `--headless`, + `--no-sandbox`, + // `--headless` + `--disable-setuid-sandbox`, `--disable-gpu`, `--disable-dev-shm-usage`, ],