File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Use the official Node.js 20 Alpine image as a base
2- FROM node:20-alpine
2+ FROM node:18.20.3
33
4+ # Install necessary dependencies for Puppeteer and Chromium
5+ RUN apt-get update && apt-get install -y --no-install-recommends \
6+ fonts-liberation \
7+ libasound2 \
8+ libatk-bridge2.0-0 \
9+ libatk1.0-0 \
10+ libcups2 \
11+ libdrm2 \
12+ libgbm1 \
13+ libgtk-3-0 \
14+ libnspr4 \
15+ libnss3 \
16+ libx11-xcb1 \
17+ libxcomposite1 \
18+ libxdamage1 \
19+ libxrandr2 \
20+ xdg-utils \
21+ libu2f-udev \
22+ libxshmfence1 \
23+ libglu1-mesa \
24+ chromium \
25+ && apt-get clean \
26+ && rm -rf /var/lib/apt/lists/*
27+
428# Set the working directory in the container
529WORKDIR /usr/src/app
630
@@ -16,5 +40,9 @@ COPY . .
1640# Expose the port the app runs on
1741EXPOSE 3000
1842
43+ # Puppeteer setup: Skip Chromium download and use the installed Chromium
44+ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
45+ ENV PUPPETEER_EXECUTABLE_PATH="/usr/bin/chromium"
46+
1947# Command to run the application
20- CMD [ "npm" , "start" ]
48+ CMD [ "npm" , "start" ]
You can’t perform that action at this time.
0 commit comments