Last active
April 6, 2017 02:56
-
-
Save leaysgur/97e3aeb36795bfc0125fc1fa9d6ff90e to your computer and use it in GitHub Desktop.
Docker image for node 6.x latest and yarn and karma w/ headless chrome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yarn included | |
| FROM node:6 | |
| # for installing chrome | |
| RUN apt-get update -qqy \ | |
| && apt-get -qqy install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| ttf-wqy-zenhei \ | |
| ttf-unfonts-core \ | |
| wget | |
| # install chrome | |
| RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
| && echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ | |
| && apt-get update -qqy \ | |
| && apt-get -qqy install google-chrome-stable \ | |
| && rm /etc/apt/sources.list.d/google-chrome.list \ | |
| && rm -rf /var/lib/apt/lists/* /var/cache/apt/* | |
| WORKDIR /workspace |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // from https://github.com/karma-runner/karma/issues/2603 | |
| { | |
| // ... | |
| browsers: ['ChromeNoSandboxHeadless'], | |
| customLaunchers: { | |
| ChromeNoSandboxHeadless: { | |
| base: 'Chrome', | |
| flags: [ | |
| '--no-sandbox', | |
| // See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
| '--headless', | |
| '--disable-gpu', | |
| // Without a remote debugging port, Google Chrome exits immediately. | |
| ' --remote-debugging-port=9222', | |
| ], | |
| }, | |
| }, | |
| // ... | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
もはやこんだけで
chrome入る疑惑