Update Dockerfile
Browse files1234156234561278910111412131415161718181920212223242526272829303132333435# Use a Python base image with slim for faster buildsFROM python:3.10-slim
# 1. Install System Dependencies# 1. Install System Dependencies (Updated for Debian Trixie)# We need Chrome for the bot, Xvfb for the virtual screen, # and various libs for OpenCV/Chrome to run.RUN apt-get update && apt-get install -y \ wget \ gnupg \ unzip \ xvfb \ libgl1-mesa-glx \ # libgl1-mesa-glx is replaced by these two: libgl1 \ libglx-mesa0 \ # Other necessary display/browser libs libnss3 \ libgconf-2-4 \ libxss1 \ libasound2 \ libatk-bridge2.0-0 \ libgtk-3-0 \ chromium \ chromium-driver \ && rm -rf /var/lib/apt/lists/*
# 2. Set environment variables# This tells Python/Chrome to use the virtual display we'll startENV DISPLAY=:99ENV PYTHONUNBUFFERED=1
# 3. Setup WorkspaceWORKDIR /appCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your codeCOPY . .
# 4. The Startup Command# We start Xvfb in the background (&), then launch the Python app.# 1280x720 is a standard "virtual monitor" size for the bot to see.CMD ["sh", "-c", "Xvfb :99 -screen 0 1280x720x24 & python app.py"]Dockerfile+9-26