Skip to content

Commit c7e5934

Browse files
committed
chore: allow disable setuid and disable gpu by default and allow other chromium args
1 parent 01e7621 commit c7e5934

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/render.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ const renderPdf = async ({ mainMdFilename, pathToStatic, pathToPublic, docsifyRe
1212
const browser = await puppeteer.launch({
1313
headless: !SHOW_BROWSER,
1414
devtools: SHOW_BROWSER,
15-
args: ['--disable-dev-shm-usage'], // Needed for Docker
15+
args: [
16+
'--disable-dev-shm-usage',
17+
'--disable-setuid-sandbox',
18+
'--disable-gpu',
19+
process.env.NO_SANDBOX ? '--no-sandbox' : '',
20+
...(process.env.CHROMIUM_ARGS || '').split(' ').filter(Boolean)
21+
].filter(Boolean),
1622
defaultViewport: { width: 1200, height: 1000 }
1723
})
1824

0 commit comments

Comments
 (0)