2013-07-31 16:59:56 -04:00
|
|
|
Docker Documentation
|
|
|
|
====================
|
2013-03-22 00:47:14 -04:00
|
|
|
|
2013-03-25 23:48:04 -04:00
|
|
|
Documentation
|
|
|
|
-------------
|
2013-07-31 16:59:56 -04:00
|
|
|
This is your definite place to contribute to the docker documentation. After each push to master the documentation
|
|
|
|
is automatically generated and made available on [docs.docker.io](http://docs.docker.io)
|
2013-03-25 23:48:04 -04:00
|
|
|
|
2013-07-31 16:59:56 -04:00
|
|
|
Each of the .rst files under sources reflects a page on the documentation.
|
2013-03-25 23:48:04 -04:00
|
|
|
|
|
|
|
Installation
|
2013-03-25 22:52:52 -04:00
|
|
|
------------
|
|
|
|
|
2013-03-25 23:48:04 -04:00
|
|
|
* Work in your own fork of the code, we accept pull requests.
|
2013-06-02 00:26:18 -04:00
|
|
|
* Install sphinx: `pip install sphinx`
|
|
|
|
* Mac OS X: `[sudo] pip-2.7 install sphinx`)
|
|
|
|
* Install sphinx httpdomain contrib package: `pip install sphinxcontrib-httpdomain`
|
|
|
|
* Mac OS X: `[sudo] pip-2.7 install sphinxcontrib-httpdomain`
|
2013-03-25 23:48:04 -04:00
|
|
|
* If pip is not available you can probably install it using your favorite package manager as **python-pip**
|
2013-03-25 22:52:52 -04:00
|
|
|
|
|
|
|
Usage
|
|
|
|
-----
|
2013-06-02 00:26:54 -04:00
|
|
|
* Change the `.rst` files with your favorite editor to your liking.
|
|
|
|
* Run `make docs` to clean up old files and generate new ones.
|
|
|
|
* Your static website can now be found in the `_build` directory.
|
2013-08-05 18:55:40 -04:00
|
|
|
* To preview what you have generated run `make server` and open http://localhost:8000/ in your favorite browser.
|
2013-03-25 23:48:04 -04:00
|
|
|
|
2013-06-02 00:26:54 -04:00
|
|
|
Working using GitHub's file editor
|
2013-03-25 23:48:04 -04:00
|
|
|
----------------------------------
|
2013-06-02 00:26:54 -04:00
|
|
|
Alternatively, for small changes and typo's you might want to use GitHub's built in file editor. It allows
|
2013-08-12 13:53:06 -04:00
|
|
|
you to preview your changes right online. Just be careful not to create many commits.
|
2013-03-25 23:48:04 -04:00
|
|
|
|
|
|
|
Images
|
|
|
|
------
|
|
|
|
When you need to add images, try to make them as small as possible (e.g. as gif).
|
2013-03-25 22:52:52 -04:00
|
|
|
|
|
|
|
Notes
|
|
|
|
-----
|
2013-03-25 23:48:04 -04:00
|
|
|
* For the template the css is compiled from less. When changes are needed they can be compiled using
|
2013-04-08 23:10:47 -04:00
|
|
|
lessc ``lessc main.less`` or watched using watch-lessc ``watch-lessc -i main.less -o main.css``
|
|
|
|
|
|
|
|
Guides on using sphinx
|
|
|
|
----------------------
|
|
|
|
* To make links to certain pages create a link target like so:
|
|
|
|
|
|
|
|
```
|
|
|
|
.. _hello_world:
|
|
|
|
|
|
|
|
Hello world
|
|
|
|
===========
|
|
|
|
|
|
|
|
This is.. (etc.)
|
|
|
|
```
|
|
|
|
|
|
|
|
The ``_hello_world:`` will make it possible to link to this position (page and marker) from all other pages.
|
|
|
|
|
|
|
|
* Notes, warnings and alarms
|
|
|
|
|
|
|
|
```
|
|
|
|
# a note (use when something is important)
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
# a warning (orange)
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
# danger (red, use sparsely)
|
|
|
|
.. danger::
|
|
|
|
|
|
|
|
* Code examples
|
|
|
|
|
2013-06-02 00:26:54 -04:00
|
|
|
Start without $, so it's easy to copy and paste.
|
2013-07-25 20:19:58 -04:00
|
|
|
|
2013-07-31 16:44:10 -04:00
|
|
|
Manpages
|
|
|
|
--------
|
|
|
|
|
2013-07-31 16:59:56 -04:00
|
|
|
* To make the manpages, simply run 'make man'. Please note there is a bug in spinx 1.1.3 which makes this fail.
|
2013-07-31 16:44:10 -04:00
|
|
|
Upgrade to the latest version of sphinx.
|
|
|
|
* Then preview the manpage by running `man _build/man/docker.1`, where _build/man/docker.1 is the path to the generated
|
|
|
|
manfile
|
2013-07-31 16:59:56 -04:00
|
|
|
* The manpages are also autogenerated by our hosted readthedocs here: http://docs-docker.dotcloud.com/projects/docker/downloads/
|