Reaperxxxx commited on
Commit
93bd0d8
·
verified ·
1 Parent(s): 2e05851

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -6
Dockerfile CHANGED
@@ -1,19 +1,44 @@
1
- # Use Playwright's official image with browsers pre-installed
2
- FROM mcr.microsoft.com/playwright:v1.42.0-jammy
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
11
  RUN npm install
12
 
 
13
  COPY . .
14
 
15
- # Expose the API o
16
  EXPOSE 7860
17
 
18
- # Start the Express server
19
- CMD ["npm", "start"]
 
1
+ # Use an official Node.js runtime as a base image
2
+ FROM node:18-bullseye
3
 
4
+ # Set working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Install system dependencies for Playwright & Chromium
8
+ RUN apt-get update && apt-get install -y \
9
+ wget \
10
+ curl \
11
+ unzip \
12
+ fonts-liberation \
13
+ libasound2 \
14
+ libatk-bridge2.0-0 \
15
+ libatk1.0-0 \
16
+ libcups2 \
17
+ libdbus-1-3 \
18
+ libgbm-dev \
19
+ libnspr4 \
20
+ libnss3 \
21
+ libxcomposite1 \
22
+ libxdamage1 \
23
+ libxfixes3 \
24
+ libxrandr2 \
25
+ xdg-utils \
26
+ libu2f-udev \
27
+ libvulkan1 \
28
+ --no-install-recommends && \
29
+ rm -rf /var/lib/apt/lists/*
30
+
31
  # Copy package.json and package-lock.json
32
  COPY package.json ./
33
 
34
  # Install dependencies
35
  RUN npm install
36
 
37
+ # Copy the application source code
38
  COPY . .
39
 
40
+ # Expose the port the app runs on
41
  EXPOSE 7860
42
 
43
+ # Start the application
44
+ CMD ["node", "index.js"]