Code Monkey home page Code Monkey logo

docker-node-karma-protractor-chrome's Introduction

docker stars docker pulls docker build automated build travis  build

alpine headless:
debian headless:
xvfb:

Karma and Protractor with Chromium in a docker container

This image allows to run javascript tests in a headless machine like a CI server.

This image support karma and protractor test under chromium.

Unfortunately, chromium doesn't support container (travis-ci/travis-ci#938), you need to start chromium with --no-sandbox argument to avoid this.

usage

in a shell

docker run --rm -v $(pwd):/app -w /app -it weboaks/node-karma-protractor-chrome:alpine sh

in gitlab ci

job name:
  image: weboaks/node-karma-protractor-chrome:alpine

configuration

To configure karma and protractor, use this snippets:

karma

browsers: ['Chromium_no_sandbox'],
customLaunchers: {
  Chromium_no_sandbox: {
    base: 'ChromiumHeadless',
    flags: ['--no-sandbox']
  }
},

ChromiumHeadless is available since [email protected], on previous versions use:

base: 'Chromium',
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--remote-debugging-port=9222']

protractor

capabilities: {
  'browserName': 'chrome',
  'chromeOptions': {
    'args': ['no-sandbox', 'headless', 'disable-gpu']
  }
},

tags

headless mode

Chromium recently added headless support. If you want to use headless mode use the version and follow instructions in this readme.

If you don't want to use the headless mode, use or and follow instructions in that readme

alpine headless

To use alpine instead of debian, follow headless instructions and add this to protractor config :

chromeDriver: '/usr/bin/chromedriver',

node versions

and use the latest LTS node.

Others debian headless node versions are avalaible via the debian-node6 debian-node8 debian-node9 tags.

Others alpine headless node versions are avalaible via the alpine-node6 alpine-node8 alpine-node9 tags.

root versions

debian* and alpine* have no root access, if you need root access use debian-root, alpine-root, or xvfb

pinned tags

headless, alpine, debian-node* and alpine-node* are automated build, rebuild each time a commit is pushed to this repo and each time an image is pushed to official node image. These tags are always up to date, but can break builds with a new node version or a new chromium versions.

debian-<commit-hash> and alpine-<commit-hash> tags are available to target a specific commit, they are never rebuilt and will have the same node and chromium version forever.

docker-node-karma-protractor-chrome's People

Contributors

hugoj-goncalves avatar sylvaindumont avatar wykks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.