2013-07-31 13:59:56 -07:00
|
|
|
Docker Documentation
|
|
|
|
====================
|
2013-03-21 21:47:14 -07:00
|
|
|
|
2013-10-15 15:52:21 -07:00
|
|
|
Overview
|
|
|
|
--------
|
2013-03-25 20:48:04 -07:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
The source for Docker documentation is here under ``sources/`` and uses
|
|
|
|
extended Markdown, as implemented by [mkdocs](http://mkdocs.org).
|
|
|
|
|
|
|
|
The HTML files are built and hosted on https://docs.docker.io, and update
|
2013-10-15 15:52:21 -07:00
|
|
|
automatically after each change to the master or release branch of the
|
|
|
|
[docker files on GitHub](https://github.com/dotcloud/docker) thanks to
|
|
|
|
post-commit hooks. The "release" branch maps to the "latest"
|
2014-04-15 06:01:25 +00:00
|
|
|
documentation and the "master" (unreleased development) branch maps to the "master"
|
2013-10-15 15:52:21 -07:00
|
|
|
documentation.
|
|
|
|
|
2014-02-18 19:21:12 -08:00
|
|
|
## Branches
|
|
|
|
|
|
|
|
**There are two branches related to editing docs**: ``master`` and a
|
|
|
|
``doc*`` branch (currently ``doc0.8.1``). You should normally edit
|
2014-04-15 06:01:25 +00:00
|
|
|
docs on a local branch of the ``master`` branch. That way your fixes
|
|
|
|
will automatically get included in later releases, and docs maintainers
|
|
|
|
can easily cherry-pick your changes to bring over to the current docs
|
|
|
|
branch. In the rare case where your change is not forward-compatible,
|
|
|
|
then you could base your change on the appropriate ``doc*`` branch.
|
2014-02-18 19:21:12 -08:00
|
|
|
|
|
|
|
Now that we have a ``doc*`` branch, we can keep the ``latest`` docs
|
|
|
|
up to date with any bugs found between ``docker`` code releases.
|
|
|
|
|
|
|
|
**Warning**: When *reading* the docs, the ``master`` documentation may
|
|
|
|
include features not yet part of any official docker
|
|
|
|
release. ``Master`` docs should be used only for understanding
|
|
|
|
bleeding-edge development and ``latest`` (which points to the ``doc*``
|
|
|
|
branch``) should be used for the latest official release.
|
2013-10-15 15:52:21 -07:00
|
|
|
|
|
|
|
Getting Started
|
|
|
|
---------------
|
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
Docker documentation builds are done in a docker container, which installs all
|
|
|
|
the required tools, adds the local ``docs/`` directory and builds the HTML
|
|
|
|
docs. It then starts a simple HTTP server on port 8000 so that you can connect
|
|
|
|
and see your changes.
|
2013-10-15 15:52:21 -07:00
|
|
|
|
2013-12-06 12:52:32 +10:00
|
|
|
In the ``docker`` source directory, run:
|
2013-12-11 10:14:56 +10:00
|
|
|
```make docs```
|
2013-12-06 12:52:32 +10:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
If you have any issues you need to debug, you can use ``make docs-shell`` and
|
|
|
|
then run ``mkdocs serve``
|
2013-10-29 10:39:44 +10:00
|
|
|
|
2014-02-18 19:21:12 -08:00
|
|
|
# Contributing
|
|
|
|
|
|
|
|
## Normal Case:
|
|
|
|
|
|
|
|
* Follow the contribution guidelines ([see
|
2014-02-18 19:25:43 -08:00
|
|
|
``../CONTRIBUTING.md``](../CONTRIBUTING.md)).
|
|
|
|
* [Remember to sign your work!](../CONTRIBUTING.md#sign-your-work)
|
2013-10-15 15:52:21 -07:00
|
|
|
* Work in your own fork of the code, we accept pull requests.
|
2014-04-15 06:01:25 +00:00
|
|
|
* Change the ``.md`` files with your favorite editor -- try to keep the
|
|
|
|
lines short (80 chars) and respect Markdown conventions.
|
2013-10-15 15:52:21 -07:00
|
|
|
* Run ``make clean docs`` to clean up old files and generate new ones,
|
|
|
|
or just ``make docs`` to update after small changes.
|
|
|
|
* Your static website can now be found in the ``_build`` directory.
|
|
|
|
* To preview what you have generated run ``make server`` and open
|
|
|
|
http://localhost:8000/ in your favorite browser.
|
|
|
|
|
|
|
|
``make clean docs`` must complete without any warnings or errors.
|
2013-03-25 20:48:04 -07:00
|
|
|
|
2013-06-01 21:26:54 -07:00
|
|
|
Working using GitHub's file editor
|
2013-03-25 20:48:04 -07:00
|
|
|
----------------------------------
|
2013-10-15 15:52:21 -07:00
|
|
|
|
|
|
|
Alternatively, for small changes and typos you might want to use
|
|
|
|
GitHub's built in file editor. It allows you to preview your changes
|
|
|
|
right online (though there can be some differences between GitHub
|
2014-04-15 06:01:25 +00:00
|
|
|
Markdown and mkdocs Markdown). Just be careful not to create many commits.
|
2014-02-18 19:25:43 -08:00
|
|
|
And you must still [sign your work!](../CONTRIBUTING.md#sign-your-work)
|
2013-03-25 20:48:04 -07:00
|
|
|
|
|
|
|
Images
|
|
|
|
------
|
2013-10-15 15:52:21 -07:00
|
|
|
|
|
|
|
When you need to add images, try to make them as small as possible
|
|
|
|
(e.g. as gif). Usually images should go in the same directory as the
|
2014-04-15 06:01:25 +00:00
|
|
|
.md file which references them, or in a subdirectory if one already
|
2013-10-15 15:52:21 -07:00
|
|
|
exists.
|
2013-03-25 19:52:52 -07:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
Publishing Documentation
|
|
|
|
------------------------
|
2014-02-18 19:21:12 -08:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
To publish a copy of the documentation you need a ``docs/awsconfig``
|
|
|
|
file containing AWS settings to deploy to. The release script will
|
|
|
|
create an s3 if needed, and will then push the files to it.
|
2013-04-08 20:10:47 -07:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
```
|
|
|
|
[profile dowideit-docs]
|
|
|
|
aws_access_key_id = IHOIUAHSIDH234rwf....
|
|
|
|
aws_secret_access_key = OIUYSADJHLKUHQWIUHE......
|
|
|
|
region = ap-southeast-2
|
|
|
|
```
|
2013-04-08 20:10:47 -07:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
The ``profile`` name must be the same as the name of the bucket you are
|
|
|
|
deploying to - which you call from the docker directory:
|
2013-07-31 13:44:10 -07:00
|
|
|
|
2014-04-15 06:01:25 +00:00
|
|
|
``make AWS_S3_BUCKET=dowideit-docs docs-release``
|
2013-10-15 15:52:21 -07:00
|
|
|
|