playwright_attempt_2 / Dockerfile
Dalleon's picture
Update Dockerfile
5710608
raw
history blame
610 Bytes
FROM python:3.9
# Install dependencies
RUN apt-get update && apt-get install -y \
curl \
unzip \
xvfb \
libxi6 \
libgconf-2-4 \
libxtst6 \
libxss1 \
libnss3 \
libasound2
# Install playwright
RUN pip install playwright
# Install browser dependencies
RUN playwright install
# Set up virtual environment
RUN python -m venv venv
ENV PATH="/venv/bin:$PATH"
# Install Python dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt
# Set the working directory
WORKDIR /app
# Copy the code into the container
COPY . .
# Run the code
CMD ["python", "app.py"]