# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
# Start from official Python image
FROM python:3.11-slim

# Prevent interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Install Chromium and Chromedriver for Selenium
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
       chromium-driver chromium \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application code
COPY . .

# Ensure the Python script is executable
RUN chmod +x main.py

# Set environment variables for Chromium
ENV CHROME_BIN=/usr/bin/chromium
ENV PATH="/usr/bin/chromium-driver:${PATH}"

# Expose stdio interface
# Default command
ENTRYPOINT ["python", "main.py"]
CMD []
