Skip to content

Commit

Permalink
Add README and pandoc-include-code filter
Browse files Browse the repository at this point in the history
  • Loading branch information
groovytron committed Apr 23, 2019
1 parent 9f354ca commit f58512d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

FROM ubuntu:bionic

ARG PANDOC_VERSION=2.7.1
ARG PANDOC_VERSION=2.7.2
ARG PANDOC_CROSSREF_VERSION=0.3.4.0d
ARG PANDOC_INCLUDE_CODE_VERSION=1.2.0.2

ENV DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -40,7 +41,12 @@ RUN apt-get update \
--output-document pandoc-crossref.tar.gz \
--quiet \
&& tar xf pandoc-crossref.tar.gz \
&& mv pandoc-crossref /usr/local/bin
&& mv pandoc-crossref /usr/local/bin \
&& wget https://github.com/owickstrom/pandoc-include-code/releases/download/v${PANDOC_INCLUDE_CODE_VERSION}/pandoc-include-code-linux-ghc8-pandoc-1-19.tar.gz \
--output-document pandoc-include-code.tar.gz \
--quiet \
&& tar xf pandoc-include-code.tar.gz \
&& mv pandoc-include-code /usr/local/bin


# Set the locale
Expand All @@ -63,7 +69,8 @@ WORKDIR /home/dev/doc

# Fix permissions issues
RUN chmod -R a+wrx /home/dev/doc
RUN chmod -R a+wrx /usr/local/bin/pandoc-crossref
RUN chmod -R a+rx /usr/local/bin/pandoc-crossref
RUN chmod -R a+rx /usr/local/bin/pandoc-include-code

# Label schema related variables and metadata
ARG BUILD_DATE
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Pandoc container

[![Build Status](https://travis-ci.org/groovytron/pandoc-container.svg?branch=master)](https://travis-ci.org/groovytron/pandoc-container)

Container embedding pandoc and some pandoc filter to convert files from a format to another.

## Softwares embedded in the container

- `make`
- [pandoc](https://pandoc.org)
- [pandoc-crossref](https://github.com/lierdakil/pandoc-crossref) filter
- [pandoc-include-code](https://github.com/owickstrom/pandoc-include-code) filter

## Use the container

We recommend you to use the `dev` user instead of `root` when running that container.

The container's working directory is `/home/dev/doc` so we advise you to mount your project's documentation directory onto this place.

### Building the project interactively in the container

To run the container and open a bash in your documentation project run the following command:

`docker run -it --entrypoint /bin/bash --user=dev --volume=<path-to-your-documentation-directory>:/home/dev/doc groovytron/pandoc:latest`

0 comments on commit f58512d

Please sign in to comment.