Dockerfile•877 B
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY pyproject.toml ./
COPY README.md ./
# Install Python dependencies
RUN pip install --no-cache-dir -e .
# Copy source code
COPY src/ ./src/
COPY *.py ./
# Create non-root user
RUN useradd --create-home --shell /bin/bash appuser && \
chown -R appuser:appuser /app
USER appuser
# Expose port
EXPOSE 8000
# Health check
RUN apt-get update && apt-get install -y \
gcc \
curl \
&& rm -rf /var/lib/apt/lists/*
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS http://localhost:8000/health || exit 1
# Default command
CMD ["python", "-m", "uvicorn", "src.ignition_mcp.main:app", "--host", "0.0.0.0", "--port", "8000"]