Docker image with node and headless chrome (i.e. for testing with karma or protractor).
10K+
Docker image with node and headless chrome (i.e. for testing with karma or protractor).
Derivate of simbo/node.
docker pull simbo/node-chrome:latest
latest / 8-59 / 8.1.4-59.0.3071.115Use 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.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'
],
}
}
});
};
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'
]
}
}
};
Content type
Image
Digest
Size
228.3 MB
Last updated
about 9 years ago
docker pull simbo/node-chrome