Skip to content

A container to run puppeteer with jest-puppeteer support on github-actions

Notifications You must be signed in to change notification settings

liron-navon/docker-puppeteer-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Base environment image for Puppeteer (Headless Chrome Node API) with support for jest-puppeteer runner, if you have any issues please report it here or check Puppeteer’s troubleshooting doc

docker hub: https://hub.docker.com/repository/docker/lironavon/docker-puppeteer-container

For versions check docker hub, or look at the git tags - each tag is a version of node.js, so for example the v16.10.0 tag uses a base of node:16.10.0-slim

Getting started

Use with github actions

name: Tests
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-20.04
    container: lironavon/docker-puppeteer-container:16.10.0
    steps:
     # installl dependencies and run tests
      - name: install dependencies
        run: yarn install

      - name: test packages
        run: yarn test

Start node application

docker run -i --rm --cap-add=SYS_ADMIN \
    --name puppeteer-chrome zenato/puppeteer \
    node -e "`cat yourscript.js`"

Start with your docker application

Write your Dockerfile and run:

FROM lironavon/docker-puppeteer-container:16.1.0

USER root

# do whatever need to be done
...

CMD node your-application

inspired by: https://github.com/zenato/docker-puppeteer

About

A container to run puppeteer with jest-puppeteer support on github-actions

Resources

Stars

Watchers

Forks

Packages

No packages published