Mythus commited on
Commit
2e4cf6c
·
verified ·
1 Parent(s): f62cea0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -10
Dockerfile CHANGED
@@ -1,20 +1,17 @@
1
- # Use the official Python image from the Docker Hub
2
- FROM python:3.8
3
 
4
- # Make a directory for our application
5
  WORKDIR /app
6
 
7
- # Copy script.py (or whatever your filename is) from local machine to the docker image
8
  COPY script.py .
9
 
10
- # Install Playwright, this automatically installs the browser binaries that Playwright relies on
11
- RUN pip install playwright
12
-
13
- # Run the playwright install to download browser binaries
14
- RUN playwright install-deps && playwright install
15
 
16
  # Expose port 8080 for your application
17
  EXPOSE 8080
18
 
19
- # This command runs your application, comment out this line to compile only
20
  CMD ["python3", "/app/script.py"]
 
1
+ # Set the base image
2
+ FROM mcr.microsoft.com/playwright:focal
3
 
4
+ # Set the working directory
5
  WORKDIR /app
6
 
7
+ # Copy the script to the Docker image
8
  COPY script.py .
9
 
10
+ # Ensure that Python Playwright package is up to date
11
+ RUN pip install --upgrade playwright
 
 
 
12
 
13
  # Expose port 8080 for your application
14
  EXPOSE 8080
15
 
16
+ # Run script when the container launches
17
  CMD ["python3", "/app/script.py"]