Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skyzyx/alpine-pandoc
Docker container with Alpine Linux, Pandoc, PlantUML, and Sphinx.
https://github.com/skyzyx/alpine-pandoc
alpine-linux container docker documentation haskell java pandoc plantuml python sphinx
Last synced: 5 days ago
JSON representation
Docker container with Alpine Linux, Pandoc, PlantUML, and Sphinx.
- Host: GitHub
- URL: https://github.com/skyzyx/alpine-pandoc
- Owner: skyzyx
- License: mit
- Created: 2017-10-12T23:14:34.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-02T08:41:33.000Z (about 5 years ago)
- Last Synced: 2024-06-09T16:42:23.198Z (5 months ago)
- Topics: alpine-linux, container, docker, documentation, haskell, java, pandoc, plantuml, python, sphinx
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/skyzyx/alpine-pandoc/
- Size: 16.6 KB
- Stars: 20
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alpine-pandoc
![MicroBadger Size (tag)](https://img.shields.io/microbadger/image-size/skyzyx/alpine-pandoc/1.2.0?style=for-the-badge)
![MicroBadger Layers (tag)](https://img.shields.io/microbadger/layers/skyzyx/alpine-pandoc/1.2.0?style=for-the-badge)
![Docker Pulls](https://img.shields.io/docker/pulls/skyzyx/alpine-pandoc?style=for-the-badge)
![Docker Stars](https://img.shields.io/docker/stars/skyzyx/alpine-pandoc?style=for-the-badge)This is the source code which builds a Docker container comprised of Alpine Linux, [Pandoc], and [PlantUML].
It is intended to provide an environment which is optimized for generating documentation.We use:
* [Pandoc] (Haskell) to convert [Markdown] into HTML, [reStructuredText] or PDF.
* [PlantUML] (Java) to convert UML diagrams to SVG or PNG images.## Building the Container
```bash
make
```## Consuming the Container
The short version is `FROM skyzyx/alpine-pandoc:1.2.0`.
1. Compiling Pandoc takes some time, so using this container saves you that time.
1. Build your own container with your own specific dependencies using `RUN` commands.
1. Use something like [Docker Compose] to mount your documentation source to `/var/docs`.
1. Add your documentation-building task as an `ENTRYPOINT`.`docker-compose up` the first time (or with `--build`) will build your custom container, then run your `ENTRYPOINT` task.
Subsequent runs of `docker-compose up` will only execute your `ENTRYPOINT` task.### Sample `Dockerfile`
#### Using [Sphinx]
```Dockerfile
FROM skyzyx/alpine-pandoc:1.2.0ENV PERSISTENT_DEPS wget git mercurial make openssh sphinx
ENV SPHINXBUILD /usr/bin/sphinx-build
ENV SPHINXOPTS -T# Copy Source code and set working directory
COPY src /var/docs
WORKDIR /var/docsUSER root
RUN apk add --no-cache --virtual .persistent-deps $PERSISTENT_DEPS
RUN pip install -r requirements.txtENTRYPOINT ["make", "docs"]
```#### Using [XeTeX] and [pandoc-plantuml-filter]
```Dockerfile
FROM skyzyx/alpine-pandoc:1.2.0USER root
ENV DEPS \
make \
texlive-xetex
RUN apk add --no-cache $DEPS && \
pip install pandoc-plantuml-filterUSER pandoc
ENTRYPOINT ["make", "docs"]# make ultimately calls:
# pandoc --filter=pandoc-plantuml
# --output=out.pdf
# --from=markdown
# *.md
```### Sample `docker-compose.yml`
```yaml
version: "3"
services:
documentation-builder:
build: .
volumes:
- ./src:/var/docs
```[Docker Compose]: https://docs.docker.com/compose/
[Markdown]: http://commonmark.org
[Pandoc]: http://pandoc.org
[pandoc-plantuml-filter]: https://github.com/timofurrer/pandoc-plantuml-filter
[PlantUML]: http://plantuml.com
[reStructuredText]: http://docutils.sourceforge.net/rst.html
[Sphinx]: http://www.sphinx-doc.org
[XeTeX]: http://xetex.sourceforge.net/