This repo contains a collection of Dockerfiles to build various pandoc container images.
Contents
Docker images hosted here have a "core" version and a "latex" version:
- core:
pandocandpandoc-citeproc, as well as the appropriate backend for the full lua filtering backend (lua filters can call external modules). - latex: builds on top of the core image, and provides an as-minimal-as-possible
latex installation in addition. This includes all packages that
pandocmight use, and any libraries needed by these packages (such as image libraries needed by the latex graphics packages).
From there, the tagging scheme is either X.Y, latest, or edge.
X.Y: an officialpandocrelease (e.g.,2.6). Once anX.Ytag is pushed, it will not be re-built (unless there is a problem).latest: thelatesttag points to the most recentX.Yrelease. For example, if tags2.5and2.6were available online,latestwould be the same image as2.6.edge: the "bleeding edge" tag clones themasterbranch ofpandocandpandoc-citeproc. This tag is a moving target, and will be re-built at least once a month. The CI scripts have a cron job to build each image stack on the first of the month. However, changes to themasterbranch of this repository may also result in theedgetag being updated sooner.
The current latest tag for all images points to pandoc version 2.6.
- Core image:
pandoc/core- To build locally:
make alpine
- To build locally:
- Latex image:
pandoc/latex- To build locally:
make alpine-latex
- To build locally:
Suppose users desire a new image stack using a different base image. To make
the requirements clearer, assume the desire is to have a new image stack based
off ubuntu.
-
Create a top-level directory named
ubuntu. The name of this directory should be exactly the same as whatever theFROMclause will be, for consistency and clarity. -
Create
ubuntu/Dockerfile. ThisDockerfilewill be the "core"ubuntuimage, it should only containpandocandpandoc-citeproc. Refer to thealpine/Dockerfilefor assistance in how to create multiple layers. The idea is to create a base image, install all build dependencies andpandoc/pandoc-citeproc. Then create a new layer from the original base image and copy from the intermediate build layer. This way thepandoc/pandoc-citeprocare effectively the only additional items on top of the original base image. -
Add an
ubuntutarget to theMakefile. -
Create
ubuntu/latex/Dockerfileand install the latex dependencies. Use thealpine/latex/Dockerfileas a reference for what dependencies should be installed in addition to latex. -
Add an
ubuntu-latextarget to theMakefile. -
Now that your image stack has been defined (and tested!), update the CircleCI
.circleci/config.ymlfile to add a new build stack. Specifically, search foralpine_stack: &alpine_stack. An exampledifffor thisubuntustack could look like this:@@ -58,6 +58,9 @@ jobs: alpine_stack: &alpine_stack core_target: alpine latex_target: alpine-latex +ubuntu_stack: &ubuntu_stack + core_target: ubuntu + latex_target: ubuntu-latex # Setup builds for each commit, as well as monthly cron job. workflows: @@ -66,12 +69,17 @@ workflows: - lint - build_stack: <<: *alpine_stack + - build_stack: + <<: *ubuntu_stack monthly: # NOTE: make sure all `build_stack` calls here *also* set `cron_job: true`! jobs: - build_stack: <<: *alpine_stack cron_job: true + - build_stack: + <<: *ubuntu_stack + cron_job: true
You should not need to edit anything else in this file!
-
Update this file (README.md) to include a listing of this new image stack. Create a new h2 heading (
Ubuntu Linuxin this example) underneathAll Image Stacksheading. Please keep this alphabetical. Please also make sure to create a hyperlink under the**Contents**listing at the top of this file for browsing convenience. -
Open a Pull Request for review!
When pandoc has a new official release, the following steps must be performed
in this exact order:
-
Create a pull request from a branch. Edit the
Current `latest` Tagsection to include the newpandocrelease number. Suppose we are releasing image stacks forpandocversion 9.8:$ git checkout -b release/9.8 # ... edit current :latest ... $ git add README.md $ git commit -m 'release=9.8' $ git push -u origin release/9.8
The important part is the commit message. The build script looks for exactly
release=[0-9]\.[0-9]in the message, and if found performs the additional tagging to:latest. So the diff does not really matter, just the message.Create a pull request first to make sure all image stacks build as expected.
-
Assuming the pull request build succeeds, merge to
masterbranch. The only time thatdocker pushis performed is when a commit hits themasterbranch of this repository.
Code in this repository is licensed under the GNU General Public License Version 2.