项目作者: stblassitude

项目描述 :
CasperJS ready to run from the command line
高级语言:
项目地址: git://github.com/stblassitude/docker-casperjs.git
创建时间: 2017-11-05T11:18:36Z
项目社区:https://github.com/stblassitude/docker-casperjs

开源协议:MIT License

下载


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:

  1. 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:

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

Building

I’m building this image this way:

  1. docker build -t stblassitude/casperjs .