• Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    Shell
  • License
    BSD 3-Clause "New...
  • Created almost 8 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar

pandocker

github release Docker Image CI Last Commit

A simple docker image for pandoc with filters, templates, fonts and additional tools.

Install / Upgrade

Download the image with:

docker pull dalibo/pandocker:stable

Whenever a new stable version is released, launch that command again to refresh your image.

How To

Run dalibo/pandocker with regular pandoc args. Mount your files at /pandoc.

$ docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker README.md -o README.pdf

Notes about the docker options:

  • The -v ... option will mount the current folder as the /pandoc directory inside the container. If SELinux is enabled on your system, you might need to add the --privileged tag to force access to the mouting points. For more details, read the documentation about docker runtime privileges.
  • The --rm option destroys the container once the document is produced. This is not mandatory but it's a good practice.

  • The -u option ensures that the output files will belong to you. Again this is not necessary but it's useful.

Tip: You can define a shell alias to use pandocker just like pandoc. Add this to your ~/.bashrc :

$ alias pandoc="docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker:stable"
$ pandoc README.md -o README.epub

Alternatively, you can use a pipe like this:

$ cat foo.md | docker run --rm -i dalibo/pandocker -t pdf > foo.pdf

This method will not work if the source document contains images or includes...

Templates

We're shipping a selection of latex templates inside the image so that you can produce nice PDF documents without installing anything.

So far, we provide the 3 templates below:

  • eisvogel is designed for lecture notes and exercises with a focus on computer science. It works with pdflatex and xelatex.
  • easy templates is a collection of HTML templates
  • letter is for writing letters in markdown. Works only with xelatex

You can use them simply by adding --template=xxx to your compilation lines:

$ docker run [...] --pdf-engine=xelatex --template=eisvogel foo.md -o foo.pdf

Each template has specific variables that you can use to adapt the document. Please go the project page of each template for more details.

Filters

This docker image embeds a number of usefull pandoc filters. You can simply enable them by adding the option --filter xxx where xxx is the name of one of the following filters below:

NOTE: By default when using the pandoc-include filter, the path to target files is relative to the /pandoc mountpoint. For instance, the !include [foo/bar.md] statement will look for a /pandoc/foo/bar.md file. You can use the docker arg --workdir="some/place/elsewhere" to specify another location. The same principle applies to the pandoc-codeblock-include and pandoc-mustache filters.

Fonts

The pandocker image includes the following open-source fonts:

The full variant includes

Supported Tags : Branch + Variant + Parent

The image is available in multiple versions named as follows:

branch[-parent[-variant]]

  • The branch can be latest (default) or stable (for production) or the release name (20.02)
  • The parent is the base image we are using. Currently only ubuntu is supported
  • The variant is either extra (330MB) or full (810 MB)

The supported tags are :

  • latest, latest-ubuntu, latest-ubuntu-extra (default)
  • latest-ubuntu-full
  • stable, stable-ubuntu, stable-ubuntu-extra
  • stable-ubuntu-full

Other tags are not supported and should be used with care.

Build it

Use make or docker build .

Additional tools

The docker image embeds additional software related to editing and publishing:

  • dia a simple tool to design diagrams
  • poppler-utils a collection of tools built to manage PDF and extract content
  • rsync for deployment

These tools can be called by modifying the entrypoint of the image. For instance, you can convert a dia source file into an SVG image like this:

$ docker run [..] --entrypoint dia dalibo/pandocker foo.dia -e foo.svg

More Repositories

1

pev2

Postgres Explain Visualizer 2
TypeScript
2,492
star
2

pg_activity

pg_activity is a top like application for PostgreSQL server activity monitoring.
Python
2,472
star
3

sqlserver2pgsql

Migration tool to convert a Microsoft SQL Server Database into a PostgreSQL database, as automatically as possible
Perl
507
star
4

temboard

PostgreSQL Remote Control
Python
449
star
5

ldap2pg

🐘 πŸ‘₯ Manage PostgreSQL roles and privileges from YAML or LDAP
Go
208
star
6

pitrery

DEPRECATED. PostgreSQL Point In Time Recovery made easy
Shell
108
star
7

pgshark

Messing with PostgreSQL network traffic to make some usefull things
Perl
85
star
8

emaj

E-Maj is a PostgreSQL extension that tracks updates on tables sets with rollback capabilities
PLpgSQL
73
star
9

explain.dalibo.com

PEV2 Flask service. Visualizing and understanding PostgreSQL EXPLAIN plans made easy.
HTML
37
star
10

workshops

PostgreSQL Workshops
HTML
34
star
11

db2topg

Automated tool for DB2 migration to PostgreSQL, ala ora2pg
Perl
31
star
12

pgbadger

pgbadger.github.io
HTML
23
star
13

pgtoolkit

Postgres Support from Python
Python
21
star
14

temboard-agent

PostgreSQL Remote Control agent [MERGED IN dalibo/temboard]
Python
20
star
15

pgsnap

pgsnap is a PostgreSQL tool that mimics orasnap performance report tool for Oracle.
PHP
20
star
16

pg_log_authfail

C
16
star
17

pgsql-resource-agent

Simple Pacemaker OCF Agent for two PostgreSQL servers in streaming replication
Shell
11
star
18

docker

Docker images of Dalibo's projects
10
star
19

emaj_web

A web client for the E-Maj PostgreSQL extension
PHP
10
star
20

data2pg

PLpgSQL
10
star
21

check_patroni

A nagios plugin for patroni.
Python
7
star
22

pg_dumpacl

Tool for dumping database creation options
C
7
star
23

pgsql_logwatch

Monitor PostgreSQL logfile using Logwatch
ApacheConf
6
star
24

selinux-pgsql-pgdg

SELinux policy module for PGDG rpms
Shell
4
star
25

pg_query_settings

Module that dynamically set queries parameters based on their queryid
C
4
star
26

cornac

Migrated to GitLab
Python
4
star
27

docker-python26

Docker image with EOL Python 2.6
HTML
3
star
28

from-oracle-to-postgresql

Yet another transition guide for developers
HTML
3
star
29

patroni-rpm

Patroni RPM packaging (centos/rhel)
Shell
3
star
30

blog

🐘 blog.dalibo.com
HTML
3
star
31

hackingpg

DΓ©pΓ΄t relatif aux journΓ©es de hacking sur PostgreSQL
C
2
star
32

selinux-powa

SELinux policy for PoWA
Makefile
2
star
33

pgpool_adm

A PostgreSQL extension to control pgpool using its pcp protocol
C
2
star
34

pg_french_datatypes

A simple set of handy data types for french speaking PostgreSQL developpers
2
star
35

dalibo.github.io

Some PostgreSQL tools developped by DALIBO, the french PostgreSQL company
CSS
1
star
36

keyex

SSH Key Exchanger
Python
1
star
37

yang

Yet Another Nagios Grapher
JavaScript
1
star
38

docker-pgtap

1
star
39

docker-labs-sdk

Mutualised docker image for PostgreSQL tooling development
Dockerfile
1
star
40

docker-cornac-sdk

Docker image for CI and development of cornac
Makefile
1
star
41

vault-rpm

HashiCorp Vault RPM packaging for CentOS / RHEL 7
Shell
1
star
42

ansible-collection-dolibarr

Ansible collection to manage the lifecycle of your Dolibarr instance
Jinja
1
star