-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (23 loc) · 926 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This Docker container is used to run the Python application.
# It is based on the official Python image and installs the required dependencies.
# The entrypoint is set to run the application.
# The application (in ./app) is not copied into the container, but mounted as a volume when the container is started.
# This way, the application can be updated without rebuilding the container.
# Use the official Python image
FROM python:3.11-slim
# Set the working directory
RUN mkdir /app
WORKDIR /app
# Expose the port
EXPOSE 8000
# Mount the application as a volume
VOLUME /app
# Install the required dependencies
COPY requirements.txt .
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Initialize Playwright
RUN python -m playwright install
RUN python -m playwright install-deps
# Set the entrypoint to run the application
CMD ["python", "-u", "main.py", "--ip", "0.0.0.0", "--port", "8000"]