Skip to content

Commit

Permalink
Add Sphinx build environment in Docker
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Michal Sidor authored and amalinowsk2 committed Oct 16, 2018
1 parent ef7ef37 commit ef8a468
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -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}

21 changes: 21 additions & 0 deletions doc/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM alpine:3.8
LABEL maintainer="Michal Sidor <[email protected]>"

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

0 comments on commit ef8a468

Please sign in to comment.