
Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.
--remote-debugging-address browser option.PUPPETEER_ARG_.Puppeteer requires link to a container with chromium browser.
So create a file docker-compose.yml with content:
version: '3.4'
services:
puppeteer:
image: minidocks/puppeteer
volumes:
- .:/app
links:
- chromium
environment:
PUPPETEER_EXECUTABLE_PATH: /bin/chromium
PUPPETEER_ARG_REMOTE_DEBUGGING_ADDRESS: chromium
PUPPETEER_ARG_REMOTE_DEBUGGING_PORT: 0
ALIAS_CHROMIUM: ssh chromium chromium
working_dir: /app
chromium:
image: minidocks/chromium
volumes:
- .:/app
cap_add:
- SYS_ADMIN
working_dir: /app
command: sshd
And in the same directory run command:
docker-compose run --rm puppeteer print https://example.com example.pdf
| Tag | Size |
|---|---|
| latest | |
| 1.12 |
Content type
Image
Digest
Size
25.3 MB
Last updated
almost 7 years ago
docker pull minidocks/puppeteer