Sign inSign up

cfbarbero/ngcli

By cfbarbero

•Updated over 8 years ago

Image for using NG CLI with ability to run e2e tests (using xvfb)

Image
0

1.7K

cfbarbero/ngcli repository overview

⁠ngcli-docker

docker container with ng cli and the ability to run e2e tests

General Docker image for executing ng-cli⁠ tasks including full support for running tests (ng test or ng e2e) using headless Google Chrome⁠.

⁠Usage

⁠Karma

To use this with Karma update your karma.conf.js file as below. Ensure you use the --no-sandbox flag for chrome as it's required when running in a docker container. Make sure you are using karma-chrome-launcher > 2.1.0

karma.conf.js

module.exports = function(config) {
  ...
  config.set({
    plugins: [
        require('karma-chrome-launcher'),
    ],
    browsers: ['MyHeadlessChrome'],
    customLaunchers: {
        MyHeadlessChrome: {
            base: 'ChromeHeadless',
            flags: ['--no-sandbox']
        }
    },
  }
};

Reference:

⁠Protractor

To use this with protractor update your protractor.conf.js as below.

exports.config = {
    ...
    capabilities: {
        'browserName': 'chrome',
        chromeOptions: {
            args: ["--headless", "--disable-gpu", "--window-size=1920,1080", "--no-sandbox"]
        }
    },
    ...


⁠Note:

This image doesn't contain any project code, but is instead a tooling image to support any ng based project.

⁠Versions:
  • Chrome:
  • ng-cli: 1.7.4
  • node: 10
⁠References

Tag summary

Content type

Image

Digest

Size

436.4 MB

Last updated

over 8 years ago

docker pull cfbarbero/ngcli