Public Repository

Last pushed: 3 months ago
Short Description
A self-contained Docker image to run BackstopJS with no external dependencies.
Full Description

BackstopJS Docker Image

A self-contained Docker image to run BackstopJS with no external dependencies.

Features:

Usage

Use this image as if you were using a binary.
Working directory is expected to be mounted at /src in the container.

$ docker run --rm -v $(pwd):/src uglow/backstopjs --version
BackstopJS 2.0.2

You can also add a shell alias (in .bashrc, .zshrc, etc.) for convenience.

alias backstop='docker run --rm -v $(pwd):/src uglow/backstopjs "$@"'

Restart your shell or open a new one, then

$ backstopjs --version
BackstopJS 2.0.2

Sample test

docker run --rm -v $(pwd):/src uglow/backstopjs genConfig
docker run --rm -v $(pwd):/src uglow/backstopjs reference
docker run --rm -v $(pwd):/src uglow/backstopjs test

PhantomJS/SlimerJS

By default BackstopJS is using PhantomJS to take screenshots.
You can also use SlimerJS/Firefox by setting "engine": "slimerjs"
in the configuration file.

Both SlimerJS and Firefox ESR (extended support release) are installed in the container.

Limitations

backstop openReport is not (yet) supported.
You will need a running webserver to view HTML reports generated by BackstopJS.

Debugging

The following command will start a bash session in the container.

docker run --rm -v $(pwd):/src -it --entrypoint=bash uglow/backstopjs
Docker Pull Command
Owner
uglow

Comments (0)