From 8dcf5e5faa7bd9be99e9677f183e56037b3ae92c Mon Sep 17 00:00:00 2001 From: sirdave73 Date: Fri, 4 Sep 2026 18:24:37 -0400 Subject: [PATCH] fix(docker): install libreoffice-writer so Rich-mode Office rendering (.docx/.odt/.rtf) works on the deployed container --- Dockerfile | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4410a72..52797af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,13 @@ # EPUB3 -> PDF converter (Flask + WeasyPrint) — Coolify / any Docker host # WeasyPrint needs pango + fontconfig system libraries; CJK fonts for full-text support. +# Rich mode: the Office trio (.docx/.odt/.rtf) renders through LibreOffice headless. +# libreoffice-writer covers all three and provides /usr/bin/libreoffice; its dependency +# pulls in the core soffice engine. Installed lean via --no-install-recommends. FROM python:3.12-slim -ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 \ - PORT=8030 \ - DATA_DIR=/app/data \ - PIP_NO_CACHE_DIR=1 +ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PORT=8030 DATA_DIR=/app/data PIP_NO_CACHE_DIR=1 -RUN apt-get update && apt-get install -y --no-install-recommends \ - libpango-1.0-0 \ - libpangoft2-1.0-0 \ - libharfbuzz0b \ - libffi8 \ - shared-mime-info \ - fontconfig \ - fonts-dejavu-core \ - fonts-noto-cjk \ - pandoc \ - && rm -rf /var/lib/apt/lists/* && fc-cache -f +RUN apt-get update && apt-get install -y --no-install-recommends libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b libffi8 shared-mime-info fontconfig fonts-dejavu-core fonts-noto-cjk pandoc libreoffice-writer && rm -rf /var/lib/apt/lists/* && fc-cache -f WORKDIR /app