| 1 | FROM python:3.12-slim |
| 2 | |
| 3 | RUN apt-get update && \ |
| 4 | apt-get install -y --no-install-recommends pandoc calibre && \ |
| 5 | rm -rf /var/lib/apt/lists/* |
| 6 | |
| 7 | RUN mkdir -p /app /output |
| 8 | |
| 9 | WORKDIR /app |
| 10 | |
| 11 | COPY requirements.txt /app/ |
| 12 | RUN pip install --no-cache-dir -r requirements.txt |
| 13 | |
| 14 | COPY main.py epub_builder.py generate_reference_doc.py /app/ |
| 15 | COPY center-v.lua /app/ |
| 16 | COPY pagebreak.lua /app/ |
| 17 | COPY epub-style.css /app/ |
| 18 | RUN python generate_reference_doc.py |
| 19 | |
| 20 | # /vault - mount your markdown source folder here (read-write for flag reset) |
| 21 | # /output - mount your EPUB destination folder here |
| 22 | VOLUME ["/vault", "/output"] |
| 23 | |
| 24 | CMD ["python", "-u", "main.py"] |