Skip to content

Commit

Permalink
install chrome in dockerfile, skip download on npm i
Browse files Browse the repository at this point in the history
  • Loading branch information
m90 committed Jun 21, 2019
1 parent 6f20ff7 commit cb9e8a7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{*.js,*.yml,*.md,Gopkg.toml,package.json,*.html}]
[{*.js,*.yml,*.md,Gopkg.toml,package.json,*.html,Dockerfile.*}]
indent_style = space
indent_size = 2
12 changes: 12 additions & 0 deletions Dockerfile.node
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ RUN apt-get update
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
# lsof is needed to exit the test server post npm t
RUN apt-get install -y lsof

# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)
# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer
# installs, work.
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
2 changes: 1 addition & 1 deletion auditorium/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "budo index.js --live --pushstate",
"test": "npm run server & (VAULT_HOST=http://localhost:9876 npm run mochify; status=$?; kill $(lsof -t -i:9876); exit $status)",
"mochify": "mochify --allow-chrome-as-root {,**}/*.test.js",
"mochify": "mochify --chrome $(which google-chrome) --allow-chrome-as-root {,**}/*.test.js",
"server": "http-server __fixtures__ -p 9876 -s",
"pretest": "dependency-check package.json",
"posttest": "standard",
Expand Down
2 changes: 1 addition & 1 deletion script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "budo index.js --live",
"test": "npm run server & (npm run mochify; status=$?; kill $(lsof -t -i:9876); exit $status)",
"mochify": "mochify --allow-chrome-as-root {,**}/*.test.js",
"mochify": "mochify --chrome $(which google-chrome) --allow-chrome-as-root {,**}/*.test.js",
"server": "http-server __fixtures__ -p 9876 -s",
"pretest": "dependency-check package.json",
"posttest": "standard",
Expand Down
2 changes: 1 addition & 1 deletion vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "budo index.js --live",
"pretest": "dependency-check package.json",
"test": "mochify --allow-chrome-as-root ./**/*.test.js",
"test": "mochify --chrome $(which google-chrome) --allow-chrome-as-root ./**/*.test.js",
"posttest": "standard",
"fix": "standard --fix",
"build": "npm run build:bundle && npm run build:inline",
Expand Down

0 comments on commit cb9e8a7

Please sign in to comment.