Sign inSign up

ekostadinov/nodejs-xvfb-browser

By ekostadinov

Updated about 10 years ago

Javascript testing (i.e. Mocha) inside a Docker image with headless Google Chrome!

Image
0

214

ekostadinov/nodejs-xvfb-browser repository overview

Chromium in Docker via Xvfb

This Docker image provides a way to run a real Chromium / Chrome browser headless inside of a Docker container. If you're looking for a way to run your Mocha or Jasmine Selenium tests against Chrome using Docker, this is the project you've been looking for!

Use cases include:

Run Javascript tests with ChimpJS inside of Docker during local development or GitLab CI builds Run Selenium-powered browser automation tests using NodeJS inside of Docker during your CI builds and pretty much anything else where you'd want to use a real Chrome browser within a Docker container

Images

  • markadams/chromium-xvfb Base Docker image (Installs Debian, Chromium, Xvfb).
  • markadams/chromium-xvfb-js Designed for running headless JS tests in Chromium (includes iojs (node) and npm). This image automatically runs npm install and npm test.

Methodology

The key to this project and to getting Chromium / Google Chrome to work inside of a container is the wrapper script, xvfb-chromium.

The wrapper script does the following things:

Adds JRE and Git, so you can spin GitLab-CI Runners.

Tag summary

Content type

Image

Digest

Size

348.1 MB

Last updated

about 10 years ago

docker pull ekostadinov/nodejs-xvfb-browser:0.1