Files
juergen 41385b35e6 Initial commit: Bitwarden export to PDF renderer
Adds the render.py WeasyPrint renderer, the pod-based bitwarden-print.sh
wrapper, a Containerfile, a sample export (JSON + PDF), README and LICENSE.
2026-11-13 14:09:10 +01:00

29 lines
671 B
Docker

FROM docker.io/python:3.12-slim-bookworm
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# Runtime libraries required by WeasyPrint's Pango/HarfBuzz/Cairo stack.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libpango-1.0-0 \
libpangoft2-1.0-0 \
libharfbuzz0b \
libfontconfig1 \
libcairo2 \
libgdk-pixbuf-2.0-0 \
libffi8 \
libjpeg62-turbo \
libopenjp2-7 \
shared-mime-info \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
RUN pip install "weasyprint==62.3" "pydyf==0.10.0"
WORKDIR /app
COPY render.py /app/render.py
ENTRYPOINT ["python3", "/app/render.py"]
CMD ["--help"]