Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435# Use a Python base image with slim for faster buildsFROM python:3.10-slim# 1. Install System Dependencies# 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 \libnss3 \libgconf-2-4 \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"]123456789101112131415161718# 1. Install System Dependencies (Updated for Debian Trixie)RUN apt-get update && apt-get install -y \wget \gnupg \unzip \xvfb \# libgl1-mesa-glx is replaced by these two:libgl1 \libglx-mesa0 \# Other necessary display/browser libslibnss3 \libxss1 \libasound2 \libatk-bridge2.0-0 \libgtk-3-0 \chromium \chromium-driver \&& rm -rf /var/lib/apt/lists/*
Dockerfile+9-26