lelafav502 commited on
Commit
fc3fd5a
Β·
verified Β·
1 Parent(s): 77569f3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -18
Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
- # Use a more recent Node.js image
2
- FROM node:20
3
 
4
- # Install necessary libraries and dependencies for Puppeteer
5
  RUN apt-get update && apt-get install -y \
6
  libgconf-2-4 \
7
  libnss3 \
@@ -20,23 +20,15 @@ RUN apt-get update && apt-get install -y \
20
  libdbus-1-3 \
21
  && rm -rf /var/lib/apt/lists/*
22
 
23
- # Update npm to the latest version
24
- RUN npm install -g npm@latest
 
25
 
26
- # Clean npm cache
27
- RUN npm cache clean --force
28
-
29
- # Install Puppeteer
30
- RUN npm install puppeteer --no-optional
31
-
32
- # Set up your working directory
33
  WORKDIR /app
34
 
35
- # Copy your application files into the Docker image
36
  COPY . /app
37
 
38
- # Install additional dependencies if needed
39
- RUN npm install
40
-
41
- # Set the command to run your application
42
- CMD ["node", "app.js"]
 
1
+ # Use the official Python image as a base
2
+ FROM python:3.11-slim
3
 
4
+ # Install necessary libraries and dependencies for Playwright
5
  RUN apt-get update && apt-get install -y \
6
  libgconf-2-4 \
7
  libnss3 \
 
20
  libdbus-1-3 \
21
  && rm -rf /var/lib/apt/lists/*
22
 
23
+ # Install Playwright and dependencies
24
+ RUN pip install playwright
25
+ RUN playwright install
26
 
27
+ # Set up working directory
 
 
 
 
 
 
28
  WORKDIR /app
29
 
30
+ # Copy application files
31
  COPY . /app
32
 
33
+ # Run the application
34
+ CMD ["python", "app.py"]