Skip to content

litmusautomation/nodejs-chrome-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nodejs-Chrome

This image is intended for anyone who wants to be able to run tests of their Node.js application using an actual instance of Chrome. It's based of the Node.js Carbon (8.x LTS) release and only additionally installs the bare minimum necessities to run Chrome using its --headless flag. It makes no assumption of what testing framework you want to use (Karma, Selenium-Webdriver, Protractor, etc.) and therefore does not come with any of these installed. This image is intended to be a small as possible while still supporting the official releases of Node.js and Chrome.

How to use it

Install all Node.js modules in the container environment:

docker run -v /path/to/node/app:/wd -w /wd thompsnm/nodejs-chrome npm install

Then execute your tests inside the container:

docker run -v /path/to/node/app:/wd -w /wd thompsnm/nodejs-chrome npm test

Version Details

Docker Hub is configured to tag builds of the master branch as latest, so the Dockerfile on master should always pull from node:latest to keep the two images in sync.

Docker Hub is configured to tag builds of branches with the individual branch names. Therefore to create a tag in Docker hub that references a particular Node.js version, create a branch, update the Dockerfile to pull from the specific Node.js official Docker image tag, and ensure the name of the branch matches the tag in the Node.js image. For instance, a branch named carbon exists with a Dockerfile that pulls from the Node.js carbon Docker image.

Docker Hub is configured to rebuild this image on every build of the Node.js official image, thereby ensuring the Node.js version is always up to date. Furthermore, the Dockerfile is configured to always pull the latest Chrome version, ensuring it is always up to date as well. There is currently no way to lock down Chrome to a particular version.

About

A bare bones Docker image that has Node.js and Chrome installed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%