Self-contained Antora image used to build this repo's documentation site.
It is the consolidated "markup-antora" image — one definition shared across
the SKaiNET docs projects — vendored here until the public registry image
is published (after which this Dockerfile collapses to a single FROM).
Migration note: this repo previously rendered Mermaid through
asciidoctor-kroki(an external Kroki round-trip). It now renders Mermaid fully offline vialocal-mermaid-extension.js, matching mainline SKaiNET.
- Offline Mermaid — every
[mermaid]block is rendered to inline SVG at build time bymermaid-cli(Alpine Chromium + Puppeteer) via the baked-inlocal-mermaid-extension.jsAsciidoctor block processor. No Kroki server, nokroki.io, no network — at build time or view time. Removes the asciidoctor-kroki 4 KB GET-URL limit that rejected large diagrams. - Diagram caching — content-hash, in-memory + optional on-disk
(
MERMAID_CACHE_DIR); identical diagrams render once. - Rootless-safe — runs under
--user $(id -u):$(id -g)without the Chromium crashpad / cosmiconfigEACCESfailures (HOME=/tmp, build-time cleanup of root-owned/tmpdirs). - Build-time smoke test — a broken image fails
docker build, not your first render. - Offline extras —
@antora/lunr-extension(search), a pre-baked Antora UI bundle, and MathJax es5 for LaTeX are available in the image. - Kroki escape hatch —
asciidoctor-krokiis installed (unused here) for other diagram types if ever needed. - Full Alpine font set (
font-noto,font-noto-emoji,ttf-freefont, …) so diagram labels, emoji and CJK render correctly.
| File | Purpose |
|---|---|
Dockerfile |
The consolidated image definition (build context = this dir). |
local-mermaid-extension.js |
Offline Mermaid block processor; baked to /opt/antora/. |
puppeteer-config.json |
Chromium flags for mermaid-cli; baked to /opt/antora/. |
The playbook wires the extension via
asciidoc.extensions: [ /opt/antora/local-mermaid-extension.js ].
Build the image (context is this directory):
docker build -t skainet-antora:local -f docs/.docker/Dockerfile docs/.docker/Render the site (run from the repo root; mount the repo at /antora, run as
your user so output isn't root-owned):
docker run --rm \
--user "$(id -u):$(id -g)" \
-v "$PWD:/antora" \
--workdir /antora/docs \
skainet-antora:local \
--stacktrace antora-playbook.yml
# Output: docs/build/site/index.htmlThis is exactly what .github/workflows/docs.yml does in CI — it builds the
image from this directory and runs the container the same way.
Write diagrams as normal Asciidoctor blocks:
[mermaid]
----
graph TD; A-->B; B-->C;
----