DEV Community

Discussion on: Generate images from HTML in Node.js

Collapse
 
wlun001 profile image
Wei Lun • Edited

This won't work on Docker, need to install anything other that npm install?

Collapse
 
quedicesebas profile image
Sebastián Rojas Ricaurte

You have to follow this for Docker github.com/puppeteer/puppeteer/blo... (tehere is specifict instructiosn for alpine also) and send this in puppeteerArgs when you call nodeHtmlToImage:

puppeteerArgs: {
headless: true,
args: [
"--no-sandbox",
"--remote-debugging-address=0.0.0.0",
"--remote-debugging-port=9222",
],
}

Collapse
 
quedicesebas profile image
Sebastián Rojas Ricaurte

¿Anyone?