fix(docker): run in docker, and build scripts for docker (#1291)

Updates unnecessary need to grant special privileges when running in Docker.
This commit is contained in:
Egidijus Ligeika
2020-12-11 17:13:11 +00:00
committed by GitHub
parent 67b19a7a8b
commit c74ea28014
5 changed files with 63 additions and 1 deletions
+6 -1
View File
@@ -26,8 +26,13 @@ async function main() {
}
// https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#tips
// https://stackoverflow.com/questions/48230901/docker-alpine-with-node-js-and-chromium-headless-puppeter-failed-to-launch-c
if (config.docker) {
args.push('--disable-dev-shm-usage');
args.push('--no-sandbox');
args.push('--disable-setuid-sandbox');
args.push('--headless');
args.push('--disable-gpu');
}
// Add the address of the proxy server if defined
@@ -38,7 +43,7 @@ async function main() {
}
await stop();
logger.warn(' printing puppeteer configs::', args);
browser = await puppeteer.launch({
args,
defaultViewport: {