How to use a backstopjs Docker image?

I’m trying to automate visual regression testing using backstopjs. I already have a CircleCI workflow set up, and I’m trying to add backstopjs to this flow.

There is an official backstopjs image that the documentation says can be used “like a binary”:

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

However, in my config.yml, when I add these lines,

    - image:
    # for screenshots
    - image: selenium/standalone-chrome:3
    # visual regression testing
    - image: backstopjs/backstopjs

- run:
  command: docker run --rm -v $(pwd):/src backstopjs/backstopjs --version

I get a “docker command not found” error:

/bin/bash: docker: command not found
Exited with code 127

I checked the CircleCI documentation about using multiple containers (, and it says that everything happens in the first container, but that it’s still possible to call services in other containers.

So my question is, how do I call the backstopjs docker image to run backstopjs from within the original working container?

My solution to this was ultimately to take the Dockerfile for backstopjs and the Dockerfile for pantheon-public/build-tools-ci and combine them into a new image on dockerhub.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.