Public | Automated Build

Last pushed: a year ago
Short Description
# Deprecated: use https://hub.docker.com/r/weboaks/node-karma-protractor-chrome/
Full Description

Deprecated: use https://hub.docker.com/r/weboaks/node-karma-protractor-chrome/

Karma and Protractor 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 chrome.

Unfortunately, chrome doesn't support container (https://github.com/travis-ci/travis-ci/issues/938), you need to start chrome with --no-sandbox argument to avoid this.

To configure karma and protractor, use this snippets:

karma:

browsers: ['Chrome_no_sandbox'],
customLaunchers: {
  Chrome_no_sandbox: {
    base: 'Chrome',
    flags: ['--no-sandbox']
  }
},

protractor:

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

Gitlab CI

To run karma and protractor on gitlab ci, just use this image, and configure karma and protractor as above.
http://doc.gitlab.com/ce/ci/yaml/README.html#image-and-services

On Docker Hub

https://hub.docker.com/r/weboaks/node5-karma-protractor-chrome/

docker pull weboaks/node5-karma-protractor-chrome
Docker Pull Command
Owner
weboaks

Comments (4)
weboaks
a year ago

@hoto I've built a new image with node v6 on https://hub.docker.com/r/weboaks/node-karma-protractor-chrome/
@milosh012 I've rebuilt the image, the chromium version is now 53.
I use this image to build and test all my mean projects, with a runner config like this :
[[runners]]
name = "docker-mean"
url = "https://gitlab.weboaks.com/ci"
token = ""
tls-skip-verify = true
executor = "docker"
[runners.docker]
image = "weboaks/node-karma-protractor-chrome"
privileged = false
services = ["mongo:latest"]
disable_cache = false
wait_for_services_timeout = 60
volumes = ["/cache", "/var/run/docker.sock:/var/run/docker.sock", "/usr/bin/docker:/bin/docker","/usr/local/bin/docker-compose:/bin/docker-compose", "/usr/lib/x86_64-linux-gnu/libapparmor.so.1:/lib/x86_64-linux-gnu/libapparmor.so.1"]

milosh012
a year ago

Hi,

Im trying to use your image for gitlab-ci, but Im constantly getting this error when try to run selenium:

E/launcher - unknown error: Chrome version must be >= 49.0.2623.0
  (Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.7.0-coreos x86_64) (WARNING: The server did not provide any stacktrace information)

do you have any example project of using this image for gitlab-ci?

hoto
a year ago

Could you crete a new image with node v6?

hoto
a year ago

We are using it with Gitlab runners, Angular2, Webpack, Karma stack and this works like a charm. Thanks.