FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # ---- Base system ---- RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl git bash jq \ python3 python3-pip python3-venv \ build-essential pkg-config \ gnupg \ && rm -rf /var/lib/apt/lists/* # ---- Node 20 LTS (required) ---- RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get update && apt-get install -y --no-install-recommends nodejs \ && rm -rf /var/lib/apt/lists/* RUN node -v && npm -v && python3 -V # ---- App user ---- RUN useradd -m -u 1000 appuser USER appuser WORKDIR /home/appuser/app ENV PATH="/home/appuser/.local/bin:${PATH}" # ---- Python deps ---- COPY requirements.txt . RUN pip3 install --no-cache-dir -r requirements.txt # ---- Node deps ---- COPY package.json . RUN npm install --omit=dev # ---- App code ---- COPY server.py . COPY mcp.js . COPY ui.html . COPY start.sh . RUN chmod +x start.sh EXPOSE 7860 # ---- Single entrypoint (NO supervisor yet) ---- CMD ["./start.sh"]