moby--moby/docs
Nathan Hsieh c257dcc9a4 Squashed commit of the following:
commit 3f9e9185fe7ee51f2fe55f0fc0d4fffdc4f289dc
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Mon Oct 6 10:57:35 2014 -0700

    changed the title of back buttons

commit f86934424e85931ec293e711ceaa93ee920828fb
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Mon Oct 6 10:53:15 2014 -0700

    Finished level 2, refactored tests

commit 8f502bce05293cccaf200b69ce5f5826eee72484
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Mon Oct 6 08:52:37 2014 -0700

    stylized better and added level 2

commit 07b2276b346c34c0cc0faa57500c40e120e77888
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Fri Oct 3 18:17:29 2014 -0700

    broke tutorial tests styles

commit 35d84147dc2f65b0ffeea5faf304add903219b1e
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Fri Oct 3 17:23:48 2014 -0700

    structured test level1 md file

commit 808d01b0d55d67eb1017f290a29da6c7d38565f2
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Fri Oct 3 17:15:46 2014 -0700

    Modified files and integrated tutorial through new page

commit 0f0093f2882489c3eeb6f8870f2b8aa64dc939a3
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Thu Oct 2 14:34:44 2014 -0700

    more refactoring

commit 5a9b98e55ebd455ccf2c0ced20f984545a0b6d71
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Thu Oct 2 11:46:58 2014 -0700

    clean js code

commit af3bbd8d5e1dffdaa1780f83b909ff566906e513
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Thu Oct 2 11:26:39 2014 -0700

    level 1 cleanup

commit c4852a7766ab4fbd978d65c8352ace05eb427ef5
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Thu Oct 2 11:20:17 2014 -0700

    fixed up fill-in level1

commit 7f02d80942549dec9c05f784b777fcb32d5bb81b
Author: Nathan Hsieh <hsieh.nathan@gmail.com>
Date:   Wed Oct 1 17:45:42 2014 -0700

    added dockerfile tut, stylized lesson1 Questions

Signed-off-by: Nathan Hsieh <hsieh.nathan@gmail.com>
2014-10-08 13:46:44 -07:00
..
man Print a status message when pull command is executed 2014-10-01 22:55:29 +00:00
sources Squashed commit of the following: 2014-10-08 13:46:44 -07:00
theme Squashed commit of the following: 2014-10-08 13:46:44 -07:00
.gitignore move the man pages to the docs/ dir 2014-06-24 13:07:42 +10:00
Dockerfile Fixed issue with docs not getting built due to ssl error. 2014-10-01 21:11:10 -04:00
MAINTAINERS back from camping, and making fred the docs 'guy in charge' 2014-10-07 15:54:30 +10:00
README.md Merge pull request #7890 from fredlf/docs-cherry-pick-update-process 2014-09-05 09:58:18 +10:00
docs-update.py Prettify docs-update.py 2014-09-30 17:00:15 +01:00
mkdocs.yml Squashed commit of the following: 2014-10-08 13:46:44 -07:00
release.sh avoid publishing to the root unless specified, so old version releases only goto their own dir 2014-07-22 19:05:18 +10:00
s3_website.json one last missing redirect 2014-06-22 16:01:21 -07:00

README.md

Docker Documentation

The source for Docker documentation is here under sources/ and uses extended Markdown, as implemented by MkDocs.

The HTML files are built and hosted on https://docs.docker.com, and update automatically after each change to the master or release branch of Docker on GitHub thanks to post-commit hooks. The docs branch maps to the "latest" documentation and the master (unreleased development) branch maps to the "master" documentation.

Branches

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.

That way your fixes will automatically get included in later releases, and docs maintainers can easily cherry-pick your changes into the docs release branch. In the rare case where your change is not forward-compatible, you may need to base your changes on the docs branch.

Also, now that we have a docs branch, we can keep the http://docs.docker.com docs up to date with any bugs found between Docker code releases.

Warning: When reading the docs, the http://docs-stage.docker.com documentation may include features not yet part of any official Docker release. The beta-docs site should be used only for understanding bleeding-edge development and docs.docker.com (which points to the docs branch`) should be used for the latest official release.

Contributing

Getting Started

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 HTTP server on port 8000 so that you can connect and see your changes.

In the root of the docker source directory:

make docs

If you have any issues you need to debug, you can use make docs-shell and then run mkdocs serve

Style guide

The documentation is written with paragraphs wrapped at 80 column lines to make it easier for terminal use.

Examples

When writing examples, give the user hints by making them resemble what they see in their shell:

  • Indent shell examples by 4 spaces so they get rendered as code.
  • Start typed commands with $ (dollar space), so that they are easily differentiated from program output.
  • Program output has no prefix.
  • Comments begin with # (hash space).
  • In-container shell commands begin with $$ (dollar dollar space).

Images

When you need to add images, try to make them as small as possible (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 exists.

Working using GitHub's file editor

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 on-line (though there can be some differences between GitHub Markdown and MkDocs Markdown). Just be careful not to create many commits. And you must still sign your work!

Publishing Documentation

To publish a copy of the documentation you need to have Docker up and running on your machine. You'll also 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.

[profile dowideit-docs] aws_access_key_id = IHOIUAHSIDH234rwf....
aws_secret_access_key = OIUYSADJHLKUHQWIUHE......  region = ap-southeast-2

The profile name must be the same as the name of the bucket you are deploying to - which you call from the docker directory:

make AWS_S3_BUCKET=dowideit-docs docs-release

This will publish only to the http://bucket-url/v1.2/ version of the documentation.

If you're publishing the current release's documentation, you need to also update the root docs pages by running

make AWS_S3_BUCKET=dowideit-docs BUILD_ROOT=yes docs-release

Note: if you are using Boot2Docker on OSX and the above command returns an error, Post http:///var/run/docker.sock/build?rm=1&t=docker-docs%3Apost-1.2.0-docs_update-2: dial unix /var/run/docker.sock: no such file or directory', you need to set the Docker host. Run $(boot2docker shellinit)to see the correct variable to set. The command will return the fullexport` command, so you can just cut and paste.

Cherry-picking documentation changes to update an existing release.

Whenever the core team makes a release, they publish the documentation based on the release branch (which is copied into the docs branch). The documentation team can make updates in the meantime, by cherry-picking changes from master into any of the docs branches.

For example, to update the current release's docs:

git fetch upstream
git checkout -b post-1.2.0-docs-update-1 upstream/docs
# Then go through the Merge commit linked to PR's (making sure they apply
to that release)
# see https://github.com/docker/docker/commits/master
git cherry-pick -x fe845c4
# Repeat until you have cherry picked everything you will propose to be merged
git push upstream post-1.2.0-docs-update-1

Then make a pull request to merge into the docs branch, NOT into master.

Once the PR has the needed LGTMs, merge it, then publish to our beta server to test:

git fetch upstream
git checkout post-1.2.0-docs-update-1
git reset --hard upstream/post-1.2.0-docs-update-1
make AWS_S3_BUCKET=beta-docs.docker.io BUILD_ROOT=yes docs-release

Then go to http://beta-docs.docker.io.s3-website-us-west-2.amazonaws.com/ to view your results and make sure what you published is what you wanted.

When you're happy with it, publish the docs to our live site:

make AWS_S3_BUCKET=docs.docker.com BUILD_ROOT=yes docs-release

Note that the new docs will not appear live on the site until the cache (a complex, distributed CDN system) is flushed. This requires someone with S3 keys. Contact Docker (Sven Dowideit or John Costa) for assistance.