# Runtime image for the ckb MCP server. It carries no KB content: the KB is # cloned into the /kb volume on first start (see entrypoint.sh). FROM python:3.12-slim RUN apt-get update \ && apt-get install -y --no-install-recommends git ripgrep openssh-client ca-certificates \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt COPY entrypoint.sh /app/entrypoint.sh RUN useradd --create-home --uid 10001 ckb && mkdir /kb && chown ckb /kb USER ckb ENV CKB_ROOT=/kb CKB_MCP_HOST=0.0.0.0 CKB_MCP_PORT=8765 CKB_MCP_GIT=sync EXPOSE 8765 HEALTHCHECK CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8765/health')" ENTRYPOINT ["/app/entrypoint.sh"]