diff options
author | Leonardo Sandoval <leonardo.sandoval@linaro.org> | 2020-06-10 18:26:28 -0500 |
---|---|---|
committer | Leonardo Sandoval <leonardo.sandoval@linaro.org> | 2020-07-17 09:40:32 -0500 |
commit | 7be2b9838c3d0ff617eecb1c54749229ecd7ac2f (patch) | |
tree | 73bbd93a5c3fe2dd206cbe5af6137e8d6ad20d55 | |
parent | 2bdb4611ad6efdb3da2ff0d2de7fee4c43e95aeb (diff) | |
download | trusted-firmware-a-7be2b9838c3d0ff617eecb1c54749229ecd7ac2f.tar.gz |
doc: use docker to build documentation
docker (container) is another way to build the documentation and fortunately
there is already a docker image (sphinxdoc/sphinx) with sphinx so we can use
it to generate the documentation.
Change-Id: I06b0621cd7509a8279655e828680b92241b9fde4
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
-rw-r--r-- | docs/getting_started/docs-build.rst | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/docs/getting_started/docs-build.rst b/docs/getting_started/docs-build.rst index 91b1b3a397..87c677fcde 100644 --- a/docs/getting_started/docs-build.rst +++ b/docs/getting_started/docs-build.rst @@ -67,7 +67,7 @@ Output from the build process will be placed in: :: - docs/build/html/ + docs/build/html We also support building documentation in other formats. From the ``docs`` directory of the project, run the following command to see the supported @@ -79,6 +79,31 @@ top-level Makefile for |TF-A| itself. make help +Building rendered documentation from a container +------------------------------------------------ + +There may be cases where you can not either install or upgrade required +dependencies to generate the documents, so in this case, one way to +create the documentation is through a docker container. The first step is +to check if `docker`_ is installed in your host, otherwise check main docker +page for installation instructions. Once installed, run the following script +from project root directory + +.. code:: shell + + docker run --rm -v $PWD:/TF sphinxdoc/sphinx \ + bash -c 'cd /TF && \ + pip3 install plantuml -r ./docs/requirements.txt && make doc' + +The above command fetches the ``sphinxdoc/sphinx`` container from `docker +hub`_, launches the container, installs documentation requirements and finally +creates the documentation. Once done, exit the container and output from the +build process will be placed in: + +:: + + docs/build/html + -------------- *Copyright (c) 2019, Arm Limited. All rights reserved.* @@ -86,3 +111,5 @@ top-level Makefile for |TF-A| itself. .. _Sphinx: http://www.sphinx-doc.org/en/master/ .. _pip homepage: https://pip.pypa.io/en/stable/ .. _Dia: https://wiki.gnome.org/Apps/Dia +.. _docker: https://www.docker.com/ +.. _docker hub: https://hub.docker.com/repository/docker/sphinxdoc/sphinx |