CodeGPT / Dockerfile
MarneMorgan's picture
Create Dockerfile
713bbff verified
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Base deps
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 \
supervisor \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# --- Node 20 LTS (important) ---
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/*
# sanity prints (helps logs)
RUN node -v && npm -v && python3 -V
# Non-root 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 files
COPY server.py .
COPY mcp.js .
COPY supervisord.conf .
COPY ui.html .
EXPOSE 7860
CMD ["supervisord", "-c", "/home/appuser/app/supervisord.conf"]