Sign inSign up

simbo/node-chrome

By simbo

•Updated about 9 years ago

Docker image with node and headless chrome (i.e. for testing with karma or protractor).

Image
0

10K+

simbo/node-chrome repository overview

⁠docker-node-chrome

Docker image with node and headless chrome (i.e. for testing with karma or protractor).

docker:simbo/node-chrome

Derivate of simbo/node⁠.

docker pull simbo/node-chrome:latest

⁠Version tags

  • latest / 8-59 / 8.1.4-59.0.3071.115
    Node 8.1.4
    Google Chrome 59.0.3071.115

⁠Usage

⁠Docker

Use these flags with docker run or add them to your service in docker-compose.yml:

  • --add-cap=SYS_ADMIN
    This fixes a user namespace issue with OSX.
    An alternative mitigation would be to a special seccomp profile⁠.

  • --shm-size=1024M
    Chrome needs some more shared memory than docker’s default of 64 MB.
    Alternatively you can mount /dev/shm from your host machine.

⁠Karma

karma.conf.js with karma-chrome-launcher⁠ installed:

module.exports = (config) => {
  config.set({
    mime: {
      'text/x-typescript': ['ts','tsx']
    },
    browsers: [
      'Chrome_launcher'
    ],
    customLaunchers: {
      Chrome_launcher: {
        base: 'ChromeHeadless',
        flags: [
          '--window-size=1280x1024'
        ],
      }
    }
  });
};
⁠Protractor

Run webdriver-manager update to install chromedriver.

protractor.conf.js:

module.exports.config = {
  directConnect: true,
  capabilities: {
    browserName: 'chrome',
    chromeOptions: {
      args: [
        '--headless',
        '--disable-gpu',
        '--window-size=1280x1024'
      ]
    }
  }
};

Tag summary

Content type

Image

Digest

Size

228.3 MB

Last updated

about 9 years ago

docker pull simbo/node-chrome