# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Auto-generated Dockerfile for Canvas LMS MCP Server
FROM python:3.13-alpine AS build

# Install build dependencies
RUN apk add --no-cache build-base libffi-dev openssl-dev

# Set working directory
WORKDIR /app

# Copy project files
COPY pyproject.toml README.md LICENSE ./
COPY src ./src

# Install package
RUN pip install --no-cache-dir .

# Runtime image
FROM python:3.13-alpine

# Install runtime dependencies
RUN apk add --no-cache libffi openssl

WORKDIR /app

# Copy installed packages and entrypoint
COPY --from=build /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
COPY --from=build /usr/local/bin /usr/local/bin

# Copy source files (if needed by dynamic imports)
COPY src ./src

# Expose default MCP HTTP port
EXPOSE 8000

# Default command: run the MCP server
CMD ["canvas-lms-mcp"]
