Commit 6d667d1
authored
SEP-1003: Install WeasyPrint system libraries in Docker runtime image (#554)
## Summary
- Add `pango`, `fontconfig`, and `ttf-dejavu` to the runtime stage's
`apk add` line in `Dockerfile`. `pango` transitively pulls in `glib`
(which provides `libgobject-2.0-0`), `harfbuzz`, `cairo`, `fribidi` and
bundles `libpangoft2`, satisfying every shared library WeasyPrint loads
at import time.
- Add a `changelog.d/SEP-1003.fixed.md` fragment under "Fixed".
- Builder stage is intentionally untouched; it already builds the
`weasyprint` wheel without needing any of these runtime libraries.
Verified end-to-end on `python:3.11.14-alpine` that the chosen package
set lets `from weasyprint import CSS, HTML` succeed at import time and
that `HTML(...).write_pdf()` produces a valid PDF.
Image size grows by roughly 30-40 MB; this is unavoidable for WeasyPrint
to function.
## Tested
- [x] `docker compose build` completes successfully.
- [x] `docker compose up` boots without the `libgobject-2.0-0` OSError;
both `app_1` and `celery_worker` reach a healthy state.
- [x] Trigger a PDF report via the report plugin and confirm the
resulting PDF opens in a viewer with real text glyphs (not empty
rectangles).
## Checklist
- [x] ~~New/modified functions have type hints and rST docstrings~~
*(N/A — Dockerfile-only change)*
- [x] ~~New tests added for new features or bug fixes~~ *(N/A —
runtime-dep fix verified via container boot + PDF smoke test)*
- [x] ~~Database migrations generated if models changed (`make
makemigrations`)~~ *(N/A — no model changes)*
- [x] ~~User-facing changes documented (README, inline help, UI text)~~
*(N/A — internal runtime fix; changelog fragment added)*
- [x] ~~Configuration changes documented with examples~~ *(N/A — no
configuration changes)*1 parent 1374802 commit 6d667d1
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments