#5505Feature request: Implement environment variable for `--no-sandbox`
Issue Details
Steps to reproduce
- Puppeteer version: all
- Platform / OS version: Docker
- Node.js version: All
What steps will reproduce the problem?
Running puppeteer as a root user errors with the common: Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
. You can get around this by adding a --no-sandbox
to every invocation of puppeteer, but this is not easily feasible or desirable when there are thousands of tests present.
For our specific use case we are utilizing puppeteer to run integration tests, and chowning all files for suitable permissions takes way too long. We are looking at speeding this up by moving to a no-sandbox environment.
One possible solution
Please consider adding support for an environment variable, such as PUPPETEER_DANGEROUS_NO_SANDBOX=true
, whenever this environment variable is set, run all tests as no-sandbox.