Pandoc docker image (minidocks/pandoc)
Pandoc is a document converter, widely used as a writing tool (especially by scholars) and as a basis for publishing workflows.
All extensions are instaled in /pandoc
directory. Directory
/home/user/.pandoc
is symlink to /pandoc
.
- https://github.com/pandoc/lua-filters
- https://github.com/pandocker/pandocker-lua-filters
- https://github.com/PlushBeaver/pandoc-table-filter
- https://github.com/jgm/select-meta
- https://github.com/mitinarseny/panpipe
- https://github.com/tomncooper/pandoc-gls
- https://github.com/a-vrma/pandoc-filters
- https://github.com/jzeneto/pandoc-odt-filters
- https://github.com/hason/pandoc-filters
- https://github.com/teoric/pandoc-filters
- https://github.com/CDSoft/panda
- https://github.com/pandoc-ext
docker run --rm -v `pwd`:/app -w /app minidocks/pandoc http://pandoc.org/MANUAL.html -t markdown
To produce a pdf pandoc requires a pdf engine (LaTeX, ConTeXt, Weasyprint etc.). We must connect containers via the ssh protocol. The easiest solution is to use docker compose.
So create a file compose.yaml
with content:
x-base: &base
volumes:
- .:/app
- /tmp:/tmp
working_dir: /app
command: sshd
services:
pandoc:
<<: *base
image: minidocks/pandoc
links:
- context
- texlive
environment:
ALIAS_CONTEXT: ssh context context
ALIAS_PDFLATEX: ssh texlive pdflatex
context:
<<: *base
image: minidocks/context:current-with-fonts
texlive:
<<: *base
image: minidocks/texlive:small
And in the same directory run command:
docker compose run --rm pandoc https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -o manual-latex.pdf
docker compose run --rm pandoc https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -t context -o manual-context.pdf
It is possible to use custom LaTeX template:
docker compose run --rm pandoc https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/examples/custom-titlepage/custom-titlepage.md --template eisvogel -o custom-titlepage.pdf
or ConTeXt template:
docker compose run --rm pandoc https://raw.githubusercontent.com/mszep/pandoc_resume/master/markdown/resume.md --template chmduquesne.tex -s -t context --variable papersize=A4 -o resume.pdf
Tag | Size |
---|---|
latest, 3 | |
3 | |
2 |