Skip to content

barthel/docker-asciidoctor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asciidoctor — multi platform Edition

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/

⚠️ Note

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.

Additional diagram tools

The following additional diagram tools are installed:

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.

⚠️ Note

The following diagram tools are not installed because there is no executable file for all supported platforms:

Usage

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


[1] provided by original Asciidoctor Docker Image