Files
truenas-mcp/Dockerfile
T

17 lines
806 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:20-slim
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip && rm -rf /var/lib/apt/lists/*
# Явно фиксируем версию mcp ДО установки mcpo, иначе mcpo подтянет несовместимую
# версию без streamablehttp_client и упадёт с ImportError при старте.
RUN pip3 install --no-cache-dir --break-system-packages "mcp>=1.28,<2.0"
RUN pip3 install --no-cache-dir --break-system-packages mcpo
# Прогреваем кэш npx, чтобы при каждом старте контейнера не тянуть пакет заново
RUN npx -y truenas-mcp --help || true
EXPOSE 8000
ENTRYPOINT ["mcpo"]
CMD ["--host", "0.0.0.0", "--port", "8000", "--config", "/app/config.json"]