# ECH0-PRIME MCP Server Dockerfile FROM python:3.11-slim # Set environment variables ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE=1 ENV MCP_PORT=8000 ENV MCP_HOST=0.0.0.0 # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ git \ curl \ && rm -rf /var/lib/apt/lists/* # Create non-root user RUN useradd --create-home --shell /bin/bash ech0 USER ech0 # Set work directory WORKDIR /app # Copy requirements first for better caching COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir --user -r requirements.txt # Copy application code COPY . . # Expose port EXPOSE 8000 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD curl -f http://localhost:8000/health || exit 1 # Run the application CMD ["python", "-m", "mcp_server", "--port", "8000"]