# Use Python 3.11 slim (Debian Bookworm) FROM python:3.11-slim # Prevent Python buffering ENV PYTHONUNBUFFERED=1 WORKDIR /app # 1. Install dependencies (wget, curl, gnupg, unzip) RUN apt-get update && apt-get install -y \ wget \ curl \ gnupg \ unzip \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # 2. Install Google Chrome Stable DIRECTLY (Fixes the apt-key error) # We download the .deb file and install it with apt-get RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ && apt-get update \ && apt-get install -y ./google-chrome-stable_current_amd64.deb \ && rm google-chrome-stable_current_amd64.deb \ && apt-get clean # 3. Install Python libraries COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 4. Copy script COPY monitor.py . # 5. Run CMD ["python", "monitor.py"]