From ef8a4684bc3a45b3585c378fa2a7a7be34445f37 Mon Sep 17 00:00:00 2001 From: Michal Sidor Date: Wed, 18 Jul 2018 16:16:40 +0200 Subject: [PATCH] Add Sphinx build environment in Docker Custom Docker file including: - support for Python (required by Sphinx) - Java (required by plantuml plugin) - a few Sphinx plugins also required for other SLAV stack projects (refer to the Dockerfile) This image does not provide `python`. Please use `python3`. Change-Id: I10cf39a0fe0dc3cf35c9110b2680cca9a799ee0e Signed-off-by: Michal Sidor --- doc/Makefile | 17 +++++++++++++++++ doc/docker/Dockerfile | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 doc/Makefile create mode 100644 doc/docker/Dockerfile diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..bb3827d --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,17 @@ +DOCKER_IMAGE = muxpi-doc-image +DOCKER_CONTAINER = muxpi-doc-container +DOCKER_CONTAINER_WORKDIR = /doc + +.PHONY: all clean build-docker-image clean-docker + +all: build-docker-image + +clean: clean-docker + +build-docker-image: + docker build -t ${DOCKER_IMAGE} docker + +clean-docker: + -docker rm ${DOCKER_CONTAINER} + -docker rmi ${DOCKER_IMAGE} + diff --git a/doc/docker/Dockerfile b/doc/docker/Dockerfile new file mode 100644 index 0000000..d2ad2f5 --- /dev/null +++ b/doc/docker/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:3.8 +LABEL maintainer="Michal Sidor " + +ENV PLANTUML_VERSION 1.2018.8 + +RUN mkdir -p /opt/plantuml \ + && wget https://sourceforge.net/projects/plantuml/files/plantuml.${PLANTUML_VERSION}.jar/download -O /opt/plantuml/plantuml.jar +RUN apk --no-cache add python3 make openjdk8-jre-base graphviz ttf-freefont \ + libjpeg-turbo zlib tiff \ + && apk --no-cache add -t .makedepends libjpeg-turbo-dev zlib-dev tiff-dev \ + python3-dev build-base +RUN pip3 install --upgrade pip setuptools \ + && pip3 install 'Pillow >=5.2.0,<5.3' 'Sphinx >=1.8.0,<1.9' \ + 'sphinxcontrib-plantuml ==0.11' 'sphinxcontrib-actdiag >=0.8.0,<0.9' \ + 'sphinxcontrib-blockdiag >=1.5.0,<1.6' 'sphinxcontrib-seqdiag >=0.8.0,<0.9' \ + && apk --no-cache del .makedepends + +ENV DATA_DIR=/doc JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk + +WORKDIR $DATA_DIR +VOLUME $DATA_DIR