FROM python:3.12-slim

LABEL org.opencontainers.image.description="edgemint - Extract and regenerate branded DOCX documents from Markdown"
LABEL org.opencontainers.image.source="https://github.com/raphaelmansuy/edgemint"
LABEL org.opencontainers.image.licenses="Apache-2.0"

WORKDIR /app

# Install system dependencies for pandoc and lxml
RUN apt-get update && apt-get install -y --no-install-recommends \
    pandoc \
    libxml2-dev \
    libxslt1-dev \
    && rm -rf /var/lib/apt/lists/*

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

# Install edgemint with all extras
RUN pip install --no-cache-dir -e ".[pandoc]"

# Verify installation
RUN edgemint version

ENTRYPOINT ["edgemint"]
CMD ["--help"]
