docker image with Google Puppeteer and all the Noto fonts installed
1.1K
docker image with Google Puppeteer installed
and noto fonts, noto CJK fonts, and noto emoji
Forked from alekzonder/docker-puppeteer.
latestdocker pull starlocke/puppeteer-full-noto:latest
--no-sandbox, --disable-setuid-sandbox args when launch browserconst puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--disable-setuid-sandbox'
]
});
const page = await browser.newPage();
await page.goto('https://www.google.com/', {waitUntil: 'networkidle2'});
browser.close();
})();
BUS_ADRERR (chromium issue), increase shm-size on docker run with --shm-size argumentdocker run --shm-size 1G --rm -v <path_to_script>:/app/index.js starlocke/puppeteer-full-noto:latest
--sysctl net.ipv6.conf.all.disable_ipv6=1 to fix:docker run --shm-size 1G --sysctl net.ipv6.conf.all.disable_ipv6=1 --rm -v <path_to_script>:/app/index.js starlocke/puppeteer-full-noto:latest
--enable-logging for chrome debug logging http://www.chromium.org/for-testers/enable-loggingconst puppeteer = require('puppeteer');
(async() => {
const browser = await puppeteer.launch({args: [
'--no-sandbox',
'--disable-setuid-sandbox',
// debug logging
'--enable-logging', '--v=1'
]});
docker run --shm-size 1G --rm -v <path_to_script>:/app/index.js starlocke/puppeteer-full-noto:latest
docker run --shm-size 1G --rm \
-v <path_to_dir>:/app \
starlocke/puppeteer-full-noto:latest \
node my_script.js
simple screenshot tools in image
docker run --shm-size 1G --rm -v /tmp/screenshots:/screenshots \
starlocke/puppeteer-full-noto:latest \
<screenshot,full_screenshot,screenshot_series,full_screenshot_series> 'https://www.google.com' 1366x768
<tool> <url> <width>x<height> [<delay_in_ms>]
delay_in_ms: is optional (defaults to 0)
delay_in_ms milliseconds before taking the screenshotscreenshotdocker run --shm-size 1G --rm -v /tmp/screenshots:/screenshots \
starlocke/puppeteer-full-noto:latest \
screenshot 'https://www.google.com' 1366x768
output: one line json
{
"date":"2017-09-01T05:03:27.464Z",
"timestamp":1504242207,
"filename":"screenshot_1366_768.png",
"width":1366,
"height":768
}
got screenshot in /tmp/screenshots/screenshot_1366_768.png
full_screenshotsave full screenshot of page
docker run --shm-size 1G --rm -v /tmp/screenshots:/screenshots \
starlocke/puppeteer-full-noto:latest \
full_screenshot 'https://www.google.com' 1366x768
screenshot_series, full_screenshot_seriesadds datetime in ISO format into filename
useful for cron screenshots
docker run --shm-size 1G --rm -v /tmp/screenshots:/screenshots \
starlocke/puppeteer-full-noto:latest \
screenshot_series 'https://www.google.com' 1366x768
docker run --shm-size 1G --rm -v /tmp/screenshots:/screenshots \
starlocke/puppeteer-full-noto:latest \
full_screenshot_series 'https://www.google.com' 1366x768
2017-09-01T05:08:55.027Z_screenshot_1366_768.png
# OR
2017-09-01T05:08:55.027Z_full_screenshot_1366_768.png
Content type
Image
Digest
Size
801.8 MB
Last updated
over 8 years ago
docker pull starlocke/puppeteer-full-noto