Javascript testing (i.e. Karma) inside a Docker image with headless Google Chrome!
100K+
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 Karma or Python Selenium tests against Chrome using Docker, this is the project you've been looking for! Use cases include:
npm install and npm testpip install -r requirements.txtpip3 install -r requirements.txtThe 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 a number of things:
/images - Contains the sources for all of the chromium-xvfb-* images/samples - This image contains an example of running tests for JS / Karma
and Selenium with Python 2 and 3.cd into any of the projects in /samplesdocker build -t sample .docker run sampleThe sample application will run the example test and output its results to the console as well as a xunit-format XML file in the test-results/ directory inside of the container.
Content type
Image
Digest
sha256:5e99e4982…
Size
360.7 MB
Last updated
about 7 years ago
docker pull markadams/chromium-xvfb-js