This image can be used to write Sphinx docs and check HTML rendering.
Starting the Container
Locate your Sphinx project directory (e.g. /my/sphinx/project) and launch the docker container as follows.
docker run -d --name sphinx --volume /my/sphinx/project:/docs -p 8000:8000 sncr/sphinx
Then, wait a minute and open http://localhost:8000/.
Port 8000 is used by sphinx-autobuild. For sphinx-autobuild to work, make sure that your Sphinx Makefile includes the following target.
livehtml: sphinx-autobuild --host 0.0.0.0 -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
Your built HTML documentation will be available at http://localhost:8000/. When you change the source document, the HTML will be built automatically and the page will refresh itself. (WARNING: On Windows, the auto-build and auto-refresh doesn't work.)
Executing Sphinx Commands Manually
If you want to interact with sphinx manually, you can open a shell in the container and run make commands.
docker exec -it sphinx /bin/sh make clean make html