Reaperxxxx commited on
Commit
309ce1d
·
verified ·
1 Parent(s): 767d291

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -2
Dockerfile CHANGED
@@ -4,12 +4,36 @@ FROM node:18
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Install dependencies directly inside the container
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  RUN npm install express axios cheerio puppeteer cors
9
 
10
- # Copy the rest of the application
 
 
 
11
  COPY . .
12
 
 
13
  EXPOSE 7860
14
 
 
15
  CMD ["node", "server.js"]
 
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Install required dependencies (including Chromium)
8
+ RUN apt-get update && apt-get install -y \
9
+ libnss3 \
10
+ libatk1.0-0 \
11
+ libpangocairo-1.0-0 \
12
+ libx11-xcb1 \
13
+ libxcomposite1 \
14
+ libxcursor1 \
15
+ libxdamage1 \
16
+ libxfixes3 \
17
+ libxi6 \
18
+ libxrandr2 \
19
+ libgbm1 \
20
+ libasound2 \
21
+ libpango-1.0-0 \
22
+ libatk-bridge2.0-0 \
23
+ libgtk-3-0 \
24
+ chromium
25
+
26
+ # Install dependencies directly
27
  RUN npm install express axios cheerio puppeteer cors
28
 
29
+ # Set Puppeteer to use system-installed Chromium
30
+ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
31
+
32
+ # Copy the application code
33
  COPY . .
34
 
35
+ # Expose the API port
36
  EXPOSE 7860
37
 
38
+ # Run the application
39
  CMD ["node", "server.js"]