FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # Core dev tools + all the extras RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip python3-venv \ nodejs npm \ git curl wget unzip \ nano vim htop procps net-tools \ build-essential \ imagemagick \ chromium-browser \ fonts-liberation \ ffmpeg \ tmux \ openssh-client \ pandoc \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Install Python packages (web + data science) RUN pip3 install --no-cache-dir \ flask requests beautifulsoup4 selenium httpx \ numpy pandas scipy matplotlib pillow \ yt-dlp playwright # Install Playwright browser RUN playwright install chromium 2>/dev/null || true # Create user RUN useradd -m -s /bin/bash -u 1000 user && \ echo "user:2004" | chpasswd # Copy app COPY app.py /home/user/app.py EXPOSE 7860 WORKDIR /home/user RUN mkdir -p /home/user/workspace && chown -R user:user /home/user CMD ["python3", "/home/user/app.py"]