Sign inSign up

blueimp/mocha-chrome

By blueimp

•Updated about 5 years ago

mocha-chrome Dockerfile

Image
0

2.4K

blueimp/mocha-chrome repository overview

⁠mocha-chrome Dockerfile

This is a Dockerfile⁠ to create a mocha-chrome⁠ Docker image based on blueimp/chromedriver⁠.

⁠Usage

The blueimp/mocha-chrome image runs Mocha⁠ tests using headless Google Chrome.

Sample docker-compose⁠ configuration using NGINX⁠ as HTTP server providing a test directory containing the Mocha tests:

version: "3.7"
services:
  nginx:
    image: nginx:alpine
    volumes:
      - ./test:/usr/share/nginx/html:ro
  mocha:
    image: blueimp/mocha-chrome
    command: http://nginx/
    environment:
      - WAIT_FOR_HOSTS=nginx:80
    depends_on:
      - nginx

Please have a look at the blueimp/JavaScript-Load-Image⁠ project for a complete test configuration example.

⁠Tags

For any critical infrastructure (e.g. your company's Continuous Integration tests) it is strongly recommended to use your own tagged Docker images instead of blueimp/mocha-chrome directly, as changes in the included Software might break your tests inadvertently. For example:

version: "3.7"
services:
  chromedriver:
    image: YOUR_ORG/mocha-chrome:2021-09-27
    # ...

For full control, you should also set up a build for your own version of blueimp/chromedriver⁠ and edit the parent image reference at the start of the Dockerfile in this repository accordingly, e.g.:

FROM YOUR_ORG/chromedriver:2021-09-27

⁠License

Released under the MIT license⁠.

⁠Author

Sebastian Tschan⁠

Tag summary

Content type

Image

Digest

Size

310.2 MB

Last updated

about 5 years ago

docker pull blueimp/mocha-chrome