Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -10
Dockerfile
CHANGED
|
@@ -1,20 +1,17 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
-
#
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy script
|
| 8 |
COPY script.py .
|
| 9 |
|
| 10 |
-
#
|
| 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 |
-
#
|
| 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"]
|