# The container exists mainly to guarantee an ffmpeg that can actually draw text.
# Debian's ffmpeg is built with libass and libfreetype; a lot of minimal builds are
# not, and captions are most of what a short is.
FROM python:3.12-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
        ffmpeg espeak-ng fonts-dejavu-core \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY pyproject.toml README.md ./
COPY shortsmith ./shortsmith
RUN pip install --no-cache-dir .

WORKDIR /work
ENTRYPOINT ["shortsmith"]
CMD ["doctor"]
