aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-06-28 01:51:00 +0530
committerBobby <[email protected]>2022-06-28 01:51:00 +0530
commita38e3e96097fe02e5fe802bda3ff3b06f4ac5ead (patch)
tree17cdbc68588a1331a7a036fadb2e991b14dd055a /Dockerfile
parent0116830ed57b837dbc17edf1a7ed3f06ae1ebf16 (diff)
downloadthatcomputerscientist-a38e3e96097fe02e5fe802bda3ff3b06f4ac5ead.tar.xz
thatcomputerscientist-a38e3e96097fe02e5fe802bda3ff3b06f4ac5ead.zip
Change Chromium Build Process
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile17
1 files changed, 14 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 2467eb6b..05b1a8f2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,17 @@
-FROM zenika/alpine-chrome:89-with-node-14
+# FROM zenika/alpine-chrome:89-with-node-14
+FROM node:slim
+
+# We don't need the standalone Chromium
+ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
+
+# Install Google Chrome Stable and fonts
+# Note: this installs the necessary libs to make the browser work with Puppeteer.
+RUN apt-get update && apt-get install curl gnupg -y \
+ && curl --location --silent 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 google-chrome-stable -y --no-install-recommends \
+ && rm -rf /var/lib/apt/lists/*
COPY package*.json ./
@@ -6,7 +19,5 @@ RUN npm install
COPY . .
-ENV PUPPETEER_EXECUTABLE_PATH='/usr/bin/chromium-browser'
-
EXPOSE 8080
CMD [ "node", "server.js" ]