# Python 3.12 slim image based on Debian 12
FROM python:3.12-slim-bookworm

# ICU is required by every GroupDocs product; libgdiplus, fontconfig and fonts are used to render documents
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        libicu72 \
        libgdiplus \
        fontconfig \
        fonts-liberation && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Set workdir
WORKDIR /app

# Install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the app
COPY . .

# Run the app
CMD ["python", "merge_docx_files.py"]
