FROM python:3.10-slim # Install Chrome dependencies using new method (without apt-key) RUN apt-get update && apt-get install -y \ wget \ gnupg \ unzip \ curl \ fonts-liberation \ libasound2 \ libatk-bridge2.0-0 \ libatk1.0-0 \ libcups2 \ libdbus-1-3 \ libdrm2 \ libgbm1 \ libgtk-3-0 \ libnspr4 \ libnss3 \ libxcomposite1 \ libxdamage1 \ libxfixes3 \ libxkbcommon0 \ libxrandr2 \ xdg-utils \ && rm -rf /var/lib/apt/lists/* # Install Google Chrome using new method RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google.gpg \ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && apt-get update \ && apt-get install -y google-chrome-stable \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Copy and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt RUN pip install flask requests # Install playwright browsers RUN playwright install chromium # Copy application COPY app.py . # Expose port 7860 EXPOSE 7860 # Run the application CMD ["python", "app.py"]