Skip to main content
Glama
Dockerfileโ€ข1.15 kB
# Multi-stage build for LPDP MCP Server # Stage 1: Builder FROM python:3.11-slim as builder WORKDIR /app # Install build dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ gcc \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir --user -r requirements.txt # Stage 2: Runtime FROM python:3.11-slim as runtime WORKDIR /app # Create non-root user for security RUN useradd --create-home --shell /bin/bash appuser # Copy installed packages from builder COPY --from=builder /root/.local /home/appuser/.local # Copy application code COPY src/ ./src/ COPY scripts/ ./scripts/ # Set environment variables ENV PATH=/home/appuser/.local/bin:$PATH ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE=1 # Switch to non-root user USER appuser # Health check (optional - MCP servers don't typically have HTTP endpoints) # HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ # CMD python -c "from src.server import server; print('OK')" || exit 1 # Default command - run MCP server CMD ["python", "-m", "src.server"]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adityaldy/mcp-training'

If you have feedback or need assistance with the MCP directory API, please join our Discord server