Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function start() {
port = await getRandomPort();
ensureDependencyAvailable('docker');
const args = runArgs
.concat([
'--shm-size=1g',
'-p',
`${port}:${port}`,
chromeDockerImage,
'--disable-datasaver-prompt',
'--no-first-run',
'--disable-extensions',
'--remote-debugging-address=0.0.0.0',
`--remote-debugging-port=${port}`,
])
.concat(chromeFlags);
debug(
`Launching chrome in docker with command "${dockerPath} ${args.join(
async function ensureImageDownloaded() {
ensureDependencyAvailable('docker');
const isImageDownloaded = await getIsImageDownloaded(chromeDockerImage);
if (!isImageDownloaded) {
await execute(dockerPath, ['pull', chromeDockerImage]);
}
}