Reaperxxxx commited on
Commit
59033e3
·
verified ·
1 Parent(s): 81b8292

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -11
Dockerfile CHANGED
@@ -1,24 +1,26 @@
1
- # Use official Node.js image as the base image
2
  FROM node:16
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # Install Chromium
8
- RUN apt-get update && apt-get install -y wget curl gnupg ca-certificates
9
- RUN curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o google-chrome.deb
10
- RUN dpkg -i google-chrome.deb || apt-get install -f -y
11
- RUN rm google-chrome.deb
12
 
13
- # Install dependencies
14
- COPY package.json ./
15
  RUN npm install
16
 
17
- # Copy the server.js to the working directory
 
 
 
 
 
 
18
  COPY . .
19
 
20
  # Expose the port
21
  EXPOSE 7860
22
 
23
- # Run the server.js
24
  CMD ["node", "server.js"]
 
1
+ # Use a Node.js base image
2
  FROM node:16
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
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 npx 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"]