From b15fd14b0727b21e1d360fd720bf09bafe7a89fe Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Tue, 7 Aug 2018 12:55:51 -0700 Subject: [PATCH] revert puppeteer downgrade and install deps instead - Closes #451 --- Dockerfile | 17 ++++++++++++----- package.json | 2 +- server.js | 3 +-- yarn.lock | 14 +++++++++----- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae21a8f..a5d9aac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,21 @@ FROM node:9-alpine # Source https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md -# Installs latest Chromium (68) package. +# Installs latest Chromium package. ENV CHROME_BIN=/usr/bin/chromium-browser RUN apk update && apk upgrade && \ - echo @v3.8 http://nl.alpinelinux.org/alpine/v3.8/community >> /etc/apk/repositories && \ - echo @v3.8 http://nl.alpinelinux.org/alpine/v3.8/main >> /etc/apk/repositories && \ + echo http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \ + echo http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \ apk add --no-cache \ - chromium@v3.8 \ - nss@v3.8 + zlib-dev \ + xvfb \ + xorg-server \ + dbus \ + ttf-freefont \ + chromium \ + nss \ + ca-certificates \ + dumb-init WORKDIR /app diff --git a/package.json b/package.json index 1fcdfa0..0a01623 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "ms": "^2.0.0", "next": "^6.0.3", "now-logs": "^0.0.7", - "puppeteer": "0.13.x", + "puppeteer": "1.4.0", "react": "16.3.*", "react-click-outside": "^3.0.0", "react-codemirror2": "^5.0.0", diff --git a/server.js b/server.js index ebb9d58..809e932 100644 --- a/server.js +++ b/server.js @@ -29,8 +29,7 @@ const puppeteerParams = dev ? {} : { executablePath: '/usr/bin/chromium-browser', - // TODO args: ['--no-sandbox', '--disable-setuid-sandbox'] - args: ['--no-sandbox', '--headless', '--disable-gpu'] + args: ['--no-sandbox', '--disable-setuid-sandbox'] } app diff --git a/yarn.lock b/yarn.lock index 36cdb22..720333f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4514,6 +4514,10 @@ mime@^1.3.4: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" +mime@^2.0.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" @@ -5679,14 +5683,14 @@ punycode@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" -puppeteer@0.13.x: - version "0.13.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-0.13.0.tgz#2e6956205f2c640964c2107f620ae1eef8bde8fd" +puppeteer@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.4.0.tgz#437f0f3450d76e437185c0bf06f446e80f184692" dependencies: - debug "^2.6.8" + debug "^3.1.0" extract-zip "^1.6.5" https-proxy-agent "^2.1.0" - mime "^1.3.4" + mime "^2.0.3" progress "^2.0.0" proxy-from-env "^1.0.0" rimraf "^2.6.1"