{"id":20491685,"url":"https://github.com/dalibo/pandocker","last_synced_at":"2025-04-13T06:41:03.768Z","repository":{"id":15575526,"uuid":"78412186","full_name":"dalibo/pandocker","owner":"dalibo","description":"🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar","archived":false,"fork":false,"pushed_at":"2024-06-18T10:23:49.000Z","size":1812,"stargazers_count":149,"open_issues_count":9,"forks_count":23,"subscribers_count":13,"default_branch":"latest","last_synced_at":"2025-03-24T10:42:35.848Z","etag":null,"topics":["docker-image","filter","latex","pandoc"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/dalibo/pandocker/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dalibo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-09T09:07:56.000Z","updated_at":"2025-01-22T22:06:31.000Z","dependencies_parsed_at":"2024-05-30T09:25:51.598Z","dependency_job_id":"083711df-1782-4f66-a8c9-5ecc40bb83d2","html_url":"https://github.com/dalibo/pandocker","commit_stats":{"total_commits":421,"total_committers":15,"mean_commits":"28.066666666666666","dds":0.332541567695962,"last_synced_commit":"9194e914ddb2f3060bdaa6abe088165ee9cf4175"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalibo%2Fpandocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalibo%2Fpandocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalibo%2Fpandocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalibo%2Fpandocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalibo","download_url":"https://codeload.github.com/dalibo/pandocker/tar.gz/refs/heads/latest","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675434,"owners_count":21143763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image","filter","latex","pandoc"],"created_at":"2024-11-15T17:25:33.379Z","updated_at":"2025-04-13T06:41:03.743Z","avatar_url":"https://github.com/dalibo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pandocker\n\n[![github\nrelease](https://img.shields.io/github/release/dalibo/pandocker.svg?label=current+release)](https://github.com/dalibo/pandocker/releases)\n[![Docker Image](https://img.shields.io/docker/automated/dalibo/pandocker.svg)](https://hub.docker.com/r/dalibo/pandocker)\n[![CI](https://github.com/dalibo/pandocker/actions/workflows/build.yml/badge.svg?branch=latest)](https://github.com/dalibo/pandocker/actions/workflows/build.yml)\n[![Last Commit](https://img.shields.io/github/last-commit/dalibo/pandocker.svg)](https://github.com/dalibo/pandocker/branches)\n\nA simple docker image for pandoc with [filters], [templates], [fonts] and\n[additional tools].\n\n[filters]: #filters\n[templates]: #templates\n[fonts]: #fonts\n[additional tools]: #additional_tools\n\n## Install / Upgrade\n\nDownload the image with:\n\n```console\ndocker pull dalibo/pandocker:stable\n```\n\nWhenever a new stable version is released, launch that command again to refresh\nyour image.\n\n## How To\n\nRun `dalibo/pandocker`  with regular `pandoc` args. Mount your files at `/pandoc`.\n\n```console\ndocker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker README.md -o README.pdf\n```\n\n**Notes about the docker options:**\n\n* The `-v ...` option will mount the current folder as the `/pandoc` directory\n  inside the container. If SELinux is enabled on your system, you might need to\n  add the `--privileged` tag to force access to the mouting points. For more\n  details, read the documentation about [docker runtime privileges].\n\n[docker runtime privileges]: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities\n\n* The `--rm` option destroys the container once the document is produced.\n  This is not mandatory but it's a good practice.\n\n* The `-u` option ensures that the output files will belong to you.\n  Again this is not necessary but it's useful.\n\n\u003e Tip: You can define a shell alias to use `pandocker` just like `pandoc`.\n\u003e Add this to your `~/.bashrc` :\n\n```console\nalias pandoc=\"docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker:stable\"\npandoc README.md -o README.epub\n```\n\nAlternatively, you can use a pipe like this:\n\n```console\ncat foo.md | docker run --rm -i dalibo/pandocker -t pdf \u003e foo.pdf\n```\n\nThis method will not work if the source document contains images or includes...\n\n## Templates\n\nWe're shipping a selection of latex templates inside the image so that you\ncan produce nice PDF documents without installing anything.\n\nSo far, we provide the 3 templates below:\n\n* [eisvogel] is designed for lecture notes and exercises with a focus on computer\n  science. It works with `pdflatex` and `xelatex`.\n* [easy templates] is a collection of HTML templates\n\n\nYou can use them simply by adding `--template=xxx` to your compilation\nlines:\n\n``` console\ndocker run [...] --pdf-engine=xelatex --template=eisvogel foo.md -o foo.pdf\n```\n\nEach template has specific variables that you can use to adapt the document.\nPlease go the project page of each template for more details.\n\n[eisvogel]: https://github.com/Wandmalfarbe/pandoc-latex-template\n[easy templates]: https://github.com/ryangrose/easy-pandoc-templates\n\n## Filters\n\nThis docker image embeds a number of usefull pandoc filters. You can simply\nenable them by adding the option `--filter xxx` where `xxx` is the name of\none of the following filters below:\n\n* [panda] : Multi-purpose Lua filter\n* [pandoc-citeproc] : manage bibliographies and citations\n* [pandoc-codeblock-include] : insert an external file into a codeblock\n* [pandoc-cover] : Add a PDF cover based on an SVG template\n* [pandoc-include] : insert external markdown files into the main document\n* [pandoc-latex-admonition] : adding admonitions on specific DIVs\n* [pandoc-latex-barcode] : insert barcodes and QRcodes in documents\n* [pandoc-latex-color] : Add colors to your PDF documents !\n* [pandoc-latex-environment] : adding LaTeX environments on specific DIVs\n* [pandoc-latex-fontsize] : Change size of a specific section of the document\n* [pandoc-latex-margin] : Resize the margins of your PDF documents\n* [pandoc-latex-newpage] : Convert horizontal rule to new page in LaTeX\n* [pandoc-mustache] : basic variables substitution\n* [pandoc-crossref] : support for cross-referencing sections, figures, and more\n* [pandoc-run-postgres] : Execute SQL queries inside a markdown document\n* [pandoc-jinja] : Render pandoc metadata inside the document itself\n\nNOTE: By default when using the [pandoc-include] filter, the path to target\nfiles is relative to the `/pandoc` mountpoint. For instance,\nthe `!include [foo/bar.md]` statement will look for a `/pandoc/foo/bar.md` file.\nYou can use the docker arg `--workdir=\"some/place/elsewhere\"` to specify\nanother location. The same principle applies to the [pandoc-codeblock-include]\nand [pandoc-mustache] filters.\n\n[pando]: https://github.com/CDSoft/panda\n[pandoc-cover]: https://github.com/daamien/pandoc-cover\n[pandoc-citeproc]: https://pandoc.org/demo/example19/Extension-citations.html\n[pandoc-codeblock-include]: https://github.com/chdemko/pandoc-codeblock-include\n[pandoc-include]: https://github.com/DCsunset/pandoc-include\n[pandoc-latex-admonition]: https://github.com/chdemko/pandoc-latex-admonition\n[pandoc-latex-barcode]: https://github.com/daamien/pandoc-latex-barcode\n[pandoc-latex-color]: https://github.com/chdemko/pandoc-latex-color\n[pandoc-latex-environment]: https://github.com/chdemko/pandoc-latex-environment\n[pandoc-latex-fontsize]: https://github.com/chdemko/pandoc-latex-fonsize\n[pandoc-latex-margin]: https://github.com/chdemko/pandoc-latex-margin\n[pandoc-latex-newpage]: https://github.com/chdemko/pandoc-latex-newpage\n[pandoc-mustache]: https://github.com/michaelstepner/pandoc-mustache\n\n[pandoc-crossref]: https://github.com/lierdakil/pandoc-crossref\n[pandoc-run-postgres]: https://github.com/daamien/pandoc-run-postgres\n[pandoc-jinja]: https://github.com/daamien/pandoc-jinja\n\n## Fonts\n\nThe pandocker image includes the following open-source fonts:\n\n* Deja Vu: \u003chttps://dejavu-fonts.github.io/\u003e\n* Lato: \u003chttps://fonts.google.com/specimen/Lato\u003e\n* Liberation: \u003chttps://github.com/liberationfonts/liberation-fonts\u003e\n* Fontawesome: \u003chttps://fontawesome.com/\u003e\n\nThe full variant includes\n\n* Noto: \u003chttps://www.google.com/get/noto/\u003e\n\n## Supported Tags : Branch + Variant + Parent\n\nThe image is available in 4 versions named as follows:\n\n* `latest` (default): minimal image containing the most recent changes\n* `stable` : minimal image based on the latest stable release\n* `latest-full` (default): complete image containing the most recent changes\n* `stable-full` : complete image based on the latest stable release\n\nYou can also the release names for instance\n\n`docker pull dalibo/pandocker:24.05`\n\nthe previous versions add more complex tags such as `latest-ubuntu-extra` \nor `stable-buster`. They are not supported anymore.\n\n## Build it\n\nUse `make` or `docker build .`\n\n## Additional tools\n\nThe docker image embeds additional software related to editing and publishing:\n\n* [dia] a simple tool to design diagrams\n* [poppler-utils] a collection of tools built to manage PDF and extract content\n* [rsync] for deployment\n\n[dia]: http://dia-installer.de/\n[poppler-utils]: https://en.wikipedia.org/wiki/Poppler_(software)#poppler-utils\n[rsync]: https://rsync.samba.org/documentation.html\n\nThese tools can be called by modifying the entrypoint of the image. For instance,\nyou can convert a `dia` source file into an SVG image like this:\n\n``` console\ndocker run [..] --entrypoint dia dalibo/pandocker foo.dia -e foo.svg\n```\n\n### Frequently Asked Question\n\n### ERROR: \"filename\": openBinaryFile: does not exist (No such file or directory)\n\nWhen using pandocker, you may encounter the following error message:\n\n```\n$ docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker foo.md\npandoc: \"filename\": openBinaryFile: does not exist (No such file or directory)\n```\n\nThis means that docker could not mount the local directory as a volume and\ntherefore pandoc cannot see the file `foo.md` inside the container. There might\nbe several reasons for that, here a few ideas to try:\n\n1. Add `--privileged` option to the pandocker command line. Read more about\n   this [docker privileged mode] here :\n   \u003chttps://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities\u003e\n\n2. Check if you have [SELinux] enforced on you system, with the command below:\n\n```console\nsestatus\n```\n\nIf the [SELinux] mode is `enforced`, you can try to lower it to `permissive`.\n\nMore info about [SELinux] here: \u003chttps://fedoraproject.org/wiki/SELinux_FAQ\u003e\n\n[SELinux]: https://fedoraproject.org/wiki/SELinux_FAQ\n[docker privileged mode]: https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalibo%2Fpandocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalibo%2Fpandocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalibo%2Fpandocker/lists"}