# FastMCP Template - Development Dockerfile
# Includes hot reload and development tools
FROM python:3.12-slim
LABEL maintainer="l4b4r4b4b4"
LABEL org.opencontainers.image.source="https://github.com/l4b4r4b4b4/fastmcp-template"
LABEL org.opencontainers.image.description="FastMCP Template - Development Image"
# Install uv for fast dependency management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
# Install development utilities
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user for development
RUN groupadd --gid 1000 appgroup && \
useradd --uid 1000 --gid appgroup --shell /bin/bash --create-home appuser
WORKDIR /app
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install all dependencies including dev
RUN uv sync --frozen
# Copy application code
COPY app/ ./app/
# Set ownership
RUN chown -R appuser:appgroup /app
# Switch to non-root user
USER appuser
# Set environment variables
ENV PATH="/app/.venv/bin:$PATH"
ENV PYTHONPATH="/app"
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Expose SSE port
EXPOSE 8000
# Development mode: Run with auto-reload
# Mount your local app/ directory to /app/app for hot reload
CMD ["uv", "run", "fastmcp-template", "--transport", "sse", "--host", "0.0.0.0", "--port", "8000"]