Skip to content

Mokolea/docker-asciidoctor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-asciidoctor Docker Cloud Build Status Docker Image Size (tag)

Test AsciiDoc using Asciidoctor

Release

Asciidoctor

Docker container based on:

Usage

  • Start new container from a current asciidoc-project directory: $ docker run -it -v $(pwd):/data --name asciidoctor -h asciidoctor mokolea/asciidoctor:latest
  • Optional: Set user and group IDs to override the default image user (1000:1000) by using parameter:
    • -u root for root user
    • -u $(id -u):$(id -g) for current host user (experimental - does not work without additional configuration)
  • Subsequent use of the same stopped container: $ docker start -ai asciidoctor
  • Create bash shell session in the already running container: $ docker exec -it asciidoctor bash

Test

bash-5.1$ asciidoctor --version
Asciidoctor 2.0.15 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
bash-5.1$ 

bash-5.1$ asciidoctor-pdf --version
Asciidoctor PDF 1.6.0 using Asciidoctor 2.0.15 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
bash-5.1$ 

bash-5.1$ asciidoctor hello-world.adoc 
bash-5.1$ ls hello-world.html 
hello-world.html
bash-5.1$ 

bash-5.1$ asciidoctor-pdf hello-world.adoc 
bash-5.1$ ls hello-world.pdf 
hello-world.pdf
bash-5.1$ 

TODO

  • Add hello-world.adoc

Done

  • Setup appropriate user to not run tools (asciidoctor, asciidoctor-pdf, ...) as root and so not have generated files from root in host file system

-- Mario