diff --git a/.gitignore b/.gitignore index cabd399067..be48820bbe 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,8 @@ command-line-arguments.test .flymake* docker.test auth/auth.test +.idea +.DS_Store +docs/_build +docs/_static +docs/_templates \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000000..f58854dcdb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sources +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" +# @echo " html to make standalone HTML files" +# @echo " dirhtml to make HTML files named index.html in directories" +# @echo " singlehtml to make a single large HTML file" +# @echo " pickle to make pickle files" +# @echo " json to make JSON files" +# @echo " htmlhelp to make HTML files and a HTML help project" +# @echo " qthelp to make HTML files and a qthelp project" +# @echo " devhelp to make HTML files and a Devhelp project" +# @echo " epub to make an epub" +# @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" +# @echo " latexpdf to make LaTeX files and run them through pdflatex" +# @echo " text to make text files" +# @echo " man to make manual pages" +# @echo " texinfo to make Texinfo files" +# @echo " info to make Texinfo files and run them through makeinfo" +# @echo " gettext to make PO message catalogs" +# @echo " changes to make an overview of all changed/added/deprecated items" +# @echo " linkcheck to check all external links for integrity" +# @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " docs to build the docs and copy the static files to the outputdir" + @echo " publish to publish the app to dotcloud" + +clean: + -rm -rf $(BUILDDIR)/* + +docs: + -rm -rf $(BUILDDIR)/* + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + cp sources/index.html $(BUILDDIR)/html/ + cp sources/gettingstarted.html $(BUILDDIR)/html/ + cp sources/dotcloud.yml $(BUILDDIR)/html/ + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +connect: + @echo pushing changes to staging site + @cd _build/html/ ; \ + @dotcloud list ; \ + dotcloud connect dockerwebsite + +push: + @cd _build/html/ ; \ + dotcloud push + +$(VERSIONS): + @echo "Hello world" + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Docker.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Docker.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/Docker" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Docker" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/README.md b/docs/README.md index 2abaac9393..cdcf023fd5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,27 @@ -Docs readme -=========== +docker website +============== -Let's see if this file shows up as we hope it does. +This is the docker website repository + +installation +------------ +* Checkout this repo to your local dir +* Install sphinx: ``pip install sphinx`` +* Push this to dotcloud + + +Usage +----- +* run make docs +* your static website can now be found in the _build dir +* change the .rst files with your favorite editor to your liking +* run *make clean* to clean up +* run *make docs* to build the new version + + +Notes +----- +* The index.html file is copied from the source dir to the output dir without modification. So changes to + the index.html page should be made directly in html +* a simple way to run locally. cd into _build and then run 'python -m SimpleHTTPServer 8000' +* 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`` \ No newline at end of file diff --git a/docs/images-repositories-push-pull.md b/docs/images-repositories-push-pull.md deleted file mode 100644 index f2229953b8..0000000000 --- a/docs/images-repositories-push-pull.md +++ /dev/null @@ -1,220 +0,0 @@ -Docker concepts -=============== - -Image ------ - -An image is a root filesystem + some metadata. It is uniquely identified by a SHA256, and it can be given a symbolic name as well (so you can `docker run mystuff` instead of `docker run 819f04e5706f5...`. - -The metadata is a JSON blob. It contains at least: - -- the hash of the parent (only if the image is based on another image; if it was created from scratch, then the parent is `null`), -- the creation date (this is when the `docker commit` command was done). - -The hash of the image is defined as: - -`SHA256(SHA256(jsondata)+SHA256(tarball))` - -When you run something into an image, it automatically creates a container. The container has a unique ID, and when you `docker commit mystuff`, you are creating a new image, and giving it the nickname `mystuff`. - - -Repository ----------- - -A repository: - -- belongs to a specific user, -- has a given name chosen by the user, -- is a set of tagged images. - -The typical use case is to group different versions of something under a repository. - -Example: you are John Doe, maintainer of a collection of PostgreSQL images based on different releases of Ubuntu. Your docker ID is `jdoe`; you decide that the repository name will by `pgsql`. You pull a bunch of base images for the different Ubuntu releases, then you setup different versions of PostgreSQL in them. You end up with the following set of images: - -- a base lucid image, -- a base precise image, -- a base quantal image, -- PostgreSQL 9.1 installed on top of the lucid image, -- PostgreSQL 9.2 installed on top of the lucid image, -- PostgreSQL 9.1 installed on top of the precise image, -- PostgreSQL 9.2 installed on top of the precise image, -- PostgreSQL 9.1 installed on top of the quantal image, -- PostgreSQL 9.2 installed on top of the quantal image, -- PostgreSQL 9.3 installed on top of the quantal image. - -The first three won't be in the repository, but the other ones will. You decide that the tags will be lucid9.1, lucid9.2, precise9.1, etc. - -Note: those images do not have to share a common ancestor. In this case, we have three "root" images (one for each base Ubuntu release). - -When someone wants to use one of your images, he will do something like: - - docker run -p 5432 jdoe/pgsql@lucid9.2 postgres -D /var/lib/... - -Docker will do the following: - -- notice that the image name contains a slash, and is therefore a reference to a repository; -- notice that the image name contains an arroba, and is therefore a reference to a specific version; -- query the docker registry to resolve jdoe/pgsql@lucid9.2 into an image ID; -- download the image metadata+tarball from the registry (unless it already has them locally); -- recursively download all the parent images of the image (unless it already has them locally); -- run the image. - -There is one special version: `latest`. When you don't request a specific version, you are implying that you want the `latest` version. When you push a version (any version!) to the repository, you are also pushing to `latest` as well. - -QUESTION: do we want to update `latest` even if the commit date of the image is older than the current `latest` image? - -QUESTION: who should update `latest`? Should it be done by the docker client, or automatically done server-side? - - - -Confused? ---------- - -Another way to put it: a "repository" is like the "download binaries" page for a given product of a software vendor. Once version 1.42.5 is there, it probably won't be modified (they will rather release 1.42.6), unless there was something really harmful or embarrassing in 1.42.5. - - -Storage of images ------------------ - -Images are to be stored on S3. - -A given image will be mapped to two S3 objects: - -- s3://get.docker.io/images//json (plain JSON file) -- s3://get.docker.io/images//layer (tarball) - -The S3 storage is authoritative. I.E. the registry will very probably keep some cache of the metadata, but it will be just a cache. - - -Storage of repositories ------------------------ - -TBD - - -Pull images ------------ - -Pulling an image is fairly straightforward: - - GET /v1/images//json - GET /v1/images//layer - GET /v1/images//history - -The first two calls redirect you to their S3 counterparts. But before redirecting you, the registry checks (probably with `HEAD` requests) that both `json` and `layer` objects actually exist on S3. I.E., if there was a partial upload, when you try to `GET` the `json` or the `layer` object, the registry will give you a 404 for both objects, even if one of them does exist. - -The last one sends you a JSON payload, which is a list containing all the metadata of the image and all its ancestors. The requested image comes first, then its parent, then the parent of the parent, etc. - -SUGGESTION: rename `history` to `ancestry` (it sounds more hipstery, but it's actually more accurate) - -SUGGESTION: add optional parameter `?length=X` to `history`, so you can limit to `X` ancestors, and avoid pulling 42000 ancestors in one go - especially if you have most of them already... - - -Push images ------------ - -The first thing is to push the meta data: - - PUT /v1/images//json - -Four things can happen: - -- invalid/empty JSON: the server tells you to go away (HTTP 400?) -- image already exists with the same JSON: the server tells you that it's fine (HTTP 204?) -- image already exists but is different: the server informs you that something's wrong (?) -- image doesn't exist: the server puts the JSON on S3, then generates an upload URL for the tarball, and sends you an HTTP 200 containing this upload URL - -In the latter case, you want to move to the next step: - - PUT the tarball to whatever-URL-you-got-on-previous-stage - -SUGGESTION: consider a `PUT /v1/images//layer` with `Except: 100-continue` and honor a 301/302 redirect. This might or might not be legal HTTP. - -The last thing is to try to push the parent image (unless you're sure that it is already in the registry). If the image is already there, stop. If it's not there, upload it, and recursively upload its parents in a similar fashion. - - -Pull repository ---------------- - -This: - - GET /v1/users// - -Sends back a JSON dict mapping version tags to image version, e.g.: - - { - "1.1": "87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7", - "1.2": "0263829989b6fd954f72baaf2fc64bc2e2f01d692d4de72986ea808f6e99813f", - "latest": "0263829989b6fd954f72baaf2fc64bc2e2f01d692d4de72986ea808f6e99813f" - } - -SUGGESTION: also allow this URL: - - GET /v1/users/// - -Which would send back the image version hash. - - -Push repository ---------------- - -This: - - PUT /v1/users/// - -The request body should be the image version hash. - - -Example session ---------------- - -First idea: - - # Automatically pull base, aka docker/base@latest, and run something in it - docker run base ... - (Output: 42424242) - docker commit 42424242 databeze - docker login jdoe s3s4me! - # The following two commands are equivalent - docker push jdoe/pgsql databeze - docker push jdoe/pgsql 42424242 - -Second idea: - - docker run base ... - docker commit 42424242 jdoe/pgsql - docker login jdoe s3s4me! - docker push jdoe/pgsql - -Maybe this would work too: - - docker commit 42424242 pgsql - docker push pgsql - -And maybe this too: - - docker push -a - -NOTE: when your commit overwrites an existing tag, the image should be marked "dirty" so that docker knows that it has to be pushed. - -NOTE: if a pull would cause some local tag to be overwritten, docker could refuse, and ask you to rename your local tag, or ask you to specify a -f flag to overwrite. Your local changes won't be lost, but the tag will be lost, so if yon don't know the image ID it could be hard to figure out which one it was. - -NOTE: we probably need some commands to move/remove tags to images. - -Collaborative workflow: - - alice# docker login mybigco p455w0rd - bob# docker login mybigco p455w0rd - alice# docker pull base - alice# docker run -a -t -i base /bin/sh - ... hard core authoring takes place ... - alice# docker commit wwwbigco - alice# docker push wwwbigco - ... the latter actually does docker push mybigco/wwwbigco@latest ... - bob# docker pull mybigco/wwwbigco - bob# docker run mybigco/wwwbigcom /usr/sbin/nginx - ... change things ... - bob# docker commit wwwbigco - bob# docker push wwwbigco - -NOTE: what about this? diff --git a/docs/sources/conf.py b/docs/sources/conf.py new file mode 100644 index 0000000000..c05c7d10a4 --- /dev/null +++ b/docs/sources/conf.py @@ -0,0 +1,247 @@ +# -*- coding: utf-8 -*- +# +# Docker documentation build configuration file, created by +# sphinx-quickstart on Tue Mar 19 12:34:07 2013. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +#disable the parmalinks on headers, I find them really annoying +html_add_permalinks = None + + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Docker' +copyright = u'2013, Team Docker' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.1' +# The full version, including alpha/beta/rc tags. +release = '0' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'docker' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] +html_theme_path = ['../theme'] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['static_files'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Dockerdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'Docker.tex', u'Docker Documentation', + u'Team Docker', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'docker', u'Docker Documentation', + [u'Team Docker'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'Docker', u'Docker Documentation', + u'Team Docker', 'Docker', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' diff --git a/docs/sources/documentation/commandline/basecommands.rst b/docs/sources/documentation/commandline/basecommands.rst new file mode 100644 index 0000000000..7aa8973657 --- /dev/null +++ b/docs/sources/documentation/commandline/basecommands.rst @@ -0,0 +1,63 @@ +:title: docker documentation +:description: Common usage and commands +:keywords: Examples, Usage + + +Base commands +============= + + +Running an interactive shell +---------------------------- + +.. code-block:: bash + + # Download a base image + docker import base + + # Run an interactive shell in the base image, + # allocate a tty, attach stdin and stdout + docker run -a -i -t base /bin/bash + + +Starting a long-running worker process +-------------------------------------- + +.. code-block:: bash + + # Run docker in daemon mode + (docker -d || echo "Docker daemon already running") & + + # Start a very useful long-running process + JOB=$(docker run base /bin/sh -c "while true; do echo Hello world!; sleep 1; done") + + # Collect the output of the job so far + docker logs $JOB + + # Kill the job + docker kill $JOB + + +Listing all running containers +------------------------------ + +.. code-block:: bash + + docker ps + +Expose a service on a TCP port +------------------------------ + +.. code-block:: bash + + # Expose port 4444 of this container, and tell netcat to listen on it + JOB=$(docker run -p 4444 base /bin/nc -l -p 4444) + + # Which public port is NATed to my container? + PORT=$(docker port $JOB 4444) + + # Connect to the public port via the host's public address + echo hello world | nc $(hostname) $PORT + + # Verify that the network connection worked + echo "Daemon received: $(docker logs $JOB)" diff --git a/docs/sources/documentation/commandline/cli.rst b/docs/sources/documentation/commandline/cli.rst new file mode 100644 index 0000000000..139e75927f --- /dev/null +++ b/docs/sources/documentation/commandline/cli.rst @@ -0,0 +1,320 @@ +:title: Command Line Interface +:description: Docker's CLI command description and usage +:keywords: Docker, Docker documentation, CLI, command line + + +Command Line Interface +====================== + +Docker Usage +~~~~~~~~~~~~ + +:: + + $ docker + Usage: docker COMMAND [arg...] + + A self-sufficient runtime for linux containers. + + Commands: + attach Attach to a running container + commit Create a new image from a container's changes + diff Inspect changes on a container's filesystem + export Stream the contents of a container as a tar archive + history Show the history of an image + images List images + import Create a new filesystem image from the contents of a tarball + info Display system-wide information + inspect Return low-level information on a container + kill Kill a running container + login Register or Login to the docker registry server + logs Fetch the logs of a container + port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT + ps List containers + pull Pull an image or a repository to the docker registry server + push Push an image or a repository to the docker registry server + restart Restart a running container + rm Remove a container + rmi Remove an image + run Run a command in a new container + start Start a stopped container + stop Stop a running container + tag Tag an image into a repository + version Show the docker version information + wait Block until a container stops, then print its exit code + + +attach +~~~~~~ + +:: + + Usage: docker attach [OPTIONS] + + Attach to a running container + + -e=true: Attach to stderr + -i=false: Attach to stdin + -o=true: Attach to stdout + + +commit +~~~~~~ + +:: + + Usage: docker commit [OPTIONS] CONTAINER [DEST] + + Create a new image from a container's changes + + -m="": Commit message + + +diff +~~~~ + +:: + + Usage: docker diff CONTAINER [OPTIONS] + + Inspect changes on a container's filesystem + + +export +~~~~~~ + +:: + + Usage: docker export CONTAINER + + Export the contents of a filesystem as a tar archive + + +history +~~~~~~~ + +:: + + Usage: docker history [OPTIONS] IMAGE + + Show the history of an image + + +images +~~~~~~ + +:: + + Usage: docker images [OPTIONS] [NAME] + + List images + + -a=false: show all images + -q=false: only show numeric IDs + + +import +~~~~~~ + +:: + +Usage: docker import [OPTIONS] URL|- [REPOSITORY [TAG]] + +Create a new filesystem image from the contents of a tarball + + +info +~~~~ + +:: + + Usage: docker info + + Display system-wide information. + + +inspect +~~~~~~~ + +:: + + Usage: docker inspect [OPTIONS] CONTAINER + + Return low-level information on a container + + +kill +~~~~ + +:: + + Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...] + + Kill a running container + + +login +~~~~~ + +:: + + Usage: docker login + + Register or Login to the docker registry server + + +logs +~~~~ + +:: + + Usage: docker logs [OPTIONS] CONTAINER + + Fetch the logs of a container + + +port +~~~~ + +:: + + Usage: docker port [OPTIONS] CONTAINER PRIVATE_PORT + + Lookup the public-facing port which is NAT-ed to PRIVATE_PORT + + +ps +~~ + +:: + + Usage: docker ps [OPTIONS] + + List containers + + -a=false: Show all containers. Only running containers are shown by default. + -notrunc=false: Don't truncate output + -q=false: Only display numeric IDs + + +pull +~~~~ + +:: + + Usage: docker pull NAME + + Pull an image or a repository from the registry + +push +~~~~ + +:: + + Usage: docker push NAME + + Push an image or a repository to the registry + + +restart +~~~~~~~ + +:: + + Usage: docker restart [OPTIONS] NAME + + Restart a running container + + +rm +~~ + +:: + + Usage: docker rm [OPTIONS] CONTAINER + + Remove a container + + +rmi +~~~ + +:: + + Usage: docker rmi [OPTIONS] IMAGE + + Remove an image + + -a=false: Use IMAGE as a path and remove ALL images in this path + -r=false: Use IMAGE as a regular expression instead of an exact name + + +run +~~~ + +:: + + Usage: docker run [OPTIONS] IMAGE COMMAND [ARG...] + + Run a command in a new container + + -a=false: Attach stdin and stdout + -c="": Comment + -i=false: Keep stdin open even if not attached + -m=0: Memory limit (in bytes) + -p=[]: Map a network port to the container + -t=false: Allocate a pseudo-tty + -u="": Username or UID + + +start +~~~~~ + +:: + + Usage: docker start [OPTIONS] NAME + + Start a stopped container + + +stop +~~~~ + +:: + + Usage: docker stop [OPTIONS] NAME + + Stop a running container + + +tag +~~~ + +:: + + Usage: docker tag [OPTIONS] IMAGE REPOSITORY [TAG] + + Tag an image into a repository + + -f=false: Force + + +version +~~~~~~~ + +:: + + Usage: docker version + + Show the docker version information + + +wait +~~~~ + +:: + + Usage: docker wait [OPTIONS] NAME + + Block until a container stops, then print its exit code. + diff --git a/docs/sources/documentation/commandline/index.rst b/docs/sources/documentation/commandline/index.rst new file mode 100644 index 0000000000..85b58296c1 --- /dev/null +++ b/docs/sources/documentation/commandline/index.rst @@ -0,0 +1,15 @@ +:title: docker documentation +:description: -- todo: change me +:keywords: todo: change me + + +Commands +======== + +Contents: + +.. toctree:: + :maxdepth: 2 + + basecommands + cli \ No newline at end of file diff --git a/docs/sources/documentation/concepts/containers.rst b/docs/sources/documentation/concepts/containers.rst new file mode 100644 index 0000000000..652ba4df5d --- /dev/null +++ b/docs/sources/documentation/concepts/containers.rst @@ -0,0 +1,112 @@ +:title: Containers +:description: What are standard containers? +:keywords: containers, lxc, concepts, explanation + + + +Standard Containers +=================== + + +What is a Standard Container? +----------------------------- + +Docker defines a unit of software delivery called a Standard Container. The goal of a Standard Container is to encapsulate a software component and all its dependencies in +a format that is self-describing and portable, so that any compliant runtime can run it without extra dependency, regardless of the underlying machine and the contents of the container. + +The spec for Standard Containers is currently work in progress, but it is very straightforward. It mostly defines 1) an image format, 2) a set of standard operations, and 3) an execution environment. + +A great analogy for this is the shipping container. Just like Standard Containers are a fundamental unit of software delivery, shipping containers (http://bricks.argz.com/ins/7823-1/12) are a fundamental unit of physical delivery. + +Standard operations +----------------------- + +Just like shipping containers, Standard Containers define a set of STANDARD OPERATIONS. Shipping containers can be lifted, stacked, locked, loaded, unloaded and labelled. Similarly, standard containers can be started, stopped, copied, snapshotted, downloaded, uploaded and tagged. + + +Content-agnostic +--------------------- + +Just like shipping containers, Standard Containers are CONTENT-AGNOSTIC: all standard operations have the same effect regardless of the contents. A shipping container will be stacked in exactly the same way whether it contains Vietnamese powder coffee or spare Maserati parts. Similarly, Standard Containers are started or uploaded in the same way whether they contain a postgres database, a php application with its dependencies and application server, or Java build artifacts. + + +Infrastructure-agnostic +-------------------------- + +Both types of containers are INFRASTRUCTURE-AGNOSTIC: they can be transported to thousands of facilities around the world, and manipulated by a wide variety of equipment. A shipping container can be packed in a factory in Ukraine, transported by truck to the nearest routing center, stacked onto a train, loaded into a German boat by an Australian-built crane, stored in a warehouse at a US facility, etc. Similarly, a standard container can be bundled on my laptop, uploaded to S3, downloaded, run and snapshotted by a build server at Equinix in Virginia, uploaded to 10 staging servers in a home-made Openstack cluster, then sent to 30 production instances across 3 EC2 regions. + + +Designed for automation +-------------------------- + +Because they offer the same standard operations regardless of content and infrastructure, Standard Containers, just like their physical counterpart, are extremely well-suited for automation. In fact, you could say automation is their secret weapon. + +Many things that once required time-consuming and error-prone human effort can now be programmed. Before shipping containers, a bag of powder coffee was hauled, dragged, dropped, rolled and stacked by 10 different people in 10 different locations by the time it reached its destination. 1 out of 50 disappeared. 1 out of 20 was damaged. The process was slow, inefficient and cost a fortune - and was entirely different depending on the facility and the type of goods. + +Similarly, before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers. Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken. The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider. + + +Industrial-grade delivery +---------------------------- + +There are 17 million shipping containers in existence, packed with every physical good imaginable. Every single one of them can be loaded on the same boats, by the same cranes, in the same facilities, and sent anywhere in the World with incredible efficiency. It is embarrassing to think that a 30 ton shipment of coffee can safely travel half-way across the World in *less time* than it takes a software team to deliver its code from one datacenter to another sitting 10 miles away. + +With Standard Containers we can put an end to that embarrassment, by making INDUSTRIAL-GRADE DELIVERY of software a reality. + + +Standard Container Specification +-------------------------------- + +(TODO) + +Image format +~~~~~~~~~~~~ + +Standard operations +~~~~~~~~~~~~~~~~~~~ + +- Copy +- Run +- Stop +- Wait +- Commit +- Attach standard streams +- List filesystem changes +- ... + +Execution environment +~~~~~~~~~~~~~~~~~~~~~ + +Root filesystem +^^^^^^^^^^^^^^^ + +Environment variables +^^^^^^^^^^^^^^^^^^^^^ + +Process arguments +^^^^^^^^^^^^^^^^^ + +Networking +^^^^^^^^^^ + +Process namespacing +^^^^^^^^^^^^^^^^^^^ + +Resource limits +^^^^^^^^^^^^^^^ + +Process monitoring +^^^^^^^^^^^^^^^^^^ + +Logging +^^^^^^^ + +Signals +^^^^^^^ + +Pseudo-terminal allocation +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Security +^^^^^^^^ + diff --git a/docs/sources/documentation/concepts/index.rst b/docs/sources/documentation/concepts/index.rst new file mode 100644 index 0000000000..e02abd3ef3 --- /dev/null +++ b/docs/sources/documentation/concepts/index.rst @@ -0,0 +1,16 @@ +:title: docker documentation +:description: -- todo: change me +:keywords: todo: change me + + + +Concepts +======== + +Contents: + +.. toctree:: + :maxdepth: 1 + + containers + diff --git a/docs/sources/documentation/contributing/contributing.rst b/docs/sources/documentation/contributing/contributing.rst new file mode 100644 index 0000000000..d7f0258439 --- /dev/null +++ b/docs/sources/documentation/contributing/contributing.rst @@ -0,0 +1,58 @@ +Contributing to Docker +====================== + +Want to hack on Docker? Awesome! There are instructions to get you +started on the website: http://docker.io/gettingstarted.html + +They are probably not perfect, please let us know if anything feels +wrong or incomplete. + +Contribution guidelines +----------------------- + +Pull requests are always welcome +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We are always thrilled to receive pull requests, and do our best to +process them as fast as possible. Not sure if that typo is worth a pull +request? Do it! We will appreciate it. + +If your pull request is not accepted on the first try, don't be +discouraged! If there's a problem with the implementation, hopefully you +received feedback on what to improve. + +We're trying very hard to keep Docker lean and focused. We don't want it +to do everything for everybody. This means that we might decide against +incorporating a new feature. However, there might be a way to implement +that feature *on top of* docker. + +Discuss your design on the mailing list +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We recommend discussing your plans `on the mailing +list `__ +before starting to code - especially for more ambitious contributions. +This gives other contributors a chance to point you in the right +direction, give feedback on your design, and maybe point out if someone +else is working on the same thing. + +Create issues... +~~~~~~~~~~~~~~~~ + +Any significant improvement should be documented as `a github +issue `__ before anybody +starts working on it. + +...but check for existing issues first! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Please take a moment to check that an issue doesn't already exist +documenting your bug report or improvement proposal. If it does, it +never hurts to add a quick "+1" or "I have this problem too". This will +help prioritize the most common problems and requests. + +Write tests +~~~~~~~~~~~ + +Golang has a great testing suite built in: use it! Take a look at +existing tests for inspiration. diff --git a/docs/sources/documentation/contributing/devenvironment.rst b/docs/sources/documentation/contributing/devenvironment.rst new file mode 100644 index 0000000000..cffd9d2a34 --- /dev/null +++ b/docs/sources/documentation/contributing/devenvironment.rst @@ -0,0 +1,31 @@ +:title: Contributing to Docker +:description: Guides on how to contribute to docker +:keywords: Docker, documentation, developers, contributing, dev environment + +Setting up a dev environment +============================ + +Instructions that have been verified to work on Ubuntu 12.10, + +.. code:: bash + + sudo apt-get -y install lxc wget bsdtar curl golang git + + export GOPATH=~/go/ + export PATH=$GOPATH/bin:$PATH + + mkdir -p $GOPATH/src/github.com/dotcloud + cd $GOPATH/src/github.com/dotcloud + git clone git@github.com:dotcloud/docker.git + cd docker + + go get -v github.com/dotcloud/docker/... + go install -v github.com/dotcloud/docker/... + +Then run the docker daemon, + +.. code:: bash + + sudo $GOPATH/bin/docker -d + +Run the ``go install`` command (above) to recompile docker. diff --git a/docs/sources/documentation/contributing/index.rst b/docs/sources/documentation/contributing/index.rst new file mode 100644 index 0000000000..3669807a14 --- /dev/null +++ b/docs/sources/documentation/contributing/index.rst @@ -0,0 +1,14 @@ +:title: Contributing to Docker +:description: Guides on how to contribute to docker +:keywords: Docker, documentation, developers, contributing, dev environment + + + +Contributing +============ + +.. toctree:: + :maxdepth: 1 + + contributing + devenvironment diff --git a/docs/sources/documentation/examples/hello_world.rst b/docs/sources/documentation/examples/hello_world.rst new file mode 100644 index 0000000000..b6c07a2b91 --- /dev/null +++ b/docs/sources/documentation/examples/hello_world.rst @@ -0,0 +1,34 @@ +:title: Docker: Hello world example +:description: A simple hello world example with Docker +:keywords: docker, example, hello world + +.. _hello_world: + +Hello World +=========== +This is the most basic example available for using docker + +This example assumes you have Docker installed and it will download the busybox image and then use that image to run a simple echo command, that will echo hello world back to the console over standard out. + +.. code-block:: bash + + $ docker run busybox /bin/echo hello world + +**Explanation:** + +- **"docker run"** run a command in a new container +- **"busybox"** is the image we want to run the command inside of. +- **"/bin/echo"** is the command we want to run in the container +- **"hello world"** is the input for the echo command + +**Video:** + +See the example in action + +.. raw:: html + +
+ +
+ +Continue to the :ref:`hello_world_daemon` example. \ No newline at end of file diff --git a/docs/sources/documentation/examples/hello_world_daemon.rst b/docs/sources/documentation/examples/hello_world_daemon.rst new file mode 100644 index 0000000000..8abe0e735a --- /dev/null +++ b/docs/sources/documentation/examples/hello_world_daemon.rst @@ -0,0 +1,79 @@ +:title: Docker: Hello world daemon example +:description: A simple hello world daemon example with Docker +:keywords: docker, example, hello world, daemon + +.. _hello_world_daemon: + +Hello World Daemon +================== +The most boring daemon ever written. + +This example assumes you have Docker installed and with the busybox image already imported. We will use the busybox image to run a simple hello world daemon that will just print hello world to standard out every second. It will continue to do this until we stop it. + +**Steps:** + +.. code-block:: bash + + $ CONTAINER_ID=$(docker run -d busybox /bin/sh -c "while true; do echo hello world; sleep 1; done") + +We are going to run a simple hello world daemon in a new container made from the busybox daemon. + +- **"docker run -d "** run a command in a new container. We pass "-d" so it runs as a daemon. +- **"busybox"** is the image we want to run the command inside of. +- **"/bin/sh -c"** is the command we want to run in the container +- **"while true; do echo hello world; sleep 1; done"** is the mini script we want to run, that will just print hello world once a second until we stop it. +- **$CONTAINER_ID** the output of the run command will return a container id, we can use in future commands to see what is going on with this process. + +.. code-block:: bash + + $ docker logs $CONTAINER_ID + +Check the logs make sure it is working correctly. + +- **"docker logs**" This will return the logs for a container +- **$CONTAINER_ID** The Id of the container we want the logs for. + +.. code-block:: bash + + $ docker attach $CONTAINER_ID + +Attach to the container to see the results in realtime. + +- **"docker attach**" This will allow us to attach to a background process to see what is going on. +- **$CONTAINER_ID** The Id of the container we want to attach too. + +.. code-block:: bash + + $ docker ps + +Check the process list to make sure it is running. + +- **"docker ps"** this shows all running process managed by docker + +.. code-block:: bash + + $ docker stop $CONTAINER_ID + +Stop the container, since we don't need it anymore. + +- **"docker stop"** This stops a container +- **$CONTAINER_ID** The Id of the container we want to stop. + +.. code-block:: bash + + $ docker ps + +Make sure it is really stopped. + + +**Video:** + +See the example in action + +.. raw:: html + +
+ +
+ +Continue to the :ref:`python_web_app` example. \ No newline at end of file diff --git a/docs/sources/documentation/examples/index.rst b/docs/sources/documentation/examples/index.rst new file mode 100644 index 0000000000..bb3dbac324 --- /dev/null +++ b/docs/sources/documentation/examples/index.rst @@ -0,0 +1,17 @@ +:title: Docker Examples +:description: Examples on how to use Docker +:keywords: docker, hello world, examples + + + +Examples +============ + +Contents: + +.. toctree:: + :maxdepth: 1 + + hello_world + hello_world_daemon + python_web_app diff --git a/docs/sources/documentation/examples/python_web_app.rst b/docs/sources/documentation/examples/python_web_app.rst new file mode 100644 index 0000000000..9d988b5160 --- /dev/null +++ b/docs/sources/documentation/examples/python_web_app.rst @@ -0,0 +1,66 @@ +:title: Docker: Python Web app example +:description: Building your own python web app using docker +:keywords: docker, example, python, web app + +.. _python_web_app: + +Building a python web app +========================= +The goal of this example is to show you how you can author your own docker images using a parent image, making changes to it, and then saving the results as a new image. We will do that by making a simple hello flask web application image. + +**Steps:** + +.. code-block:: bash + + $ docker import shykes/pybuilder + +We are importing the "shykes/pybuilder" docker image + +.. code-block:: bash + + $ URL=http://github.com/shykes/helloflask/archive/master.tar.gz + +We set a URL variable that points to a tarball of a simple helloflask web app + +.. code-block:: bash + + $ BUILD_JOB=$(docker run -t shykes/pybuilder:1d9aab3737242c65 /usr/local/bin/buildapp $URL) + +Inside of the "shykes/pybuilder" image there is a command called buildapp, we are running that command and passing the $URL variable from step 2 to it, and running the whole thing inside of a new container. BUILD_JOB will be set with the new container_id. "1d9aab3737242c65" came from the output of step 1 when importing image. also available from 'docker images'. + +.. code-block:: bash + + $ docker attach $BUILD_JOB + [...] + +We attach to the new container to see what is going on. Ctrl-C to disconnect + +.. code-block:: bash + + $ BUILD_IMG=$(docker commit $BUILD_JOB _/builds/github.com/hykes/helloflask/master) + +Save the changed we just made in the container to a new image called "_/builds/github.com/hykes/helloflask/master" and save the image id in the BUILD_IMG variable name. + +.. code-block:: bash + + $ WEB_WORKER=$(docker run -p 5000 $BUILD_IMG /usr/local/bin/runapp) + +Use the new image we just created and create a new container with network port 5000, and return the container id and store in the WEB_WORKER variable. + +.. code-block:: bash + + $ docker logs $WEB_WORKER + * Running on http://0.0.0.0:5000/ + +view the logs for the new container using the WEB_WORKER variable, and if everything worked as planned you should see the line "Running on http://0.0.0.0:5000/" in the log output. + + +**Video:** + +See the example in action + +.. raw:: html + +
+ +
diff --git a/docs/sources/documentation/faq.rst b/docs/sources/documentation/faq.rst new file mode 100644 index 0000000000..7b2b54de5f --- /dev/null +++ b/docs/sources/documentation/faq.rst @@ -0,0 +1,29 @@ +FAQ +=== + + +Most frequently asked questions. +--------------------------------------------- + +1. How much does Docker cost? + +Docker is 100% free, it is open source, so you can use it without paying. + +2. What open source license are you using? + +We are using the Apache License Version 2.0, see it here: https://github.com/dotcloud/docker/blob/master/LICENSE + +3. Does Docker run on Mac OS X or Windows? + +Not at this time, Docker currently only runs on Linux, but you can use VirtualBox to run Docker in a virtual machine on your box, and get the best of both worlds. Check out the getting started guides for help on setting up your machine. + +4. How do containers compare to virtual machines? + +Containers are more light weight and can start in less then a second, and are great for lots of different tasks, but they aren't as full featured as virtual machines. + +5. Can I help by adding some questions and answers? + +Definitely! You can fork the repo and edit the documentation sources right there. + + +Looking for something else to read? Checkout the :ref:`hello_world` example. diff --git a/docs/sources/documentation/index.rst b/docs/sources/documentation/index.rst new file mode 100644 index 0000000000..92efc113e0 --- /dev/null +++ b/docs/sources/documentation/index.rst @@ -0,0 +1,18 @@ +:title: docker documentation +:description: docker documentation +:keywords: + +Documentation +============= + +This documentation has the following resources: + +.. toctree:: + :maxdepth: 1 + + concepts/index + installation/index + examples/index + contributing/index + commandline/index + faq \ No newline at end of file diff --git a/docs/sources/documentation/installation/amazon.rst b/docs/sources/documentation/installation/amazon.rst new file mode 100644 index 0000000000..730a77e62c --- /dev/null +++ b/docs/sources/documentation/installation/amazon.rst @@ -0,0 +1,54 @@ +Amazon EC2 +========== + + + +Installation +------------ + +Install vagrant from http://www.vagrantup.com/ (or use your package manager) + +clone the repo + + +Docker can be installed with Vagrant on Amazon EC2, using Vagrant 1.1 is required for EC2, but deploying is as simple as: + +:: + + $ export AWS_ACCESS_KEY_ID=xxx \ + AWS_SECRET_ACCESS_KEY=xxx \ + AWS_KEYPAIR_NAME=xxx \ + AWS_SSH_PRIVKEY=xxx + +:: + + $ vagrant plugin install vagrant-aws + +:: + + $ vagrant up --provider=aws + +The environment variables are: + +* ``AWS_ACCESS_KEY_ID`` - The API key used to make requests to AWS +* ``AWS_SECRET_ACCESS_KEY`` - The secret key to make AWS API requests +* ``AWS_KEYPAIR_NAME`` - The ID of the keypair used for this EC2 instance +* ``AWS_SSH_PRIVKEY`` - The path to the private key for the named keypair + + +Make sure your default security zone on AWS includes rights to SSH to your container. Otherwise access will +fail silently. + + +.. code-block:: bash + + vagrant ssh + +Now you are in the VM, run docker + +.. code-block:: bash + + docker + + +Continue with the :ref:`hello_world` example. \ No newline at end of file diff --git a/docs/sources/documentation/installation/images/win/_01.gif b/docs/sources/documentation/installation/images/win/_01.gif new file mode 100644 index 0000000000..fbfc0a3028 Binary files /dev/null and b/docs/sources/documentation/installation/images/win/_01.gif differ diff --git a/docs/sources/documentation/installation/images/win/_02.gif b/docs/sources/documentation/installation/images/win/_02.gif new file mode 100644 index 0000000000..16d8a688ff Binary files /dev/null and b/docs/sources/documentation/installation/images/win/_02.gif differ diff --git a/docs/sources/documentation/installation/images/win/_06.gif b/docs/sources/documentation/installation/images/win/_06.gif new file mode 100644 index 0000000000..d935c02ae9 Binary files /dev/null and b/docs/sources/documentation/installation/images/win/_06.gif differ diff --git a/docs/sources/documentation/installation/images/win/cygwin.gif b/docs/sources/documentation/installation/images/win/cygwin.gif new file mode 100644 index 0000000000..d00445486e Binary files /dev/null and b/docs/sources/documentation/installation/images/win/cygwin.gif differ diff --git a/docs/sources/documentation/installation/images/win/putty.gif b/docs/sources/documentation/installation/images/win/putty.gif new file mode 100644 index 0000000000..e7d418d2de Binary files /dev/null and b/docs/sources/documentation/installation/images/win/putty.gif differ diff --git a/docs/sources/documentation/installation/images/win/putty_2.gif b/docs/sources/documentation/installation/images/win/putty_2.gif new file mode 100644 index 0000000000..053ad231fc Binary files /dev/null and b/docs/sources/documentation/installation/images/win/putty_2.gif differ diff --git a/docs/sources/documentation/installation/images/win/run_02_.gif b/docs/sources/documentation/installation/images/win/run_02_.gif new file mode 100644 index 0000000000..4243bf6186 Binary files /dev/null and b/docs/sources/documentation/installation/images/win/run_02_.gif differ diff --git a/docs/sources/documentation/installation/images/win/run_03.gif b/docs/sources/documentation/installation/images/win/run_03.gif new file mode 100644 index 0000000000..c1f620a3c3 Binary files /dev/null and b/docs/sources/documentation/installation/images/win/run_03.gif differ diff --git a/docs/sources/documentation/installation/images/win/run_04.gif b/docs/sources/documentation/installation/images/win/run_04.gif new file mode 100644 index 0000000000..a89f2a917b Binary files /dev/null and b/docs/sources/documentation/installation/images/win/run_04.gif differ diff --git a/docs/sources/documentation/installation/images/win/ssh-config.gif b/docs/sources/documentation/installation/images/win/ssh-config.gif new file mode 100644 index 0000000000..4fd3b2b333 Binary files /dev/null and b/docs/sources/documentation/installation/images/win/ssh-config.gif differ diff --git a/docs/sources/documentation/installation/index.rst b/docs/sources/documentation/installation/index.rst new file mode 100644 index 0000000000..593004f813 --- /dev/null +++ b/docs/sources/documentation/installation/index.rst @@ -0,0 +1,17 @@ +:title: docker documentation +:description: -- todo: change me +:keywords: todo: change me + + + +Installation +============ + +Contents: + +.. toctree:: + :maxdepth: 1 + + ubuntulinux + macos + windows diff --git a/docs/sources/documentation/installation/macos.rst b/docs/sources/documentation/installation/macos.rst new file mode 100644 index 0000000000..d2381a2875 --- /dev/null +++ b/docs/sources/documentation/installation/macos.rst @@ -0,0 +1,65 @@ + Please note the only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version + may be out of date because it depends on some binaries to be available + + +Mac OS X and other linux +======================== + +Requirements +------------ + +We currently rely on some Ubuntu-linux specific packages, this will change in the future, but for now we provide a +streamlined path to install Virtualbox with a Ubuntu 12.10 image using Vagrant. + +1. Install virtualbox from https://www.virtualbox.org/ (or use your package manager) +2. Install vagrant from http://www.vagrantup.com/ (or use your package manager) +3. Install git if you had not installed it before, check if it is installed by running + ``git`` in a terminal window + +We recommend having at least about 2Gb of free disk space and 2Gb RAM (or more). + +Installation +------------ + +1. Fetch the docker sources + +.. code-block:: bash + + git clone https://github.com/dotcloud/docker.git + +2. Run vagrant from the sources directory + +.. code-block:: bash + + vagant up + +Vagrant will: + +* Download the Quantal64 base ubuntu virtual machine image from get.docker.io/ +* Boot this image in virtualbox + +Then it will use Puppet to perform an initial setup in this machine: + +* Download & untar the most recent docker binary tarball to vagrant homedir. +* Debootstrap to /var/lib/docker/images/ubuntu. +* Install & run dockerd as service. +* Put docker in /usr/local/bin. +* Put latest Go toolchain in /usr/local/go. + +You now have a Ubuntu Virtual Machine running with docker pre-installed. + +To access the VM and use Docker, Run ``vagrant ssh`` from the same directory as where you ran +``vagrant up``. Vagrant will make sure to connect you to the correct VM. + +.. code-block:: bash + + vagrant ssh + +Now you are in the VM, run docker + +.. code-block:: bash + + docker + + +Continue with the :ref:`hello_world` example. diff --git a/docs/sources/documentation/installation/ubuntulinux.rst b/docs/sources/documentation/installation/ubuntulinux.rst new file mode 100644 index 0000000000..9f7a16cef4 --- /dev/null +++ b/docs/sources/documentation/installation/ubuntulinux.rst @@ -0,0 +1,44 @@ +.. _ubuntu_linux: + +Ubuntu Linux +============ + +Installing on Ubuntu 12.04 and 12.10 + +Right now, the officially supported distributions are: + +Ubuntu 12.04 (precise LTS) +Ubuntu 12.10 (quantal) +Docker probably works on other distributions featuring a recent kernel, the AUFS patch, and up-to-date lxc. However this has not been tested. + +Install dependencies: +--------------------- + +:: + + sudo apt-get install lxc wget bsdtar curl + sudo apt-get install linux-image-extra-`uname -r` + +The linux-image-extra package is needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module. + +Install the latest docker binary: + +:: + + wget http://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-master.tgz + tar -xf docker-master.tgz + +Run your first container! + +:: + + cd docker-master + +:: + + sudo ./docker run -i -t base /bin/bash + +Consider adding docker to your PATH for simplicity. + + +Continue with the :ref:`hello_world` example. \ No newline at end of file diff --git a/docs/sources/documentation/installation/windows.rst b/docs/sources/documentation/installation/windows.rst new file mode 100644 index 0000000000..0ec2d6709d --- /dev/null +++ b/docs/sources/documentation/installation/windows.rst @@ -0,0 +1,164 @@ +:title: Requirements and Installation on Windows +:description: Docker's tutorial to run docker on Windows +:keywords: Docker, Docker documentation, Windows, requirements, virtualbox, vagrant, git, ssh, putty, cygwin + + Please note the only 'official' installation is using the :ref:`ubuntu_linux` installation path. This version + may be out of date because it depends on some binaries to be available + +Windows +======= + +Requirements +------------ + +1. Install virtualbox from https://www.virtualbox.org - or follow this tutorial__ + +.. __: http://www.slideshare.net/julienbarbier42/install-virtualbox-on-windows-7 + +2. Install vagrant from http://www.vagrantup.com - or follow this tutorial__ + +.. __: http://www.slideshare.net/julienbarbier42/install-vagrant-on-windows-7 + +3. Install git with ssh from http://git-scm.com/downloads - or follow this tutorial__ + +.. __: http://www.slideshare.net/julienbarbier42/install-git-with-ssh-on-windows-7 + + +We recommend having at least 2Gb of free disk space and 2Gb of RAM (or more). + +Opening a command prompt +------------------------ + +First open a cmd prompt. Press Windows key and then press “R” key. This will open the RUN dialog box for you. Type “cmd” and press Enter. Or you can click on Start, type “cmd” in the “Search programs and files” field, and click on cmd.exe. + +.. image:: images/win/_01.gif + :alt: Git install + :align: center + +This should open a cmd prompt window. + +.. image:: images/win/_02.gif + :alt: run docker + :align: center + +Alternatively, you can also use a Cygwin terminal, or Git Bash (or any other command line program you are usually using). The next steps would be the same. + +Launch an Ubuntu virtual server +------------------------------- + +Let’s download and run an Ubuntu image with docker binaries already installed. + +.. code-block:: bash + + git clone https://github.com/dotcloud/docker.git + cd docker + vagrant up + +.. image:: images/win/run_02_.gif + :alt: run docker + :align: center + +Congratulations! You are running an Ubuntu server with docker installed on it. You do not see it though, because it is running in the background. + +Log onto your Ubuntu server +--------------------------- + +Let’s log into your Ubuntu server now. To do so you have two choices: + +- Use Vagrant on Windows command prompt OR +- Use SSH + +Using Vagrant on Windows Command Prompt +``````````````````````````````````````` + +Run the following command + +.. code-block:: bash + + vagrant ssh + +You may see an error message starting with “`ssh` executable not found”. In this case it means that you do not have SSH in your PATH. If you do not have SSH in your PATH you can set it up with the “set” command. For instance, if your ssh.exe is in the folder named “C:\Program Files (x86)\Git\bin”, then you can run the following command: + +.. code-block:: bash + + set PATH=%PATH%;C:\Program Files (x86)\Git\bin + +.. image:: images/win/run_03.gif + :alt: run docker + :align: center + +Using SSH +````````` + +First step is to get the IP and port of your Ubuntu server. Simply run: + +.. code-block:: bash + + vagrant ssh-config + +You should see an output with HostName and Port information. In this example, HostName is 127.0.0.1 and port is 2222. And the User is “vagrant”. The password is not shown, but it is also “vagrant”. + +.. image:: images/win/ssh-config.gif + :alt: run docker + :align: center + +You can now use this information for connecting via SSH to your server. To do so you can: + +- Use putty.exe OR +- Use SSH from a terminal + +Use putty.exe +''''''''''''' + +You can download putty.exe from this page http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html +Launch putty.exe and simply enter the information you got from last step. + +.. image:: images/win/putty.gif + :alt: run docker + :align: center + +Open, and enter user = vagrant and password = vagrant. + +.. image:: images/win/putty_2.gif + :alt: run docker + :align: center + +SSH from a terminal +''''''''''''''''''' + +You can also run this command on your favorite terminal (windows prompt, cygwin, git-bash, …). Make sure to adapt the IP and port from what you got from the vagrant ssh-config command. + +.. code-block:: bash + + ssh vagrant@127.0.0.1 –p 2222 + +Enter user = vagrant and password = vagrant. + +.. image:: images/win/cygwin.gif + :alt: run docker + :align: center + +Congratulations, you are now logged onto your Ubuntu Server, running on top of your Windows machine ! + +Running Docker +-------------- + +First you have to be root in order to run docker. Simply run the following command: + +.. code-block:: bash + + sudo su + +You are now ready for the docker’s “hello world” example. Run + +.. code-block:: bash + + docker run -a busybox echo hello world + +.. image:: images/win/run_04.gif + :alt: run docker + :align: center + +All done! + +Now you can continue with the :ref:`hello_world` example. diff --git a/docs/sources/dotcloud.yml b/docs/sources/dotcloud.yml new file mode 100644 index 0000000000..5a8f50f9e9 --- /dev/null +++ b/docs/sources/dotcloud.yml @@ -0,0 +1,2 @@ +www: + type: static \ No newline at end of file diff --git a/docs/sources/gettingstarted.html b/docs/sources/gettingstarted.html new file mode 100644 index 0000000000..c4bc71af8e --- /dev/null +++ b/docs/sources/gettingstarted.html @@ -0,0 +1,200 @@ + + + + + + + + + + Docker - the Linux container runtime + + + + + + + + + + + + + + + + + + + + + + + +
+
+

GETTING STARTED

+
+
+ +
+ +
+
+
+
+

+ Installing on Ubuntu 12.04 and 12.10

+
    +
  1. +

    Install dependencies:

    + +
    +
    sudo apt-get install lxc wget bsdtar curl
    +
    sudo apt-get install linux-image-extra-`uname -r`
    + +

    The linux-image-extra package is needed on standard Ubuntu EC2 AMIs in order to install the aufs kernel module.

    +
  2. +
  3. +

    Install the latest docker binary:

    + +
    +
    wget http://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-master.tgz
    +
    tar -xf docker-master.tgz
    +
    +
  4. +
  5. +

    Run your first container!

    + +
    cd docker-master
    +
    sudo ./docker run -i -t base /bin/bash
    +
    +

    Done!

    +

    Consider adding docker to your PATH for simplicity.

    +
  6. + + Continue with the Hello world example. +
+
+ +
+

Contributing to Docker

+ +

Want to hack on Docker? Awesome! We have some instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete.

+
+ +
+
+
+

Quick install on other operating systems

+

For other operating systems we recommend and provide a streamlined install with virtualbox, + vagrant and an Ubuntu virtual machine.

+ + + +
+ +
+

More resources

+ +
+ + +
+
+ Fill out my online form. +
+ +
+ +
+
+
+ + +
+
+
+ +
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + diff --git a/docs/sources/index.html b/docs/sources/index.html new file mode 100644 index 0000000000..427fe4de9b --- /dev/null +++ b/docs/sources/index.html @@ -0,0 +1,270 @@ + + + + + + + + + + Docker - the Linux container runtime + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+

Docker - the Linux container runtime

+
+ +
+

Docker encapsulates heterogeneous payloads in Standard Containers, and runs them on any server with strong guarantees of isolation and repeatability.

+
+ + + + + + +
+
+
+
+
+ +
+
+ +
+
+

Heterogeneous payloads

+

Any combination of binaries, libraries, configuration files, scripts, virtualenvs, jars, gems, tarballs, you name it. No more juggling between domain-specific tools. Docker can deploy and run them all.

+
+
+
+
+

Any server

+

Docker can run on any x64 machine with a modern linux kernel - whether it's a laptop, a bare metal server or a VM. This makes it perfect for multi-cloud deployments.

+
+
+
+
+

Isolation

+

docker isolates processes from each other and from the underlying host, using lightweight containers.

+
+
+
+
+

Repeatability

+

Because containers are isolated in their own filesystem, they behave the same regardless of where, when, and alongside what they run.

+
+
+ + +
+
+ + + + +
+
+
+
+ + John Willis @botchagalupe: IMHO docker is to paas what chef was to Iaas 4 years ago +
+
+
+
+ + John Feminella ‏@superninjarobot: So, @getdocker is pure excellence. If you've ever wished for arbitrary, PaaS-agnostic, lxc/aufs Linux containers, this is your jam! +
+
+
+
+ + +
+
+
+ +
+ + +

Notable features

+ +
    +
  • Filesystem isolation: each process container runs in a completely separate root filesystem.
  • +
  • Resource isolation: system resources like cpu and memory can be allocated differently to each process container, using cgroups.
  • +
  • Network isolation: each process container runs in its own network namespace, with a virtual interface and IP address of its own.
  • +
  • Copy-on-write: root filesystems are created using copy-on-write, which makes deployment extremeley fast, memory-cheap and disk-cheap.
  • +
  • Logging: the standard streams (stdout/stderr/stdin) of each process container is collected and logged for real-time or batch retrieval.
  • +
  • Change management: changes to a container's filesystem can be committed into a new image and re-used to create more containers. No templating or manual configuration required.
  • +
  • Interactive shell: docker can allocate a pseudo-tty and attach to the standard input of any container, for example to run a throwaway interactive shell.
  • +
+ +

Under the hood

+ +

Under the hood, Docker is built on the following components:

+ +
    +
  • The cgroup and namespacing capabilities of the Linux kernel;
  • +
  • AUFS, a powerful union filesystem with copy-on-write capabilities;
  • +
  • The Go programming language;
  • +
  • lxc, a set of convenience scripts to simplify the creation of linux containers.
  • +
+ +
+
+ +
+
+
+ Fill out my online form. +
+ +
+ +
+

Twitter

+ + +
+
+
+ +
+ + +
+
+
+
+ + Docker is a project by dotCloud + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + diff --git a/docs/sources/index.rst b/docs/sources/index.rst new file mode 100644 index 0000000000..aeb1fd9515 --- /dev/null +++ b/docs/sources/index.rst @@ -0,0 +1,16 @@ +Guides index +============ + +Contents: + +.. toctree:: + :maxdepth: 1 + + documentation/concepts/index + documentation/installation/index + documentation/examples/index + documentation/contributing/index + documentation/commandline/index + documentation/faq + +The source page should also have some content. Otherwise it is just an index. \ No newline at end of file diff --git a/docs/sources/index_orig.html b/docs/sources/index_orig.html new file mode 100644 index 0000000000..ed833f3c20 --- /dev/null +++ b/docs/sources/index_orig.html @@ -0,0 +1,245 @@ + + + + + + + + + + Docker - the Linux container runtime + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ +
+
+ +
+
+ +

Docker - the Linux container runtime

+ +

Docker encapsulates heterogeneous payloads in Standard Containers, and runs them on any server with strong guarantees of isolation and repeatability.

+ +

It is a great building block for automating distributed systems: large-scale web deployments, database clusters, continuous deployment systems, private PaaS, service-oriented architectures, etc.

+ +
    +
  • Heterogeneous payloads: any combination of binaries, libraries, configuration files, scripts, virtualenvs, jars, gems, tarballs, you name it. No more juggling between domain-specific tools. Docker can deploy and run them all.
  • +
  • Any server: docker can run on any x64 machine with a modern linux kernel - whether it's a laptop, a bare metal server or a VM. This makes it perfect for multi-cloud deployments.
  • +
  • Isolation: docker isolates processes from each other and from the underlying host, using lightweight containers.
  • +
  • Repeatability: because containers are isolated in their own filesystem, they behave the same regardless of where, when, and alongside what they run.
  • +
+
+
+ +
+
+

Docker will be open source soon

+
+
+ Fill out my online form. +
+ + + Follow us on Twitter +
+
+ + +
+ +
+ + +

Notable features

+ +
    +
  • Filesystem isolation: each process container runs in a completely separate root filesystem.
  • +
  • Resource isolation: system resources like cpu and memory can be allocated differently to each process container, using cgroups.
  • +
  • Network isolation: each process container runs in its own network namespace, with a virtual interface and IP address of its own.
  • +
  • Copy-on-write: root filesystems are created using copy-on-write, which makes deployment extremeley fast, memory-cheap and disk-cheap.
  • +
  • Logging: the standard streams (stdout/stderr/stdin) of each process container is collected and logged for real-time or batch retrieval.
  • +
  • Change management: changes to a container's filesystem can be committed into a new image and re-used to create more containers. No templating or manual configuration required.
  • +
  • Interactive shell: docker can allocate a pseudo-tty and attach to the standard input of any container, for example to run a throwaway interactive shell.
  • +
+ +

Under the hood

+ +

Under the hood, Docker is built on the following components:

+ +
    +
  • The cgroup and namespacing capabilities of the Linux kernel;
  • +
  • AUFS, a powerful union filesystem with copy-on-write capabilities;
  • +
  • The Go programming language;
  • +
  • lxc, a set of convenience scripts to simplify the creation of linux containers.
  • +
+ +
+
+
+ +
+
+
+ + +

What is a Standard Container?

+ + +

Docker defines a unit of software delivery called a Standard Container. The goal of a Standard Container is to encapsulate a software component and all its dependencies in + a format that is self-describing and portable, so that any compliant runtime can run it without extra dependency, regardless of the underlying machine and the contents of the container.

+ +

The spec for Standard Containers is currently work in progress, but it is very straightforward. It mostly defines 1) an image format, 2) a set of standard operations, and 3) an execution environment.

+ +

A great analogy for this is the shipping container. Just like Standard Containers are a fundamental unit of software delivery, shipping containers (http://bricks.argz.com/ins/7823-1/12) are a fundamental unit of physical delivery.

+ +

1. STANDARD OPERATIONS

+ +

Just like shipping containers, Standard Containers define a set of STANDARD OPERATIONS. Shipping containers can be lifted, stacked, locked, loaded, unloaded and labelled. Similarly, standard containers can be started, stopped, copied, snapshotted, downloaded, uploaded and tagged.

+ +

2. CONTENT-AGNOSTIC

+ +

Just like shipping containers, Standard Containers are CONTENT-AGNOSTIC: all standard operations have the same effect regardless of the contents. A shipping container will be stacked in exactly the same way whether it contains Vietnamese powder coffe or spare Maserati parts. Similarly, Standard Containers are started or uploaded in the same way whether they contain a postgres database, a php application with its dependencies and application server, or Java build artifacts.

+ +

3. INFRASTRUCTURE-AGNOSTIC

+ +

Both types of containers are INFRASTRUCTURE-AGNOSTIC: they can be transported to thousands of facilities around the world, and manipulated by a wide variety of equipment. A shipping container can be packed in a factory in Ukraine, transported by truck to the nearest routing center, stacked onto a train, loaded into a German boat by an Australian-built crane, stored in a warehouse at a US facility, etc. Similarly, a standard container can be bundled on my laptop, uploaded to S3, downloaded, run and snapshotted by a build server at Equinix in Virginia, uploaded to 10 staging servers in a home-made Openstack cluster, then sent to 30 production instances across 3 EC2 regions.

+ +

4. DESIGNED FOR AUTOMATION

+ +

Because they offer the same standard operations regardless of content and infrastructure, Standard Containers, just like their physical counterpart, are extremely well-suited for automation. In fact, you could say automation is their secret weapon.

+ +

Many things that once required time-consuming and error-prone human effort can now be programmed. Before shipping containers, a bag of powder coffee was hauled, dragged, dropped, rolled and stacked by 10 different people in 10 different locations by the time it reached its destination. 1 out of 50 disappeared. 1 out of 20 was damaged. The process was slow, inefficient and cost a fortune - and was entirely different depending on the facility and the type of goods.

+ +

Similarly, before Standard Containers, by the time a software component ran in production, it had been individually built, configured, bundled, documented, patched, vendored, templated, tweaked and instrumented by 10 different people on 10 different computers. Builds failed, libraries conflicted, mirrors crashed, post-it notes were lost, logs were misplaced, cluster updates were half-broken. The process was slow, inefficient and cost a fortune - and was entirely different depending on the language and infrastructure provider.

+ +

5. INDUSTRIAL-GRADE DELIVERY

+ +

There are 17 million shipping containers in existence, packed with every physical good imaginable. Every single one of them can be loaded on the same boats, by the same cranes, in the same facilities, and sent anywhere in the World with incredible efficiency. It is embarrassing to think that a 30 ton shipment of coffee can safely travel half-way across the World in less time than it takes a software team to deliver its code from one datacenter to another sitting 10 miles away.

+ +

With Standard Containers we can put an end to that embarrassment, by making INDUSTRIAL-GRADE DELIVERY of software a reality.

+
+
+
+ +
+
+
+

Twitter

+ + +
+
+ +
+ + + + + +
+ + + + +
+
+
+
+ Docker is a project by dotCloud. When released, find us on Github +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + diff --git a/docs/sources/static_files/README.md b/docs/sources/static_files/README.md new file mode 100644 index 0000000000..99dc104d4c --- /dev/null +++ b/docs/sources/static_files/README.md @@ -0,0 +1,11 @@ +Static files dir +================ + +Files you put in /sources/static_files/ will be copied to the web visible /_static/ + +Be careful not to override pre-existing static files from the template. + +Generally, layout related files should go in the /theme directory. + +If you want to add images to your particular documentation page. Just put them next to +your .rst source file and reference them relatively. \ No newline at end of file diff --git a/docs/sources/static_files/lego_docker.jpg b/docs/sources/static_files/lego_docker.jpg new file mode 100644 index 0000000000..77e68cb865 Binary files /dev/null and b/docs/sources/static_files/lego_docker.jpg differ diff --git a/docs/theme/docker/layout.html b/docs/theme/docker/layout.html new file mode 100755 index 0000000000..6de60f933a --- /dev/null +++ b/docs/theme/docker/layout.html @@ -0,0 +1,244 @@ + + + + + + + + + + dotCloud - {{ meta['title'] if meta and meta['title'] else title }} + + + + + {%- set url_root = pathto('', 1) %} + {%- if url_root == '#' %}{% set url_root = '' %}{% endif %} + + + + {%- set css_files = css_files + ['_static/css/bootstrap.css'] %} + {%- set css_files = css_files + ['_static/css/bootstrap-responsive.css'] %} + {%- set css_files = css_files + ['_static/pygments.css'] %} + {%- set css_files = css_files + ['_static/css/main.css'] %} + + {%- set script_files = + ['https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js'] + + ['https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js'] + + script_files + %} + + {%- set script_files = script_files + ['_static/js/docs.js'] %} + + {%- for cssfile in css_files %} + + {%- endfor %} + + {%- for scriptfile in script_files if scriptfile != '_static/jquery.js' %} + + {%- endfor %} + + {%- if favicon %} + + {%- endif %} + + {%- block extrahead %}{% endblock %} + + + + + +