stblassitude / docker-casperjs

CasperJS ready to run from the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stblassitude/casperjs

License: MIT

This Docker image contains CasperJS, a web testing tool, ready to run from the command line.

It lives on GitHub at github.com/stblassitude/docker-casperjs, and on Docker Hub at hub.docker.com/r/stblassitude/casperjs/.

Tags

  • :1.0.0 (also :latest) contains PhantomJS 2.1.1 and CasperJS 1.1.4

Using this image

The entrypoint for this image is /usr/bin/casper, so you can invoke Casper scripts like so:

docker run --rm -it -v $PWD:/app stblassitude/casperjs hello.js

This will run hello.js from the current directory with Casper, and display output in the terminal.

The volume /app should be bind mounted to your current working directory, or whereever you keep your Casper scripts.

Running PhantomJS

This image also contains PhantomJS. You can invoke PhantomJS directly by overriding the entrypoint, like so:

docker run --rm -it -v $PWD:/app --entrypoint=/usr/bin/phantomjs stblassitude/casperjs --help

Building

I'm building this image this way:

docker build -t stblassitude/casperjs .

About

CasperJS ready to run from the command line

License:MIT License