32 lines
663 B
Docker
32 lines
663 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM python:3.12-slim AS builder
|
|
WORKDIR /app
|
|
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
COPY pyproject.toml README.md openapi.json ./
|
|
COPY src ./src
|
|
|
|
RUN pip install --upgrade pip \
|
|
&& pip wheel . -w /wheels
|
|
|
|
FROM python:3.12-slim AS runtime
|
|
WORKDIR /app
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
|
PIP_NO_CACHE_DIR=1
|
|
|
|
COPY --from=builder /wheels /wheels
|
|
RUN pip install /wheels/*.whl \
|
|
&& rm -rf /wheels
|
|
|
|
ENV MCP_TRANSPORT=streamable-http \
|
|
MCP_HOST=0.0.0.0 \
|
|
MCP_PORT=8000 \
|
|
LIGHTRAG_BASE_URL=http://host.docker.internal:9621
|
|
|
|
EXPOSE 8000
|
|
|
|
ENTRYPOINT ["lightrag-mcp"]
|