2013-07-31 16:59:56 -04:00
|
|
|
Docker Documentation
|
|
|
|
====================
|
2013-03-22 00:47:14 -04:00
|
|
|
|
2013-10-15 18:52:21 -04:00
|
|
|
Overview
|
|
|
|
--------
|
2013-03-25 23:48:04 -04:00
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
The source for Docker documentation is here under `sources/` and uses
|
2014-04-15 02:01:25 -04:00
|
|
|
extended Markdown, as implemented by [mkdocs](http://mkdocs.org).
|
|
|
|
|
2014-04-26 08:10:19 -04:00
|
|
|
The HTML files are built and hosted on `https://docs.docker.io`, and
|
|
|
|
update automatically after each change to the master or release branch
|
|
|
|
of [Docker on GitHub](https://github.com/dotcloud/docker)
|
|
|
|
thanks to post-commit hooks. The "docs" branch maps to the "latest"
|
|
|
|
documentation and the "master" (unreleased development) branch maps to
|
|
|
|
the "master" documentation.
|
2013-10-15 18:52:21 -04:00
|
|
|
|
2014-02-18 22:21:12 -05:00
|
|
|
## Branches
|
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
**There are two branches related to editing docs**: `master` and a
|
|
|
|
`docs` branch. You should always edit documentation on a local branch
|
|
|
|
of the `master` branch, and send a PR against `master`.
|
2014-04-26 08:10:19 -04:00
|
|
|
|
|
|
|
That way your fixes will automatically get included in later releases,
|
|
|
|
and docs maintainers can easily cherry-pick your changes into the
|
2014-04-26 09:53:17 -04:00
|
|
|
`docs` release branch. In the rare case where your change is not
|
|
|
|
forward-compatible, you may need to base your changes on the `docs`
|
2014-04-26 08:10:19 -04:00
|
|
|
branch.
|
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
Also, now that we have a `docs` branch, we can keep the
|
2014-04-26 08:10:19 -04:00
|
|
|
[http://docs.docker.io](http://docs.docker.io) docs up to date with any
|
2014-04-26 09:53:17 -04:00
|
|
|
bugs found between `docker` code releases.
|
2014-04-26 08:10:19 -04:00
|
|
|
|
|
|
|
**Warning**: When *reading* the docs, the
|
|
|
|
[http://beta-docs.docker.io](http://beta-docs.docker.io) documentation
|
|
|
|
may include features not yet part of any official docker release. The
|
2014-04-26 09:53:17 -04:00
|
|
|
`beta-docs` site should be used only for understanding bleeding-edge
|
|
|
|
development and `docs.docker.io` (which points to the `docs`
|
|
|
|
branch`) should be used for the latest official release.
|
2013-10-15 18:52:21 -04:00
|
|
|
|
|
|
|
Getting Started
|
|
|
|
---------------
|
|
|
|
|
2014-04-26 08:10:19 -04:00
|
|
|
Docker documentation builds are done in a Docker container, which
|
2014-04-26 09:53:17 -04:00
|
|
|
installs all the required tools, adds the local `docs/` directory and
|
2014-04-26 08:10:19 -04:00
|
|
|
builds the HTML docs. It then starts a HTTP server on port 8000 so that
|
|
|
|
you can connect and see your changes.
|
2013-10-15 18:52:21 -04:00
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
In the root of the `docker` source directory:
|
2014-04-26 08:10:19 -04:00
|
|
|
|
|
|
|
cd docker
|
|
|
|
|
|
|
|
Run:
|
|
|
|
|
|
|
|
make docs
|
2013-12-05 21:52:32 -05:00
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
If you have any issues you need to debug, you can use `make docs-shell` and
|
|
|
|
then run `mkdocs serve`
|
2013-10-28 20:39:44 -04:00
|
|
|
|
2014-02-18 22:21:12 -05:00
|
|
|
# Contributing
|
|
|
|
|
|
|
|
* Follow the contribution guidelines ([see
|
2014-04-26 09:53:17 -04:00
|
|
|
`../CONTRIBUTING.md`](../CONTRIBUTING.md)).
|
2014-02-18 22:25:43 -05:00
|
|
|
* [Remember to sign your work!](../CONTRIBUTING.md#sign-your-work)
|
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-10-15 18:52:21 -04: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
|
2014-04-26 09:53:17 -04:00
|
|
|
right on-line (though there can be some differences between GitHub
|
2014-04-15 02:01:25 -04:00
|
|
|
Markdown and mkdocs Markdown). Just be careful not to create many commits.
|
2014-02-18 22:25:43 -05:00
|
|
|
And you must still [sign your work!](../CONTRIBUTING.md#sign-your-work)
|
2013-03-25 23:48:04 -04:00
|
|
|
|
|
|
|
Images
|
|
|
|
------
|
2013-10-15 18:52:21 -04:00
|
|
|
|
|
|
|
When you need to add images, try to make them as small as possible
|
2014-04-26 09:53:17 -04:00
|
|
|
(e.g. as gifs). Usually images should go in the same directory as the
|
|
|
|
`.md` file which references them, or in a subdirectory if one already
|
2013-10-15 18:52:21 -04:00
|
|
|
exists.
|
2013-03-25 22:52:52 -04:00
|
|
|
|
2014-04-15 02:01:25 -04:00
|
|
|
Publishing Documentation
|
|
|
|
------------------------
|
2014-02-18 22:21:12 -05:00
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
To publish a copy of the documentation you need a `docs/awsconfig`
|
2014-04-26 08:10:19 -04:00
|
|
|
file containing AWS settings to deploy to. The release script will
|
2014-04-15 02:01:25 -04:00
|
|
|
create an s3 if needed, and will then push the files to it.
|
2013-04-08 23:10:47 -04:00
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
[profile dowideit-docs]
|
|
|
|
aws_access_key_id = IHOIUAHSIDH234rwf....
|
|
|
|
aws_secret_access_key = OIUYSADJHLKUHQWIUHE......
|
|
|
|
region = ap-southeast-2
|
2013-04-08 23:10:47 -04:00
|
|
|
|
2014-04-26 09:53:17 -04: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 16:44:10 -04:00
|
|
|
|
2014-04-26 09:53:17 -04:00
|
|
|
make AWS_S3_BUCKET=dowideit-docs docs-release
|
2013-10-15 18:52:21 -04:00
|
|
|
|