Skip to content

Update docker usage #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

28 changes: 14 additions & 14 deletions development/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/
1 change: 1 addition & 0 deletions watch.sh
Original file line number Diff line number Diff line change
@@ -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