The goal of this project is to build a multi-platform (arm64, amd64) Docker image based on the original Asciidoctor Docker image and adding all extra diagram tools supported by Asciidoctor Diagram.
An overview of all supported diagram types, generated as HTML and as PDF, can be found here: https://barthel.github.io/docker-asciidoctor/
The original Asciidoctor Docker image is delivered from version 1.63.0 as a multi platform container with amd64
and arm64
.
Unfortunately, it is not possible to provide armv7
version greater than 1.46 anymore because updated Java-based tools no longer use Java 8 and there is no Java runtime environment greater than version 8 on Alpine Linux armv7
.
The following additional diagram tools are installed:
- ASCIIToSVG[1]
- barby[1]
- blockdiag/blockdiag[1]
- blockdiag/actdiag[1]
- blockdiag/nwdiag[1]
- blockdiag/seqdiag[1]
- bpmn-js-cmd
- bytefield-svg
- diagrams
- ditaa[1]
- dpic
- erd-go
- gnuplot[1]
- graphviz[1]
- imagemagick for meme
- mermaid
- nomnoml
- pikchr
- plantuml[1]
- state-machine-cat (smcat)
- svgbob
- symbolator uses fork, because of incompatible python setup (2to3)
- syntrax
- tikz[1]
- umlet
- vega and vega-lite
- wavedrom
Additional non-diagram tools:
- htmlark
Embed images, CSS, and JavaScript into an HTML file. Through the magic of data URIs, HTMLArk can save these external dependencies inline right in the HTML.
—David Powell, https://github.com/BitLooter/htmlark - inliner fork of https://github.com/remy/inliner
Turns your web page to a single HTML file with everything inlined - perfect for appcache manifests on mobile devices that you want to reduce those http requests. —Remy Sharp, https://github.com/remy/inliner
- asciidoctor-extensions available in
/usr/local/asciidoctor-extensions
and could be used like:asciidoctor -r /usr/local/asciidoctor-extensions/lib/glob-include-processor.rb ...
⚠ Please do not use this code in production. The code is untested. - asciidoctor-multipage
It extends the stock HTML converter to generate multiple HTML pages from a single, large source document.
- asciidoctor-lists
An asciidoctor extension that adds a list of figures, a list of tables, or a list of anything you want.
The following diagram tools are not installed because there is no executable file for all supported platforms:
- erd was replaced by erd-go
- mscgen (has been replaced by mscgen_js, but is currently not maintained)
- shaape
Generate HTML document:
docker run --rm \
-v $(pwd)/src/doc:/documents/ \
-v $(pwd)/dist:/dist \
docker.io/uwebarthel/asciidoctor:latest \
asciidoctor \
-b html5 \
-D "/dist" \
-r asciidoctor-diagram \
-r asciidoctor-mathematical \
-r /usr/local/asciidoctor-extensions/lib/glob-include-processor.rb \
/documents/asciidoctor-diagram_overview.adoc
Generate inlined HTML document via inliner
based on generated HTML document:
docker run --rm -it \
-v $(pwd)/dist:/dist \
docker.io/uwebarthel/asciidoctor:latest \
inliner \
--nocompress \
--preserve-comments \
--inlinemin \
--videos \
/dist/asciidoctor-diagrams_overview.html 2>/dev/null 1> dist/asciidoctor-diagrams_overview_inlined.html
Generate PDF document:
docker run --rm \
-v $(pwd)/src/doc:/documents/ \
-v $(pwd)/dist:/dist \
docker.io/uwebarthel/asciidoctor:latest \
asciidoctor-pdf \
-D "/dist" \
-r asciidoctor-diagram \
-r asciidoctor-mathematical \
-r /usr/local/asciidoctor-extensions/lib/glob-include-processor.rb \
/documents/asciidoctor-diagram_overview.adoc
Docker Hub: https://hub.docker.com/r/uwebarthel/asciidoctor
docker build \
--build-arg CONTAINER_INFORMATION="docker.io/uwebarthel/asciidoctor:latest ($(git rev-parse --short HEAD))" \
--tag uwebarthel/asciidoctor:latest \
--tag docker.io/uwebarthel/asciidoctor:latest \
.
[1] provided by original Asciidoctor Docker Image