This image is intended to build sphinx documentations .
*latest : based on sphinxdoc/sphinx
, so capable of producing html and epub
*latexpdf : based on sphinxdoc/sphinx-latexpdf
, so capable of producing html, epub and pdf
If you want to produce a pdf documentation, please replace latest
in the examples below with latexpdf
docker pull lan2play/docker-sphinxbuild:latest;
run in the docs Folder
docker run -it --rm -v $PWD:/docs -e USERID=$(id -u ${USER}) -e GROUPID=$(id -g ${USER}) lan2play/docker-sphinxbuild:latest
run in the docs Folder
docker run -it --rm -v $PWD:/docs -e Task=intl -e USERID=$(id -u ${USER}) -e GROUPID=$(id -g ${USER}) lan2play/docker-sphinxbuild:latest
- if a
requirements.txt
exists,pip3 install -r requirements.txt
will be executed before the MakeCommands - if you want to cache the pip packages, you can set the env
CACHE=TRUE
and mount/cache
to some folder on your system. This will cache/usr/local/lib/python*/site-packages
and/usr/local/bin
. For example:
docker run -it --rm -v $PWD:/docs -v $PWD/cache:/cache -e CACHE=TRUE -e MakeCommands=html,epub lan2play/docker-sphinxbuild:latest
- if you do not set the
USERID
orGROUPID
env variable, the build folder will be owned by root - the
MakeCommands
env variable is set tohtml
by default, to execute themake html
command. if you want to use something else or multiple, you can overwrite it like this:
docker run -it --rm -v $PWD:/docs -e MakeCommands=html,epub lan2play/docker-sphinxbuild:latest
- if you want to specify multiple intl languages (or change the de default) on the intl task, you can just add them with
-e IntlLangs=de,fr
- if you want to specify a different output on the intl task than
build/gettext
, you can just add them with-e IntlOut=de,fr