File tree 2 files changed +5
-9
lines changed
2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,8 @@ WORKDIR /app
8
8
# We don't need the standalone Chromium
9
9
ENV PUPPETEER_SKIP_DOWNLOAD true
10
10
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
19
13
20
14
# Install dependencies
21
15
COPY package.json package-lock.json ./
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ const puppeteer = require("puppeteer");
8
8
*/
9
9
async function extractRating ( url ) {
10
10
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" ,
12
14
} ) ;
13
15
14
16
const page = await browser . newPage ( ) ;
You can’t perform that action at this time.
0 commit comments