fix: Chromium 添加 --no-sandbox 等 Docker 必要参数
This commit is contained in:
@@ -279,6 +279,12 @@ export class BrowserManager {
|
||||
const browser = await chromium.launch({
|
||||
headless: config.headless,
|
||||
...(config.browserBin ? { executablePath: config.browserBin } : {}),
|
||||
args: [
|
||||
'--no-sandbox', // Required in Docker (no user namespaces)
|
||||
'--disable-setuid-sandbox',
|
||||
'--disable-dev-shm-usage', // Use /tmp instead of /dev/shm
|
||||
'--disable-gpu',
|
||||
],
|
||||
});
|
||||
|
||||
// React to unexpected disconnects (e.g. browser crash, OOM kill).
|
||||
|
||||
Reference in New Issue
Block a user