Reaperxxxx commited on
Commit
8b8d09a
·
verified ·
1 Parent(s): c8faff3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -7
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # Use a Node.js base image
2
- FROM node:18
3
 
4
  # Set working directory
5
  WORKDIR /app
@@ -7,20 +7,41 @@ WORKDIR /app
7
  # Copy package.json and package-lock.json
8
  COPY package*.json ./
9
 
10
- # Install dependencies (including reikeranidl and other required packages)
11
  RUN npm install
12
 
13
- # Install Chromium
14
- RUN npm install chromium
15
-
16
- # Log the path of the installed Chromium
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  RUN echo "Chromium path: $(npm explore chromium -- npm bin)"
18
 
19
  # Copy the rest of the application
20
  COPY . .
21
 
22
  # Expose the port
23
- EXPOSE 7860
24
 
25
  # Command to run the app
26
  CMD ["node", "server.js"]
 
1
  # Use a Node.js base image
2
+ FROM node:16
3
 
4
  # Set working directory
5
  WORKDIR /app
 
7
  # Copy package.json and package-lock.json
8
  COPY package*.json ./
9
 
10
+ # Install dependencies
11
  RUN npm install
12
 
13
+ # Install Puppeteer and Chromium as dependencies
14
+ RUN npm install puppeteer chromium
15
+
16
+ # Install required dependencies (like libx11) for Puppeteer to run headless Chromium
17
+ RUN apt-get update && apt-get install -y \
18
+ wget \
19
+ ca-certificates \
20
+ fonts-liberation \
21
+ libappindicator3-1 \
22
+ libasound2 \
23
+ libatk-bridge2.0-0 \
24
+ libatk1.0-0 \
25
+ libcups2 \
26
+ libdbus-1-3 \
27
+ libgdk-pixbuf2.0-0 \
28
+ libnspr4 \
29
+ libnss3 \
30
+ libx11-xcb1 \
31
+ libxcomposite1 \
32
+ libxdamage1 \
33
+ libxrandr2 \
34
+ xdg-utils \
35
+ && rm -rf /var/lib/apt/lists/*
36
+
37
+ # Log Chromium installation path
38
  RUN echo "Chromium path: $(npm explore chromium -- npm bin)"
39
 
40
  # Copy the rest of the application
41
  COPY . .
42
 
43
  # Expose the port
44
+ EXPOSE 3000
45
 
46
  # Command to run the app
47
  CMD ["node", "server.js"]