File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,8 @@ WORKDIR /app
88# We don't need the standalone Chromium
99ENV PUPPETEER_SKIP_DOWNLOAD true
1010
11- # Install Google Chrome Stable and fonts
12- # Note: this installs the necessary libs to make the browser work with Puppeteer.
13- RUN apt-get update && apt-get install gnupg wget -y && \
14- wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
15- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
16- apt-get update && \
17- apt-get install google-chrome-stable -y --no-install-recommends && \
18- rm -rf /var/lib/apt/lists/*
11+ # Install Chromium manually
12+ RUN apk add --no-cache \ chromium
1913
2014# Install dependencies
2115COPY package.json package-lock.json ./
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ const puppeteer = require("puppeteer");
88 */
99async function extractRating ( url ) {
1010 const browser = await puppeteer . launch ( {
11- executablePath : "/usr/bin/google-chrome" ,
11+ headless : true ,
12+ args : [ "--no-sandbox" , "--disable-setuid-sandbox" ] ,
13+ executablePath : "/usr/bin/chromium" ,
1214 } ) ;
1315
1416 const page = await browser . newPage ( ) ;
You can’t perform that action at this time.
0 commit comments