1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs
Michael Crosby 6d5bdff394 Add flag to enable cross domain requests in Api
Add the -api-enable-cors flag when running docker
in daemon mode to allow CORS requests to be made to
the Remote Api.  The default value is false for this
flag to not allow cross origin request to be made.

Also added a handler for OPTIONS requests the standard
for cross domain requests is to initially make an
OPTIONS request to the api.
2013-06-03 21:39:00 -04:00
..
sources Add flag to enable cross domain requests in Api 2013-06-03 21:39:00 -04:00
theme Documented who decides what and how. 2013-05-28 19:39:09 -07:00
website Spelling correction in docs 2013-06-01 21:48:32 -04:00
MAINTAINERS Documented who decides what and how. 2013-05-28 19:39:09 -07:00
Makefile Add make server command to preview docs 2013-06-01 21:25:51 -07:00
README.md Make style consistent 2013-06-01 21:26:58 -07:00
requirements.txt added new sphinx contrib extention for better REST API docs, and changed the index search API so that it uses the new docs, as a test to make sure it works correctly 2013-05-06 13:38:51 -04:00

Docker documentation and website

Documentation

This is your definite place to contribute to the docker documentation. The documentation is generated from the .rst files under sources.

The folder also contains the other files to create the http://docker.io website, but you can generally ignore most of those.

Installation

  • Work in your own fork of the code, we accept pull requests.
  • 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
  • If pip is not available you can probably install it using your favorite package manager as python-pip

Usage

  • 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.
  • To preview what you have generated run make server and open http://localhost:8000/ in your favorite browser.

Working using GitHub's file editor

Alternatively, for small changes and typo's you might want to use GitHub's built in file editor. It allows you to preview your changes right online. Just be carefull not to create many commits.

Images

When you need to add images, try to make them as small as possible (e.g. as gif).

Notes

  • The index.html and gettingstarted.html files are copied from the source dir to the output dir without modification. So changes to those pages should be made directly in html
  • For the template the css is compiled from less. When changes are needed they can be compiled using 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

    Start without $, so it's easy to copy and paste.