From abe1d33de3e1d1700a439ef2f4d877b2f55c08ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rk=20S=C3=A1gi-Kaz=C3=A1r?= Date: Thu, 20 Oct 2016 15:42:54 +0200 Subject: [PATCH] Update docker usage --- Dockerfile | 21 --------------------- development/documentation.rst | 28 ++++++++++++++-------------- watch.sh | 1 + 3 files changed, 15 insertions(+), 35 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ccdf565..0000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM alpine:3.4 - -RUN set -xe \ - && apk --no-cache add \ - bash \ - enchant \ - aspell-en \ - git \ - make \ - python \ - py-pip - -ADD requirements.txt . - -RUN pip install -r requirements.txt --no-cache-dir - -WORKDIR /doc - -VOLUME ["/doc"] - -CMD ["/bin/bash"] diff --git a/development/documentation.rst b/development/documentation.rst index d10a681..ef73812 100644 --- a/development/documentation.rst +++ b/development/documentation.rst @@ -22,30 +22,29 @@ If you are using docker. Run the following commands from the repository root. .. code-block:: bash - $ docker run --rm -it -v "$PWD":/doc phphttp/documentation - $ # You are now in the docker image - $ make html - $ make spelling + $ docker run --rm -t -v "$PWD":/doc webplates/readthedocs build + $ docker run --rm -t -v "$PWD":/doc webplates/readthedocs check -Alternatively you can run the commands directly from the host -without entering the container shell: +Alternatively you can run the make commands as well: .. code-block:: bash - $ docker run --rm -t -v "$PWD":/doc phphttp/documentation make html - $ docker run --rm -t -v "$PWD":/doc phphttp/documentation make spelling + $ docker run --rm -t -v "$PWD":/doc webplates/readthedocs make html + $ docker run --rm -t -v "$PWD":/doc webplates/readthedocs make spelling -.. warning:: +To automatically rebuild the documentation upon change run: + +.. code-block:: bash - The Docker container runs with `root` user by default - which means the owner of the generated files will be `root` - on the host too. + $ docker run --rm -t -v "$PWD":/doc webplates/readthedocs watch + +For more details see the `readthedocs image`_ documentation. Build Documentation ------------------- -Before we can build the documentation we have to make sure to install all requirements. +Before building the documentation make sure to install all requirements. .. code-block:: bash @@ -58,6 +57,7 @@ To build the docs: $ make html $ make spelling + .. _Sphinx installation page: http://sphinx-doc.org/latest/install.html .. _install enchant: http://www.abisource.com/projects/enchant/ - +.. _readthedocs image: https://hub.docker.com/r/webplates/readthedocs/ diff --git a/watch.sh b/watch.sh index f244c53..5a21ee0 100755 --- a/watch.sh +++ b/watch.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +# Note: --include is not available in all versions of inotifywait while inotifywait -e modify -r --include ".+?\.rst" .; do make html done