Docker scripts to build an image to run the universal document converter pandoc including support to convert PDF files. The image includes a reduced TexLive 2022 installation to support simple PDF transformations. Additional TexLive packages have to be installed be extending this images. Source can be found in GitHub oehrlis/docker-pandoc.
The pre build image is available via Dockerhub. The installation and use is straightforward. Install Docker and pull the image.
docker pull oehrlis/pandoc
Either you copy the files into the container, which is obviously not really handy, or you mount your local document folder as volume and run it.
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc <OPTIONS>
Conversion of the sample Markdown file into a PDF using the default LaTeX template.
cd sample
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc sample.md \
-o sample.pdf --toc -N --listings
Conversion of the sample Markdown file into a PDF using the OraDBA LaTeX template and XeLaTeX for include custom TTF fonts.
cd sample
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc --pdf-engine=xelatex sample.md \
-o sample_oradba.pdf --template oradba --toc -N --listings
cd sample
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc sample.md \
-o sample_oradba.pdf --template oradba --toc -N --listings
Alternatively you can open a shell in the container and use the miscellanies pandoc and tex tools interactively.
docker run -it --rm -v $PWD:/workdir:z --entrypoint sh oehrlis/pandoc
If you plan to alter or extend this Docker image you could get the corresonding files from GitHub and build the image manually.
git clone git@github.com:oehrlis/docker-pandoc.git
$ cd docker-pandoc
$ docker build -t oehrlis/pandoc .
Optionally you can add additional texlive package to the tlmgr
command in the Dockerfile.
Alternatively you can use the build.sh
script.
git clone git@github.com:oehrlis/docker-pandoc.git
$ cd docker-pandoc
$ build.sh
Please file your bug reports, enhancement requests, questions and other support requests within Github's issue tracker:
- GitHub Project oehrlis/docker-pandoc related to this container.
- pandoc
- TexLive 2022
- GitHub google/fonts
- GitHub danstoner/pandoc_samples
- GitHub Wandmalfarbe/pandoc-latex-template
- Google Fonts Montserrat and Open Sans Light
- Get Microsoft's Core Fonts for the Web and ClearType Fonts (http://mscorefonts2.sourceforge.net/)