Browse Source

Merge remote-tracking branch 'upstream/master'

Conflicts:
	commands.go
Roger Peppe 11 years ago
parent
commit
43fd85eb8f
100 changed files with 5515 additions and 7067 deletions
  1. 12 0
      .mailmap
  2. 67 1
      AUTHORS
  3. 92 1
      CHANGELOG.md
  4. 16 58
      CONTRIBUTING.md
  5. 24 13
      Dockerfile
  6. 3 10
      FIXME
  7. 37 5
      NOTICE
  8. 4 1
      README.md
  9. 1 1
      VERSION
  10. 6 0
      Vagrantfile
  11. 42 27
      api.go
  12. 118 2
      api_test.go
  13. 9 3
      auth/auth.go
  14. 83 7
      auth/auth_test.go
  15. 1 2
      buildfile.go
  16. 70 26
      commands.go
  17. 142 0
      commands_test.go
  18. 104 78
      container.go
  19. 23 0
      contrib/Dockerfile.tmLanguage/Dockerfile.YAML-tmLanguage
  20. 50 0
      contrib/Dockerfile.tmLanguage/Dockerfile.tmLanguage
  21. 1 0
      contrib/Dockerfile.tmLanguage/MAINTAINERS
  22. 9 0
      contrib/Dockerfile.tmLanguage/README.md
  23. 0 1
      contrib/MAINTAINERS
  24. 1 1
      contrib/completion/bash/docker
  25. 242 0
      contrib/completion/zsh/_docker
  26. 0 61
      contrib/install.sh
  27. 67 0
      contrib/mkimage-arch.sh
  28. 15 0
      contrib/mkimage-centos.sh
  29. 37 9
      contrib/mkimage-debian.sh
  30. 22 0
      contrib/vim-syntax/LICENSE
  31. 23 0
      contrib/vim-syntax/README.md
  32. 18 0
      contrib/vim-syntax/doc/dockerfile.txt
  33. 1 0
      contrib/vim-syntax/ftdetect/dockerfile.vim
  34. 22 0
      contrib/vim-syntax/syntax/dockerfile.vim
  35. 1 1
      docker/docker.go
  36. 87 25
      docs/README.md
  37. 62 47
      docs/sources/api/docker_remote_api.rst
  38. 607 635
      docs/sources/api/docker_remote_api_v1.5.rst
  39. 1218 0
      docs/sources/api/docker_remote_api_v1.6.rst
  40. 22 20
      docs/sources/api/index_api.rst
  41. 114 77
      docs/sources/api/registry_api.rst
  42. 2 4
      docs/sources/api/registry_index_spec.rst
  43. 37 0
      docs/sources/api/remote_api_client_libraries.rst
  44. 66 35
      docs/sources/commandline/cli.rst
  45. 8 5
      docs/sources/commandline/command/commit.rst
  46. 1 1
      docs/sources/commandline/command/images.rst
  47. 2 1
      docs/sources/commandline/command/run.rst
  48. 1 1
      docs/sources/contributing/devenvironment.rst
  49. 12 9
      docs/sources/examples/hello_world.rst
  50. 25 13
      docs/sources/examples/postgresql_service.rst
  51. 1 1
      docs/sources/index.rst
  52. 4 4
      docs/sources/installation/amazon.rst
  53. 1 1
      docs/sources/installation/archlinux.rst
  54. 24 51
      docs/sources/installation/gentoolinux.rst
  55. 2 2
      docs/sources/installation/ubuntulinux.rst
  56. 5 8
      docs/sources/installation/upgrading.rst
  57. 1 3
      docs/sources/installation/vagrant.rst
  58. 0 0
      docs/sources/static_files/docker_images.gif
  59. 1 1
      docs/sources/toctree.rst
  60. 4 2
      docs/sources/use/baseimages.rst
  61. 12 6
      docs/sources/use/builder.rst
  62. 27 0
      docs/sources/use/workingwithrepository.rst
  63. 113 198
      docs/theme/docker/layout.html
  64. 0 1109
      docs/theme/docker/static/css/bootstrap-responsive.css
  65. 0 1088
      docs/theme/docker/static/css/bootstrap-responsive.min.css
  66. 330 329
      docs/theme/docker/static/css/main.css
  67. 452 345
      docs/theme/docker/static/css/main.less
  68. 499 178
      docs/theme/docker/static/css/variables.less
  69. BIN
      docs/theme/docker/static/img/container3.png
  70. 0 0
      docs/theme/docker/static/img/dockerlogo-h.png
  71. BIN
      docs/theme/docker/static/img/menu_arrow_down.gif
  72. BIN
      docs/theme/docker/static/img/menu_arrow_right.gif
  73. 93 32
      docs/theme/docker/static/js/docs.js
  74. 0 8
      docs/theme/docker/static/js/jquery.ba-bbq.min.js
  75. 0 9
      docs/theme/docker/static/js/jquery.ba-urlinternal.min.js
  76. 0 1
      docs/theme/docker/static/js/main.js
  77. 0 2268
      docs/theme/docker/static/js/vendor/bootstrap.js
  78. 0 5
      docs/theme/docker/static/js/vendor/bootstrap.min.js
  79. 0 2
      docs/theme/docker/static/js/vendor/jquery-1.9.1.min.js
  80. 0 3
      docs/theme/docker/static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js
  81. 1 0
      hack/CONTRIBUTORS.md
  82. 1 0
      hack/MAINTAINERS
  83. 78 0
      hack/MAINTAINERS.md
  84. 1 0
      hack/PACKAGERS.md
  85. 24 0
      hack/README.md
  86. 0 28
      hack/README.rst
  87. 22 11
      hack/RELEASE-CHECKLIST.md
  88. 0 36
      hack/Vagrantfile
  89. 0 1
      hack/environment/README.rst
  90. 0 19
      hack/environment/bash_profile
  91. 0 18
      hack/environment/buildbot.conf
  92. 0 43
      hack/environment/master.cfg
  93. 0 21
      hack/environment/post-commit
  94. 0 6
      hack/environment/requirements.txt
  95. 0 45
      hack/environment/setup.sh
  96. 80 2
      hack/infrastructure/README.md
  97. 43 2
      hack/infrastructure/docker-ci.rst
  98. 43 0
      hack/infrastructure/docker-ci/Dockerfile
  99. 0 0
      hack/infrastructure/docker-ci/MAINTAINERS
  100. 26 0
      hack/infrastructure/docker-ci/README.rst

+ 12 - 0
.mailmap

@@ -26,3 +26,15 @@ Roberto Hashioka <roberto_hashioka@hotmail.com>
 Konstantin Pelykh <kpelykh@zettaset.com>
 David Sissitka <me@dsissitka.com>
 Nolan Darilek <nolan@thewordnerd.info>
+<mastahyeti@gmail.com> <mastahyeti@users.noreply.github.com>
+Benoit Chesneau <bchesneau@gmail.com>
+Jordan Arentsen <blissdev@gmail.com>
+Daniel Garcia <daniel@danielgarcia.info>
+Miguel Angel Fernández <elmendalerenda@gmail.com>
+Bhiraj Butala <abhiraj.butala@gmail.com>
+Faiz Khan <faizkhan00@gmail.com>
+Victor Lyuboslavsky <victor@victoreda.com>
+Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
+Matthew Mueller <mattmuelle@gmail.com>
+<mosoni@ebay.com> <mohitsoni1989@gmail.com>
+Shih-Yuan Lee <fourdollars@gmail.com>

+ 67 - 1
AUTHORS

@@ -5,64 +5,98 @@
 #
 Al Tobey <al@ooyala.com>
 Alex Gaynor <alex.gaynor@gmail.com>
+Alexander Larsson <alexl@redhat.com>
 Alexey Shamrin <shamrin@gmail.com>
 Andrea Luzzardi <aluzzardi@gmail.com>
+Andreas Savvides <andreas@editd.com>
 Andreas Tiefenthaler <at@an-ti.eu>
+Andrew Macgregor <andrew.macgregor@agworld.com.au>
 Andrew Munsell <andrew@wizardapps.net>
 Andrews Medina <andrewsmedina@gmail.com>
 Andy Rothfusz <github@metaliveblog.com>
 Andy Smith <github@anarkystic.com>
 Anthony Bishopric <git@anthonybishopric.com>
 Antony Messerli <amesserl@rackspace.com>
+Asbjørn Enge <asbjorn@hanafjedle.net>
 Barry Allard <barry.allard@gmail.com>
+Ben Toews <mastahyeti@gmail.com>
+Benoit Chesneau <bchesneau@gmail.com>
+Bhiraj Butala <abhiraj.butala@gmail.com>
+Bouke Haarsma <bouke@webatoom.nl>
 Brandon Liu <bdon@bdon.org>
+Brandon Philips <brandon@ifup.co>
 Brian McCallister <brianm@skife.org>
 Brian Olsen <brian@maven-group.org>
+Brian Shumate <brian@couchbase.com>
+Briehan Lombaard <briehan.lombaard@gmail.com>
 Bruno Bigras <bigras.bruno@gmail.com>
 Caleb Spare <cespare@gmail.com>
 Calen Pennington <cale@edx.org>
 Charles Hooper <charles.hooper@dotcloud.com>
 Christopher Currie <codemonkey+github@gmail.com>
+Colin Dunklau <colin.dunklau@gmail.com>
 Colin Rice <colin@daedrum.net>
+Dan Buch <d.buch@modcloth.com>
+Daniel Garcia <daniel@danielgarcia.info>
 Daniel Gasienica <daniel@gasienica.ch>
 Daniel Mizyrycki <daniel.mizyrycki@dotcloud.com>
+Daniel Nordberg <dnordberg@gmail.com>
 Daniel Robinson <gottagetmac@gmail.com>
 Daniel Von Fange <daniel@leancoder.com>
 Daniel YC Lin <dlin.tw@gmail.com>
 David Calavera <david.calavera@gmail.com>
 David Sissitka <me@dsissitka.com>
+Deni Bertovic <deni@kset.org>
 Dominik Honnef <dominik@honnef.co>
 Don Spaulding <donspauldingii@gmail.com>
 Dr Nic Williams <drnicwilliams@gmail.com>
+Dražen Lučanin <kermit666@gmail.com>
 Elias Probst <mail@eliasprobst.eu>
 Emily Rose <emily@contactvibe.com>
 Eric Hanchrow <ehanchrow@ine.com>
 Eric Myhre <hash@exultant.us>
 Erno Hopearuoho <erno.hopearuoho@gmail.com>
+Evan Phoenix <evan@fallingsnow.net>
 Evan Wies <evan@neomantra.net>
 ezbercih <cem.ezberci@gmail.com>
 Fabrizio Regini <freegenie@gmail.com>
+Faiz Khan <faizkhan00@gmail.com>
 Fareed Dudhia <fareeddudhia@googlemail.com>
 Flavio Castelli <fcastelli@suse.com>
 Francisco Souza <f@souza.cc>
 Frederick F. Kautz IV <fkautz@alumni.cmu.edu>
 Gabriel Monroy <gabriel@opdemand.com>
 Gareth Rushgrove <gareth@morethanseven.net>
+Greg Thornton <xdissent@me.com>
 Guillaume J. Charmes <guillaume.charmes@dotcloud.com>
+Guruprasad <lgp171188@gmail.com>
 Harley Laue <losinggeneration@gmail.com>
+Hector Castro <hectcastro@gmail.com>
 Hunter Blanks <hunter@twilio.com>
+Isao Jonas <isao.jonas@gmail.com>
+James Carr <james.r.carr@gmail.com>
+Jason McVetta <jason.mcvetta@gmail.com>
+Jean-Baptiste Barth <jeanbaptiste.barth@gmail.com>
 Jeff Lindsay <progrium@gmail.com>
 Jeremy Grosser <jeremy@synack.me>
+Jim Alateras <jima@comware.com.au>
+Jimmy Cuadra <jimmy@jimmycuadra.com>
+Joe Van Dyk <joe@tanga.com>
 Joffrey F <joffrey@dotcloud.com>
 Johan Euphrosine <proppy@google.com>
 John Costa <john.costa@gmail.com>
 Jon Wedaman <jweede@gmail.com>
 Jonas Pfenniger <jonas@pfenniger.name>
+Jonathan Mueller <j.mueller@apoveda.ch>
 Jonathan Rudenberg <jonathan@titanous.com>
+Joost Cassee <joost@cassee.net>
+Jordan Arentsen <blissdev@gmail.com>
 Joseph Anthony Pasquale Holsten <joseph@josephholsten.com>
 Julien Barbier <write0@gmail.com>
 Jérôme Petazzoni <jerome.petazzoni@dotcloud.com>
 Karan Lyons <karan@karanlyons.com>
+Karl Grzeszczak <karl@karlgrz.com>
+Kawsar Saiyeed <kawsar.saiyeed@projiris.com>
 Keli Hu <dev@keli.hu>
 Ken Cochrane <kencochrane@gmail.com>
 Kevin Clark <kevin.clark@gmail.com>
@@ -71,28 +105,45 @@ kim0 <email.ahmedkamal@googlemail.com>
 Kimbro Staken <kstaken@kstaken.com>
 Kiran Gangadharan <kiran.daredevil@gmail.com>
 Konstantin Pelykh <kpelykh@zettaset.com>
+Kyle Conroy <kyle.j.conroy@gmail.com>
+Laurie Voss <github@seldo.com>
 Louis Opter <kalessin@kalessin.fr>
+Manuel Meurer <manuel@krautcomputing.com>
 Marco Hennings <marco.hennings@freiheit.com>
 Marcus Farkas <toothlessgear@finitebox.com>
+Marcus Ramberg <marcus@nordaaker.com>
 Mark McGranaghan <mmcgrana@gmail.com>
-Martin Redmond <mrtodo@gmail.com>
+Marko Mikulicic <mmikulicic@gmail.com>
+Markus Fix <lispmeister@gmail.com>
+Martin Redmond <martin@tinychat.com>
+Matt Apperson <me@mattapperson.com>
+Matt Bachmann <bachmann.matt@gmail.com>
+Matthew Mueller <mattmuelle@gmail.com>
 Maxim Treskin <zerthurd@gmail.com>
 meejah <meejah@meejah.ca>
 Michael Crosby <crosby.michael@gmail.com>
+Michael Gorsuch <gorsuch@github.com>
+Miguel Angel Fernández <elmendalerenda@gmail.com>
 Mike Gaffney <mike@uberu.com>
 Mikhail Sobolev <mss@mawhrin.net>
+Mohit Soni <mosoni@ebay.com>
+Morten Siebuhr <sbhr@sbhr.dk>
 Nan Monnand Deng <monnand@gmail.com>
 Nate Jones <nate@endot.org>
 Nelson Chen <crazysim@gmail.com>
 Niall O'Higgins <niallo@unworkable.org>
+Nick Payne <nick@kurai.co.uk>
 Nick Stenning <nick.stenning@digital.cabinet-office.gov.uk>
 Nick Stinemates <nick@stinemates.org>
 Nolan Darilek <nolan@thewordnerd.info>
 odk- <github@odkurzacz.org>
+Pascal Borreli <pascal@borreli.com>
 Paul Bowsher <pbowsher@globalpersonals.co.uk>
 Paul Hammond <paul@paulhammond.org>
 Phil Spitler <pspitler@gmail.com>
 Piotr Bogdan <ppbogdan@gmail.com>
+pysqz <randomq@126.com>
+Ramon van Alteren <ramon@vanalteren.nl>
 Renato Riccieri Santos Zannon <renato.riccieri@gmail.com>
 Rhys Hiltner <rhys@twitch.tv>
 Robert Obryk <robryk@gmail.com>
@@ -100,14 +151,21 @@ Roberto Hashioka <roberto_hashioka@hotmail.com>
 Ryan Fowler <rwfowler@gmail.com>
 Sam Alba <sam.alba@gmail.com>
 Sam J Sharpe <sam.sharpe@digital.cabinet-office.gov.uk>
+Sean P. Kane <skane@newrelic.com>
 Shawn Siefkas <shawn.siefkas@meredith.com>
+Shih-Yuan Lee <fourdollars@gmail.com>
 Silas Sewell <silas@sewell.org>
 Solomon Hykes <solomon@dotcloud.com>
+Song Gao <song@gao.io>
+Sridatta Thatipamala <sthatipamala@gmail.com>
 Sridhar Ratnakumar <sridharr@activestate.com>
+Steeve Morin <steeve.morin@gmail.com>
 Stefan Praszalowicz <stefan@greplin.com>
 Thatcher Peskens <thatcher@dotcloud.com>
+Thermionix <bond711@gmail.com>
 Thijs Terlouw <thijsterlouw@gmail.com>
 Thomas Bikeev <thomas.bikeev@mac.com>
+Thomas Frössman <thomasf@jossystem.se>
 Thomas Hansen <thomas.hansen@gmail.com>
 Tianon Gravi <admwiggin@gmail.com>
 Tim Terhorst <mynamewastaken+git@gmail.com>
@@ -115,8 +173,16 @@ Tobias Bieniek <Tobias.Bieniek@gmx.de>
 Tobias Schmidt <ts@soundcloud.com>
 Tobias Schwab <tobias.schwab@dynport.de>
 Tom Hulihan <hulihan.tom159@gmail.com>
+Tommaso Visconti <tommaso.visconti@gmail.com>
+Tyler Brock <tyler.brock@gmail.com>
 unclejack <unclejacksons@gmail.com>
+Victor Coisne <victor.coisne@dotcloud.com>
+Victor Lyuboslavsky <victor@victoreda.com>
 Victor Vieux <victor.vieux@dotcloud.com>
+Vincent Bernat <bernat@luffy.cx>
 Vivek Agarwal <me@vivek.im>
+Vladimir Kirillov <proger@wilab.org.ua>
 Walter Stanish <walter@pratyeka.org>
+Wes Morgan <cap10morgan@gmail.com>
 Will Dietz <w@wdtz.org>
+Zaiste! <oh@zaiste.net>

+ 92 - 1
CHANGELOG.md

@@ -1,5 +1,96 @@
 # Changelog
 
+## 0.6.4 (2013-10-16)
+- Runtime: Add cleanup of container when Start() fails
+- Testing: Catch errClosing error when TCP and UDP proxies are terminated
+- Testing: Add aggregated docker-ci email report
+- Testing: Remove a few errors in tests
+* Contrib: Reorganize contributed completion scripts to add zsh completion
+* Contrib: Add vim syntax highlighting for Dockerfiles from @honza
+* Runtime: Add better comments to utils/stdcopy.go
+- Testing: add cleanup to remove leftover containers
+* Documentation: Document how to edit and release docs
+* Documentation: Add initial draft of the Docker infrastructure doc
+* Contrib: Add mkimage-arch.sh
+- Builder: Abort build if mergeConfig returns an error and fix duplicate error message
+- Runtime: Remove error messages which are not actually errors
+* Testing: Only run certain tests with TESTFLAGS='-run TestName' make.sh
+* Testing: Prevent docker-ci to test closing PRs
+- Documentation: Minor updates to postgresql_service.rst
+* Testing: Add nightly release to docker-ci
+* Hack: Improve network performance for VirtualBox
+* Hack: Add vagrant user to the docker group
+* Runtime: Add utils.Errorf for error logging
+- Packaging: Remove deprecated packaging directory
+* Hack: Revamp install.sh to be usable by more people, and to use official install methods whenever possible (apt repo, portage tree, etc.)
+- Hack: Fix contrib/mkimage-debian.sh apt caching prevention
+* Documentation: Clarify LGTM process to contributors
+- Documentation: Small fixes to parameter names in docs for ADD command
+* Runtime: Record termination time in state.
+- Registry: Use correct auth config when logging in.
+- Documentation: Corrected error in the package name
+* Documentation: Document what `vagrant up` is actually doing
+- Runtime: Fix `docker rm` with volumes
+- Runtime: Use empty string so TempDir uses the OS's temp dir automatically
+- Runtime: Make sure to close the network allocators
+* Testing: Replace panic by log.Fatal in tests
++ Documentation: improve doc search results
+- Runtime: Fix some error cases where a HTTP body might not be closed
+* Hack: Add proper bash completion for "docker push"
+* Documentation: Add devenvironment link to CONTRIBUTING.md
+* Documentation: Cleanup whitespace in API 1.5 docs
+* Documentation: use angle brackets in MAINTAINER example email
+- Testing: Increase TestRunDetach timeout
+* Documentation: Fix help text for -v option
++ Hack: Added Dockerfile.tmLanguage to contrib
++ Runtime: Autorestart containers by default
+* Testing: Adding more tests around auth.ResolveAuthConfig
+* Hack: Configured FPM to make /etc/init/docker.conf a config file
+* Hack: Add xz utils as a runtime dep
+* Documentation: Add `apt-get install curl` to Ubuntu docs
+* Documentation: Remove Gentoo install notes about #1422 workaround
+* Documentation: Fix Ping endpoint documentation
+* Runtime: Bump vendor kr/pty to commit 3b1f6487b (syscall.O_NOCTTY)
+* Runtime: lxc: Allow set_file_cap capability in container
+* Documentation: Update archlinux.rst
+- Documentation: Fix ironic typo in changelog
+* Documentation: Add explanation for export restrictions
+* Hack: Add cleanup/refactor portion of #2010 for hack and Dockerfile updates
++ Documentation: Changes to a new style for the docs. Includes version switcher.
+* Documentation: Formatting, add information about multiline json
++ Hack: Add contrib/mkimage-centos.sh back (from #1621), and associated documentation link
+- Runtime: Fix panic with wrong dockercfg file
+- Runtime: Fix the attach behavior with -i
+* Documentation: Add .dockercfg doc
+- Runtime: Move run -rm to the cli only
+* Hack: Enable SSH Agent forwarding in Vagrant VM
++ Runtime: Add -rm to docker run for removing a container on exit
+* Documentation: Improve registry and index REST API documentation
+* Runtime: Split stdout stderr
+- Documentation: Replace deprecated upgrading reference to docker-latest.tgz, which hasn't been updated since 0.5.3
+* Documentation: Update Gentoo installation documentation now that we're in the portage tree proper
+- Registry: Fix the error message so it is the same as the regex
+* Runtime: Always create a new session for the container
+* Hack: Add several of the small make.sh fixes from #1920, and make the output more consistent and contributor-friendly
+* Documentation: Various command fixes in postgres example
+* Documentation: Cleanup and reorganize docs and tooling for contributors and maintainers
+- Documentation: Minor spelling correction of protocoll -> protocol
+* Hack: Several small tweaks/fixes for contrib/mkimage-debian.sh
++ Hack: Add @tianon to hack/MAINTAINERS
+
+## 0.6.3 (2013-09-23)
+* Packaging: Update tar vendor dependency
+- Client: Fix detach issue
+- Runtime: Only copy and change permissions on non-bindmount volumes
+- Registry: Update regular expression to match index
+* Runtime: Allow multiple volumes-from
+* Packaging: Download apt key over HTTPS
+* Documentation: Update section on extracting the docker binary after build
+* Documentation: Update development environment docs for new build process
+* Documentation: Remove 'base' image from documentation
+* Packaging: Add 'docker' group on install for ubuntu package
+- Runtime: Fix HTTP imports from STDIN
+
 ## 0.6.2 (2013-09-17)
 + Hack: Vendor all dependencies
 + Builder: Add -rm option in order to remove intermediate containers
@@ -13,7 +104,7 @@
 * Registry: Implement login with private registry
 * Remote API: Bump to v1.5
 * Packaging: Break down hack/make.sh into small scripts, one per 'bundle': test, binary, ubuntu etc.
-* Documentation: General improvments
+* Documentation: General improvements
 - Runtime: UID and GID are now also applied to volumes
 - Runtime: `docker start` set error code upon error
 - Runtime: `docker run` set the same error code as the process started

+ 16 - 58
CONTRIBUTING.md

@@ -3,6 +3,10 @@
 Want to hack on Docker? Awesome! Here are instructions to get you started. They are probably not perfect, please let us know if anything feels
 wrong or incomplete.
 
+## Build Environment
+
+For instructions on setting up your development environment, please see our dedicated [dev environment setup docs](http://docs.docker.io/en/latest/contributing/devenvironment/).
+
 ## Contribution guidelines
 
 ### Pull requests are always welcome
@@ -55,8 +59,10 @@ Submit unit tests for your changes.  Go has a great test framework built in; use
 it! Take a look at existing tests for inspiration. Run the full test suite on
 your branch before submitting a pull request.
 
-Make sure you include relevant updates or additions to documentation when
-creating or modifying features.
+Update the documentation when creating or modifying features. Test
+your documentation changes for clarity, concision, and correctness, as
+well as a clean docmuent build. See ``docs/README.md`` for more
+information on building the docs and how docs get released.
 
 Write clean code. Universally formatted code promotes ease of writing, reading,
 and maintenance. Always run `go fmt` before committing your changes. Most
@@ -89,53 +95,17 @@ name and email address match your git configuration. The AUTHORS file is
 regenerated occasionally from the git commit history, so a mismatch may result
 in your changes being overwritten.
 
+### Approval
 
-## Decision process
-
-### How are decisions made?
-
-Short answer: with pull requests to the docker repository.
-
-Docker is an open-source project with an open design philosophy. This means that the repository is the source of truth for EVERY aspect of the project,
-including its philosophy, design, roadmap and APIs. *If it's part of the project, it's in the repo. It's in the repo, it's part of the project.*
-
-As a result, all decisions can be expressed as changes to the repository. An implementation change is a change to the source code. An API change is a change to
-the API specification. A philosophy change is a change to the philosophy manifesto. And so on.
-
-All decisions affecting docker, big and small, follow the same 3 steps:
-
-* Step 1: Open a pull request. Anyone can do this.
-
-* Step 2: Discuss the pull request. Anyone can do this.
-
-* Step 3: Accept or refuse a pull request. The relevant maintainer does this (see below "Who decides what?")
-
-
-### Who decides what?
-
-So all decisions are pull requests, and the relevant maintainer makes the decision by accepting or refusing the pull request.
-But how do we identify the relevant maintainer for a given pull request?
+Docker maintainers use LGTM (looks good to me) in comments on the code review
+to indicate acceptance.
 
-Docker follows the timeless, highly efficient and totally unfair system known as [Benevolent dictator for life](http://en.wikipedia.org/wiki/Benevolent_Dictator_for_Life),
-with yours truly, Solomon Hykes, in the role of BDFL.
-This means that all decisions are made by default by me. Since making every decision myself would be highly unscalable, in practice decisions are spread across multiple maintainers.
+A change requires LGTMs from an absolute majority of the maintainers of each
+component affected. For example, if a change affects docs/ and registry/, it
+needs an absolute majority from the maintainers of docs/ AND, separately, an
+absolute majority of the maintainers of registry
 
-The relevant maintainer for a pull request is assigned in 3 steps:
-
-* Step 1: Determine the subdirectory affected by the pull request. This might be src/registry, docs/source/api, or any other part of the repo.
-
-* Step 2: Find the MAINTAINERS file which affects this directory. If the directory itself does not have a MAINTAINERS file, work your way up the the repo hierarchy until you find one.
-
-* Step 3: The first maintainer listed is the primary maintainer. The pull request is assigned to him. He may assign it to other listed maintainers, at his discretion.
-
-
-### I'm a maintainer, should I make pull requests too?
-
-Primary maintainers are not required to create pull requests when changing their own subdirectory, but secondary maintainers are.
-
-### Who assigns maintainers?
-
-Solomon.
+For more details see [MAINTAINERS.md](hack/MAINTAINERS.md)
 
 ### How can I become a maintainer?
 
@@ -146,15 +116,3 @@ Solomon.
 Don't forget: being a maintainer is a time investment. Make sure you will have time to make yourself available.
 You don't have to be a maintainer to make a difference on the project!
 
-### What are a maintainer's responsibility?
-
-It is every maintainer's responsibility to:
-
-* 1) Expose a clear roadmap for improving their component.
-* 2) Deliver prompt feedback and decisions on pull requests.
-* 3) Be available to anyone with questions, bug reports, criticism etc. on their component. This includes irc, github requests and the mailing list.
-* 4) Make sure their component respects the philosophy, design and roadmap of the project.
-
-### How is this process changed?
-
-Just like everything else: by making a pull request :)

+ 24 - 13
Dockerfile

@@ -12,47 +12,58 @@
 #
 #
 # # Run the test suite:
-# docker run -privileged -lxc-conf=lxc.aa_profile=unconfined docker go test -v
+# docker run -privileged -lxc-conf=lxc.aa_profile=unconfined docker hack/make.sh test
 #
 # # Publish a release:
 # docker run -privileged -lxc-conf=lxc.aa_profile=unconfined \
-# -e AWS_S3_BUCKET=baz \
-# -e AWS_ACCESS_KEY=foo \
-# -e AWS_SECRET_KEY=bar \
-# -e GPG_PASSPHRASE=gloubiboulga \
-# -lxc-conf=lxc.aa_profile=unconfined -privileged docker hack/release.sh
-# 
+#  -e AWS_S3_BUCKET=baz \
+#  -e AWS_ACCESS_KEY=foo \
+#  -e AWS_SECRET_KEY=bar \
+#  -e GPG_PASSPHRASE=gloubiboulga \
+#  docker hack/release.sh
+#
 
 docker-version 0.6.1
 from	ubuntu:12.04
 maintainer	Solomon Hykes <solomon@dotcloud.com>
+
 # Build dependencies
 run	echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
 run	apt-get update
 run	apt-get install -y -q curl
 run	apt-get install -y -q git
 run	apt-get install -y -q mercurial
-# Install Go
-run	curl -s https://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz | tar -v -C /usr/local -xz
-env	PATH	/usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
-env	GOPATH	/go:/go/src/github.com/dotcloud/docker/vendor
+run	apt-get install -y -q build-essential
+
+# Install Go from source (for eventual cross-compiling)
 env	CGO_ENABLED 0
-run	cd /tmp && echo 'package main' > t.go && go test -a -i -v
+run	curl -s https://go.googlecode.com/files/go1.1.2.src.tar.gz | tar -v -C / -xz && mv /go /goroot
+run	cd /goroot/src && ./make.bash
+env GOROOT	/goroot
+env	PATH	$PATH:/goroot/bin
+env	GOPATH	/go:/go/src/github.com/dotcloud/docker/vendor
+
 # Ubuntu stuff
 run	apt-get install -y -q ruby1.9.3 rubygems libffi-dev
-run	gem install fpm
+run	gem install --no-rdoc --no-ri fpm
 run	apt-get install -y -q reprepro dpkg-sig
+
 # Install s3cmd 1.0.1 (earlier versions don't support env variables in the config)
 run	apt-get install -y -q python-pip
 run	pip install s3cmd
 run	pip install python-magic
 run	/bin/echo -e '[default]\naccess_key=$AWS_ACCESS_KEY\nsecret_key=$AWS_SECRET_KEY\n' > /.s3cfg
+
 # Runtime dependencies
 run	apt-get install -y -q iptables
 run	apt-get install -y -q lxc
+run	apt-get install -y -q aufs-tools
+
 volume	/var/lib/docker
 workdir	/go/src/github.com/dotcloud/docker
+
 # Wrap all commands in the "docker-in-docker" script to allow nested containers
 entrypoint ["hack/dind"]
+
 # Upload docker source
 add	.       /go/src/github.com/dotcloud/docker

+ 3 - 10
FIXME

@@ -15,23 +15,16 @@ to put them - so we put them here :)
 * Run linter on codebase
 * Unify build commands and regular commands
 * Move source code into src/ subdir for clarity
-* Clean up the Makefile, it's a mess
 * docker build: on non-existent local path for ADD, don't show full absolute path on the host
-* mount into /dockerinit rather than /sbin/init
 * docker tag foo REPO:TAG
 * use size header for progress bar in pull
 * Clean up context upload in build!!!
 * Parallel pull
-* Ensure /proc/sys/net/ipv4/ip_forward is 1
-* Force DNS to public!
 * Always generate a resolv.conf per container, to avoid changing resolv.conf under thne container's feet
-* Save metadata with import/export
+* Save metadata with import/export (#1974)
 * Upgrade dockerd without stopping containers
-* bring back git revision info, looks like it was lost
-* Simple command to remove all untagged images
+* Simple command to remove all untagged images (`docker rmi $(docker images | awk '/^<none>/ { print $3 }')`)
 * Simple command to clean up containers for disk space
-* Caching after an ADD
-* entry point config
-* bring back git revision info, looks like it was lost
+* Caching after an ADD (#880)
 * Clean up the ProgressReader api, it's a PITA to use
 * Use netlink instead of iproute2/iptables (#925)

+ 37 - 5
NOTICE

@@ -1,11 +1,43 @@
 Docker
 Copyright 2012-2013 dotCloud, inc.
 
-This product includes software developed at dotCloud, inc. (http://www.dotcloud.com).
+This product includes software developed at dotCloud,
+inc. (http://www.dotcloud.com).
 
-This product contains software (https://github.com/kr/pty) developed by Keith Rarick, licensed under the MIT License.
+This product contains software (https://github.com/kr/pty) developed
+by Keith Rarick, licensed under the MIT License.
 
-Transfers of Docker shall be in accordance with applicable export controls of any country and all other applicable
-legal requirements.  Docker shall not be distributed or downloaded to or in Cuba, Iran, North Korea, Sudan or Syria
-and shall not be distributed or downloaded to any person on the Denied Persons List administered by the U.S.
+The following is courtesy of our legal counsel:
+
+Transfers of Docker shall be in accordance with applicable export
+controls of any country and all other applicable legal requirements.
+Docker shall not be distributed or downloaded to or in Cuba, Iran,
+North Korea, Sudan or Syria and shall not be distributed or downloaded
+to any person on the Denied Persons List administered by the U.S.
 Department of Commerce.
+
+What does that mean? 
+Here is a further explanation from our legal counsel:
+
+Like all software products that utilize cryptography, the export and
+use of Docker is subject to the U.S. Commerce Department's Export
+Administration Regulations (EAR) because it uses or contains
+cryptography (see
+http://www.bis.doc.gov/index.php/policy-guidance/encryption).  Certain
+free and open source software projects have a lightweight set of
+requirements, which can generally be met by providing email notice to
+the appropriate U.S. government agencies that their source code is
+available on a publicly available repository and making the
+appropriate statements in the README.
+
+The restrictions of the EAR apply to certain denied locations
+(currently Iran, Sudan, Syria, North Korea, or Cuba) and those
+individuals on the Denied Persons List, which is available here:
+http://www.bis.doc.gov/index.php/policy-guidance/lists-of-parties-of-concern/denied-persons-list.
+If you are incorporating Docker into a new open source project, the
+EAR restrictions apply to your incorporation of Docker into your
+project in the same manner as other cryptography-enabled projects,
+such as OpenSSL, almost all Linux distributions, etc.
+
+For more information, see http://www.apache.org/dev/crypto.html and/or
+seek legal counsel.

+ 4 - 1
README.md

@@ -18,7 +18,7 @@ Platform-as-a-Service.  It benefits directly from the experience
 accumulated over several years of large-scale operation and support of
 hundreds of thousands of applications and databases.
 
-![Docker L](docs/sources/static_files/dockerlogo-h.png "Docker")
+![Docker L](docs/theme/docker/static/img/dockerlogo-h.png "Docker")
 
 ## Better than VMs
 
@@ -190,6 +190,9 @@ wrong or incomplete.
 
 ### Legal
 
+*Brought to you courtesy of our legal counsel. For more context,
+please see the Notice document.*
+
 Transfers of Docker shall be in accordance with applicable export
 controls of any country and all other applicable legal requirements.
 Docker shall not be distributed or downloaded to or in Cuba, Iran,

+ 1 - 1
VERSION

@@ -1 +1 @@
-0.6.2-dev
+0.6.4-dev

+ 6 - 0
Vagrantfile

@@ -13,6 +13,8 @@ Vagrant::Config.run do |config|
   config.vm.box = BOX_NAME
   config.vm.box_url = BOX_URI
 
+  config.ssh.forward_agent = true
+
   # Provision docker and new kernel if deployment was not done.
   # It is assumed Vagrant can successfully launch the provider instance.
   if Dir.glob("#{File.dirname(__FILE__)}/.vagrant/machines/default/*/id").empty?
@@ -37,6 +39,8 @@ Vagrant::Config.run do |config|
         "echo 'Installation of VBox Guest Additions is proceeding in the background.'; " \
         "echo '\"vagrant reload\" can be used in about 2 minutes to activate the new guest additions.'; "
     end
+    # Add vagrant user to the docker group
+    pkg_cmd << "usermod -a -G docker vagrant; "
     # Activate new kernel
     pkg_cmd << "shutdown -r +1; "
     config.vm.provision :shell, :inline => pkg_cmd
@@ -76,6 +80,8 @@ Vagrant::VERSION >= "1.1.0" and Vagrant.configure("2") do |config|
   config.vm.provider :virtualbox do |vb|
     config.vm.box = BOX_NAME
     config.vm.box_url = BOX_URI
+    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
+    vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
   end
 end
 

+ 42 - 27
api.go

@@ -21,10 +21,12 @@ import (
 	"strings"
 )
 
-const APIVERSION = 1.5
-const DEFAULTHTTPHOST = "127.0.0.1"
-const DEFAULTHTTPPORT = 4243
-const DEFAULTUNIXSOCKET = "/var/run/docker.sock"
+const (
+	APIVERSION        = 1.6
+	DEFAULTHTTPHOST   = "127.0.0.1"
+	DEFAULTHTTPPORT   = 4243
+	DEFAULTUNIXSOCKET = "/var/run/docker.sock"
+)
 
 type HttpApiFunc func(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error
 
@@ -67,9 +69,12 @@ func httpError(w http.ResponseWriter, err error) {
 		statusCode = http.StatusUnauthorized
 	} else if strings.Contains(err.Error(), "hasn't been activated") {
 		statusCode = http.StatusForbidden
-	}
-	utils.Debugf("[error %d] %s", statusCode, err)
-	http.Error(w, err.Error(), statusCode)
+	}	
+	
+	if err != nil {
+		utils.Errorf("HTTP Error: statusCode=%d %s", statusCode, err.Error())
+		http.Error(w, err.Error(), statusCode)		
+	}	
 }
 
 func writeJSON(w http.ResponseWriter, code int, v interface{}) error {
@@ -100,7 +105,7 @@ func getBoolParam(value string) (bool, error) {
 func matchesContentType(contentType, expectedType string) bool {
 	mimetype, _, err := mime.ParseMediaType(contentType)
 	if err != nil {
-		utils.Debugf("Error parsing media type: %s error: %s", contentType, err.Error())
+		utils.Errorf("Error parsing media type: %s error: %s", contentType, err.Error())
 	}
 	return err == nil && mimetype == expectedType
 }
@@ -145,7 +150,7 @@ func getContainersExport(srv *Server, version float64, w http.ResponseWriter, r
 	name := vars["name"]
 
 	if err := srv.ContainerExport(name, w); err != nil {
-		utils.Debugf("%s", err)
+		utils.Errorf("%s", err)
 		return err
 	}
 	return nil
@@ -190,7 +195,7 @@ func getEvents(srv *Server, version float64, w http.ResponseWriter, r *http.Requ
 		_, err = wf.Write(b)
 		if err != nil {
 			// On error, evict the listener
-			utils.Debugf("%s", err)
+			utils.Errorf("%s", err)
 			srv.Lock()
 			delete(srv.listeners, r.RemoteAddr)
 			srv.Unlock()
@@ -344,8 +349,8 @@ func postCommit(srv *Server, version float64, w http.ResponseWriter, r *http.Req
 		return err
 	}
 	config := &Config{}
-	if err := json.NewDecoder(r.Body).Decode(config); err != nil {
-		utils.Debugf("%s", err)
+	if err := json.NewDecoder(r.Body).Decode(config); err != nil && err != io.EOF {
+		utils.Errorf("%s", err)
 	}
 	repo := r.Form.Get("repo")
 	tag := r.Form.Get("tag")
@@ -710,32 +715,43 @@ func postContainersAttach(srv *Server, version float64, w http.ResponseWriter, r
 	}
 	name := vars["name"]
 
-	if _, err := srv.ContainerInspect(name); err != nil {
+	c, err := srv.ContainerInspect(name)
+	if err != nil {
 		return err
 	}
 
-	in, out, err := hijackServer(w)
+	inStream, outStream, err := hijackServer(w)
 	if err != nil {
 		return err
 	}
 	defer func() {
-		if tcpc, ok := in.(*net.TCPConn); ok {
+		if tcpc, ok := inStream.(*net.TCPConn); ok {
 			tcpc.CloseWrite()
 		} else {
-			in.Close()
+			inStream.Close()
 		}
 	}()
 	defer func() {
-		if tcpc, ok := out.(*net.TCPConn); ok {
+		if tcpc, ok := outStream.(*net.TCPConn); ok {
 			tcpc.CloseWrite()
-		} else if closer, ok := out.(io.Closer); ok {
+		} else if closer, ok := outStream.(io.Closer); ok {
 			closer.Close()
 		}
 	}()
 
-	fmt.Fprintf(out, "HTTP/1.1 200 OK\r\nContent-Type: application/vnd.docker.raw-stream\r\n\r\n")
-	if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, in, out); err != nil {
-		fmt.Fprintf(out, "Error: %s\n", err)
+	var errStream io.Writer
+
+	fmt.Fprintf(outStream, "HTTP/1.1 200 OK\r\nContent-Type: application/vnd.docker.raw-stream\r\n\r\n")
+
+	if !c.Config.Tty && version >= 1.6 {
+		errStream = utils.NewStdWriter(outStream, utils.Stderr)
+		outStream = utils.NewStdWriter(outStream, utils.Stdout)
+	} else {
+		errStream = outStream
+	}
+
+	if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, inStream, outStream, errStream); err != nil {
+		fmt.Fprintf(outStream, "Error: %s\n", err)
 	}
 	return nil
 }
@@ -778,8 +794,8 @@ func wsContainersAttach(srv *Server, version float64, w http.ResponseWriter, r *
 	h := websocket.Handler(func(ws *websocket.Conn) {
 		defer ws.Close()
 
-		if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, ws, ws); err != nil {
-			utils.Debugf("Error: %s", err)
+		if err := srv.ContainerAttach(name, logs, stream, stdin, stdout, stderr, ws, ws, ws); err != nil {
+			utils.Errorf("Error: %s", err)
 		}
 	})
 	h.ServeHTTP(w, r)
@@ -892,8 +908,7 @@ func postBuild(srv *Server, version float64, w http.ResponseWriter, r *http.Requ
 	b := NewBuildFile(srv, utils.NewWriteFlusher(w), !suppressOutput, !noCache, rm)
 	id, err := b.Build(context)
 	if err != nil {
-		fmt.Fprintf(w, "Error build: %s\n", err)
-		return err
+		return fmt.Errorf("Error build: %s", err)
 	}
 	if repoName != "" {
 		srv.runtime.repositories.Set(repoName, tag, id, false)
@@ -925,7 +940,7 @@ func postContainersCopy(srv *Server, version float64, w http.ResponseWriter, r *
 	}
 
 	if err := srv.ContainerCopy(name, copyData.Resource, w); err != nil {
-		utils.Debugf("%s", err.Error())
+		utils.Errorf("%s", err.Error())
 		return err
 	}
 	return nil
@@ -970,7 +985,7 @@ func makeHttpHandler(srv *Server, logging bool, localMethod string, localRoute s
 		}
 
 		if err := handlerFunc(srv, version, w, r, mux.Vars(r)); err != nil {
-			utils.Debugf("Error: %s", err)
+			utils.Errorf("Error: %s", err)
 			httpError(w, err)
 		}
 	}

+ 118 - 2
api_test.go

@@ -5,6 +5,7 @@ import (
 	"bufio"
 	"bytes"
 	"encoding/json"
+	"fmt"
 	"github.com/dotcloud/docker/utils"
 	"io"
 	"net"
@@ -12,6 +13,7 @@ import (
 	"net/http/httptest"
 	"os"
 	"path"
+	"strings"
 	"testing"
 	"time"
 )
@@ -40,6 +42,25 @@ func TestGetBoolParam(t *testing.T) {
 	}
 }
 
+func TesthttpError(t *testing.T) {
+	r := httptest.NewRecorder()
+
+	httpError(r, fmt.Errorf("No such method"))
+	if r.Code != http.StatusNotFound {
+		t.Fatalf("Expected %d, got %d", http.StatusNotFound, r.Code)
+	}
+
+	httpError(r, fmt.Errorf("This accound hasn't been activated"))
+	if r.Code != http.StatusForbidden {
+		t.Fatalf("Expected %d, got %d", http.StatusForbidden, r.Code)
+	}
+
+	httpError(r, fmt.Errorf("Some error"))
+	if r.Code != http.StatusInternalServerError {
+		t.Fatalf("Expected %d, got %d", http.StatusInternalServerError, r.Code)
+	}
+}
+
 func TestGetVersion(t *testing.T) {
 	var err error
 	runtime := mkRuntime(t)
@@ -243,7 +264,11 @@ func TestGetImagesJSON(t *testing.T) {
 		t.Fatalf("Error expected, received none")
 	}
 
-	httpError(r4, err)
+	if !strings.HasPrefix(err.Error(), "Bad parameter") {
+		t.Fatalf("Error should starts with \"Bad parameter\"")
+	}
+	http.Error(r4, err.Error(), http.StatusBadRequest)
+
 	if r4.Code != http.StatusBadRequest {
 		t.Fatalf("%d Bad Request expected, received %d\n", http.StatusBadRequest, r4.Code)
 	}
@@ -776,6 +801,8 @@ func TestPostContainersStart(t *testing.T) {
 		t.Fatal(err)
 	}
 
+	req.Header.Set("Content-Type", "application/json")
+
 	r := httptest.NewRecorder()
 	if err := postContainersStart(srv, APIVERSION, r, req, map[string]string{"name": container.ID}); err != nil {
 		t.Fatal(err)
@@ -951,7 +978,96 @@ func TestPostContainersAttach(t *testing.T) {
 	})
 
 	setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
-		if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
+		if err := assertPipe("hello\n", string([]byte{1, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 15); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	// Close pipes (client disconnects)
+	if err := closeWrap(stdin, stdinPipe, stdout, stdoutPipe); err != nil {
+		t.Fatal(err)
+	}
+
+	// Wait for attach to finish, the client disconnected, therefore, Attach finished his job
+	setTimeout(t, "Waiting for CmdAttach timed out", 10*time.Second, func() {
+		<-c1
+	})
+
+	// We closed stdin, expect /bin/cat to still be running
+	// Wait a little bit to make sure container.monitor() did his thing
+	err = container.WaitTimeout(500 * time.Millisecond)
+	if err == nil || !container.State.Running {
+		t.Fatalf("/bin/cat is not running after closing stdin")
+	}
+
+	// Try to avoid the timeout in destroy. Best effort, don't check error
+	cStdin, _ := container.StdinPipe()
+	cStdin.Close()
+	container.Wait()
+}
+
+func TestPostContainersAttachStderr(t *testing.T) {
+	runtime := mkRuntime(t)
+	defer nuke(runtime)
+
+	srv := &Server{runtime: runtime}
+
+	container, err := runtime.Create(
+		&Config{
+			Image:     GetTestImage(runtime).ID,
+			Cmd:       []string{"/bin/sh", "-c", "/bin/cat >&2"},
+			OpenStdin: true,
+		},
+	)
+	if err != nil {
+		t.Fatal(err)
+	}
+	defer runtime.Destroy(container)
+
+	// Start the process
+	hostConfig := &HostConfig{}
+	if err := container.Start(hostConfig); err != nil {
+		t.Fatal(err)
+	}
+
+	stdin, stdinPipe := io.Pipe()
+	stdout, stdoutPipe := io.Pipe()
+
+	// Try to avoid the timeout in destroy. Best effort, don't check error
+	defer func() {
+		closeWrap(stdin, stdinPipe, stdout, stdoutPipe)
+		container.Kill()
+	}()
+
+	// Attach to it
+	c1 := make(chan struct{})
+	go func() {
+		defer close(c1)
+
+		r := &hijackTester{
+			ResponseRecorder: httptest.NewRecorder(),
+			in:               stdin,
+			out:              stdoutPipe,
+		}
+
+		req, err := http.NewRequest("POST", "/containers/"+container.ID+"/attach?stream=1&stdin=1&stdout=1&stderr=1", bytes.NewReader([]byte{}))
+		if err != nil {
+			t.Fatal(err)
+		}
+
+		if err := postContainersAttach(srv, APIVERSION, r, req, map[string]string{"name": container.ID}); err != nil {
+			t.Fatal(err)
+		}
+	}()
+
+	// Acknowledge hijack
+	setTimeout(t, "hijack acknowledge timed out", 2*time.Second, func() {
+		stdout.Read([]byte{})
+		stdout.Read(make([]byte, 4096))
+	})
+
+	setTimeout(t, "read/write assertion timed out", 2*time.Second, func() {
+		if err := assertPipe("hello\n", string([]byte{2, 0, 0, 0, 0, 0, 0, 6})+"hello", stdout, stdinPipe, 15); err != nil {
 			t.Fatal(err)
 		}
 	})

+ 9 - 3
auth/auth.go

@@ -91,11 +91,17 @@ func LoadConfig(rootPath string) (*ConfigFile, error) {
 		}
 		authConfig := AuthConfig{}
 		origAuth := strings.Split(arr[0], " = ")
+		if len(origAuth) != 2 {
+			return &configFile, fmt.Errorf("Invalid Auth config file")
+		}
 		authConfig.Username, authConfig.Password, err = decodeAuth(origAuth[1])
 		if err != nil {
 			return &configFile, err
 		}
 		origEmail := strings.Split(arr[1], " = ")
+		if len(origEmail) != 2 {
+			return &configFile, fmt.Errorf("Invalid Auth config file")
+		}
 		authConfig.Email = origEmail[1]
 		authConfig.ServerAddress = IndexServerAddress()
 		configFile.Configs[IndexServerAddress()] = authConfig
@@ -239,7 +245,7 @@ func (config *ConfigFile) ResolveAuthConfig(registry string) AuthConfig {
 	// as there is only one auth entry which is fully qualified we need to start
 	// parsing and matching
 
-	swapProtocoll := func(url string) string {
+	swapProtocol := func(url string) string {
 		if strings.HasPrefix(url, "http:") {
 			return strings.Replace(url, "http:", "https:", 1)
 		}
@@ -253,9 +259,9 @@ func (config *ConfigFile) ResolveAuthConfig(registry string) AuthConfig {
 		if c, found := config.Configs[url]; found {
 			return c
 		}
-		registrySwappedProtocoll := swapProtocoll(url)
+		registrySwappedProtocol := swapProtocol(url)
 		// now try to match with the different protocol
-		if c, found := config.Configs[registrySwappedProtocoll]; found {
+		if c, found := config.Configs[registrySwappedProtocol]; found {
 			return c
 		}
 		return AuthConfig{}

+ 83 - 7
auth/auth_test.go

@@ -75,20 +75,31 @@ func TestCreateAccount(t *testing.T) {
 	}
 }
 
-func TestSameAuthDataPostSave(t *testing.T) {
+func setupTempConfigFile() (*ConfigFile, error) {
 	root, err := ioutil.TempDir("", "docker-test")
 	if err != nil {
-		t.Fatal(err)
+		return nil, err
 	}
 	configFile := &ConfigFile{
 		rootPath: root,
-		Configs:  make(map[string]AuthConfig, 1),
+		Configs:  make(map[string]AuthConfig),
 	}
 
-	configFile.Configs["testIndex"] = AuthConfig{
-		Username: "docker-user",
-		Password: "docker-pass",
-		Email:    "docker@docker.io",
+	for _, registry := range []string{"testIndex", IndexServerAddress()} {
+		configFile.Configs[registry] = AuthConfig{
+			Username: "docker-user",
+			Password: "docker-pass",
+			Email:    "docker@docker.io",
+		}
+	}
+
+	return configFile, nil
+}
+
+func TestSameAuthDataPostSave(t *testing.T) {
+	configFile, err := setupTempConfigFile()
+	if err != nil {
+		t.Fatal(err)
 	}
 
 	err = SaveConfig(configFile)
@@ -110,3 +121,68 @@ func TestSameAuthDataPostSave(t *testing.T) {
 		t.Fail()
 	}
 }
+
+func TestResolveAuthConfigIndexServer(t *testing.T) {
+	configFile, err := setupTempConfigFile()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	for _, registry := range []string{"", IndexServerAddress()} {
+		resolved := configFile.ResolveAuthConfig(registry)
+		if resolved != configFile.Configs[IndexServerAddress()] {
+			t.Fail()
+		}
+	}
+}
+
+func TestResolveAuthConfigFullURL(t *testing.T) {
+	configFile, err := setupTempConfigFile()
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	registryAuth := AuthConfig{
+		Username: "foo-user",
+		Password: "foo-pass",
+		Email:    "foo@example.com",
+	}
+	localAuth := AuthConfig{
+		Username: "bar-user",
+		Password: "bar-pass",
+		Email:    "bar@example.com",
+	}
+	configFile.Configs["https://registry.example.com/v1/"] = registryAuth
+	configFile.Configs["http://localhost:8000/v1/"] = localAuth
+
+	validRegistries := map[string][]string{
+		"https://registry.example.com/v1/": {
+			"https://registry.example.com/v1/",
+			"http://registry.example.com/v1/",
+			"registry.example.com",
+			"registry.example.com/v1/",
+		},
+		"http://localhost:8000/v1/": {
+			"https://localhost:8000/v1/",
+			"http://localhost:8000/v1/",
+			"localhost:8000",
+			"localhost:8000/v1/",
+		},
+	}
+
+	for configKey, registries := range validRegistries {
+		for _, registry := range registries {
+			var (
+				configured AuthConfig
+				ok         bool
+			)
+			resolved := configFile.ResolveAuthConfig(registry)
+			if configured, ok = configFile.Configs[configKey]; !ok {
+				t.Fail()
+			}
+			if resolved.Email != configured.Email {
+				t.Errorf("%s -> %q != %q\n", registry, resolved.Email, configured.Email)
+			}
+		}
+	}
+}

+ 1 - 2
buildfile.go

@@ -458,9 +458,8 @@ func (b *buildFile) commit(id string, autoCmd []string, comment string) error {
 var lineContinuation = regexp.MustCompile(`\s*\\\s*\n`)
 
 func (b *buildFile) Build(context io.Reader) (string, error) {
-	// FIXME: @creack any reason for using /tmp instead of ""?
 	// FIXME: @creack "name" is a terrible variable name
-	name, err := ioutil.TempDir("/tmp", "docker-build")
+	name, err := ioutil.TempDir("", "docker-build")
 	if err != nil {
 		return "", err
 	}

+ 70 - 26
commands.go

@@ -6,6 +6,7 @@ import (
 	"bytes"
 	"encoding/base64"
 	"encoding/json"
+	"errors"
 	"flag"
 	"fmt"
 	"github.com/dotcloud/docker/auth"
@@ -36,6 +37,10 @@ var (
 	VERSION   string
 )
 
+var (
+	ErrConnectionRefused = errors.New("Can't connect to docker daemon. Is 'docker -d' running on this host?")
+)
+
 func (cli *DockerCli) getMethod(name string) (func(...string) error, bool) {
 	methodName := "Cmd" + strings.ToUpper(name[:1]) + strings.ToLower(name[1:])
 	method := reflect.ValueOf(cli).MethodByName(methodName)
@@ -292,7 +297,7 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
 	}
 
 	cli.LoadConfigFile()
-	authconfig, ok := cli.configFile.Configs[auth.IndexServerAddress()]
+	authconfig, ok := cli.configFile.Configs[serverAddress]
 	if !ok {
 		authconfig = auth.AuthConfig{}
 	}
@@ -407,7 +412,7 @@ func (cli *DockerCli) CmdVersion(args ...string) error {
 	var out APIVersion
 	err = json.Unmarshal(body, &out)
 	if err != nil {
-		utils.Debugf("Error unmarshal: body: %s, err: %s\n", body, err)
+		utils.Errorf("Error unmarshal: body: %s, err: %s\n", body, err)
 		return err
 	}
 	if out.Version != "" {
@@ -1219,7 +1224,7 @@ func (cli *DockerCli) CmdLogs(args ...string) error {
 		return nil
 	}
 
-	if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?logs=1&stdout=1&stderr=1", false, nil, cli.out); err != nil {
+	if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?logs=1&stdout=1&stderr=1", false, nil, cli.out, cli.err); err != nil {
 		return err
 	}
 	return nil
@@ -1252,7 +1257,7 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
 
 	if container.Config.Tty {
 		if err := cli.monitorTtySize(cmd.Arg(0)); err != nil {
-			return err
+			utils.Debugf("Error monitoring tty size: %s", err)
 		}
 	}
 
@@ -1262,7 +1267,7 @@ func (cli *DockerCli) CmdAttach(args ...string) error {
 	v.Set("stdout", "1")
 	v.Set("stderr", "1")
 
-	if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), container.Config.Tty, cli.in, cli.out); err != nil {
+	if err := cli.hijack("POST", "/containers/"+cmd.Arg(0)+"/attach?"+v.Encode(), container.Config.Tty, cli.in, cli.out, cli.err); err != nil {
 		return err
 	}
 	return nil
@@ -1422,6 +1427,9 @@ func (cli *DockerCli) CmdRun(args ...string) error {
 		return nil
 	}
 
+	flRm := cmd.Lookup("rm")
+	autoRemove, _ := strconv.ParseBool(flRm.Value.String())
+
 	var containerIDFile *os.File
 	if len(hostConfig.ContainerIDFile) > 0 {
 		if _, err := ioutil.ReadFile(hostConfig.ContainerIDFile); err == nil {
@@ -1519,14 +1527,14 @@ func (cli *DockerCli) CmdRun(args ...string) error {
 	if config.AttachStdin || config.AttachStdout || config.AttachStderr {
 		if config.Tty {
 			if err := cli.monitorTtySize(runResult.ID); err != nil {
-				utils.Debugf("Error monitoring TTY size: %s\n", err)
+				utils.Errorf("Error monitoring TTY size: %s\n", err)
 			}
 		}
 
 		v := url.Values{}
 		v.Set("logs", "1")
 		v.Set("stream", "1")
-		var out io.Writer
+		var out, stderr io.Writer
 
 		if config.AttachStdin {
 			v.Set("stdin", "1")
@@ -1537,7 +1545,11 @@ func (cli *DockerCli) CmdRun(args ...string) error {
 		}
 		if config.AttachStderr {
 			v.Set("stderr", "1")
-			out = cli.out
+			if config.Tty {
+				stderr = cli.out
+			} else {
+				stderr = cli.err
+			}
 		}
 
 		signals := make(chan os.Signal, 1)
@@ -1551,7 +1563,7 @@ func (cli *DockerCli) CmdRun(args ...string) error {
 			}
 		}()
 
-		if err := cli.hijack("POST", "/containers/"+runResult.ID+"/attach?"+v.Encode(), config.Tty, cli.in, out); err != nil {
+		if err := cli.hijack("POST", "/containers/"+runResult.ID+"/attach?"+v.Encode(), config.Tty, cli.in, out, stderr); err != nil {
 			utils.Debugf("Error hijack: %s", err)
 			return err
 		}
@@ -1561,12 +1573,18 @@ func (cli *DockerCli) CmdRun(args ...string) error {
 		// Detached mode
 		<-wait
 	} else {
-		status, err := waitForExit(cli, runResult.ID)
+		status, err := getExitCode(cli, runResult.ID)
 		if err != nil {
 			return err
 		}
+		if autoRemove {
+			_, _, err = cli.call("DELETE", "/containers/"+runResult.ID, nil)
+			if err != nil {
+				return err
+			}
+		}
 		if status != 0 {
-			return &utils.StatusError{status}
+			return &utils.StatusError{Status: status}
 		}
 	}
 
@@ -1632,7 +1650,7 @@ func (cli *DockerCli) call(method, path string, data interface{}) ([]byte, int,
 	dial, err := net.Dial(cli.proto, cli.addr)
 	if err != nil {
 		if strings.Contains(err.Error(), "connection refused") {
-			return nil, -1, fmt.Errorf("Can't connect to docker daemon. Is 'docker -d' running on this host?")
+			return nil, -1, ErrConnectionRefused
 		}
 		return nil, -1, err
 	}
@@ -1641,7 +1659,7 @@ func (cli *DockerCli) call(method, path string, data interface{}) ([]byte, int,
 	defer clientconn.Close()
 	if err != nil {
 		if strings.Contains(err.Error(), "connection refused") {
-			return nil, -1, fmt.Errorf("Can't connect to docker daemon. Is 'docker -d' running on this host?")
+			return nil, -1, ErrConnectionRefused
 		}
 		return nil, -1, err
 	}
@@ -1718,7 +1736,7 @@ func (cli *DockerCli) stream(method, path string, in io.Reader, out io.Writer, h
 	return nil
 }
 
-func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.ReadCloser, out io.Writer) error {
+func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.ReadCloser, stdout, stderr io.Writer) error {
 
 	req, err := http.NewRequest(method, fmt.Sprintf("/v%g%s", APIVERSION, path), nil)
 	if err != nil {
@@ -1744,10 +1762,16 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
 	rwc, br := clientconn.Hijack()
 	defer rwc.Close()
 
-	var receiveStdout (chan error)
-	if out != nil {
-		receiveStdout = utils.Go(func() error {
-			_, err := io.Copy(out, br)
+	var receiveStdout chan error
+
+	if stdout != nil {
+		receiveStdout = utils.Go(func() (err error) {
+			// When TTY is ON, use regular copy
+			if setRawTerminal {
+				_, err = io.Copy(stdout, br)
+			} else {
+				_, err = utils.StdCopy(stdout, stderr, br)
+			}
 			utils.Debugf("[hijack] End of stdout")
 			return err
 		})
@@ -1768,27 +1792,27 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
 		}
 		if tcpc, ok := rwc.(*net.TCPConn); ok {
 			if err := tcpc.CloseWrite(); err != nil {
-				utils.Debugf("Couldn't send EOF: %s\n", err)
+				utils.Errorf("Couldn't send EOF: %s\n", err)
 			}
 		} else if unixc, ok := rwc.(*net.UnixConn); ok {
 			if err := unixc.CloseWrite(); err != nil {
-				utils.Debugf("Couldn't send EOF: %s\n", err)
+				utils.Errorf("Couldn't send EOF: %s\n", err)
 			}
 		}
 		// Discard errors due to pipe interruption
 		return nil
 	})
 
-	if out != nil {
+	if stdout != nil {
 		if err := <-receiveStdout; err != nil {
-			utils.Debugf("Error receiveStdout: %s", err)
+			utils.Errorf("Error receiveStdout: %s", err)
 			return err
 		}
 	}
 
 	if !cli.isTerminal {
 		if err := <-sendStdin; err != nil {
-			utils.Debugf("Error sendStdin: %s", err)
+			utils.Errorf("Error sendStdin: %s", err)
 			return err
 		}
 	}
@@ -1802,7 +1826,7 @@ func (cli *DockerCli) getTtySize() (int, int) {
 	}
 	ws, err := term.GetWinsize(cli.terminalFd)
 	if err != nil {
-		utils.Debugf("Error getting size: %s", err)
+		utils.Errorf("Error getting size: %s", err)
 		if ws == nil {
 			return 0, 0
 		}
@@ -1819,7 +1843,7 @@ func (cli *DockerCli) resizeTty(id string) {
 	v.Set("h", strconv.Itoa(height))
 	v.Set("w", strconv.Itoa(width))
 	if _, _, err := cli.call("POST", "/containers/"+id+"/resize?"+v.Encode(), nil); err != nil {
-		utils.Debugf("Error resize: %s", err)
+		utils.Errorf("Error resize: %s", err)
 	}
 }
 
@@ -1860,7 +1884,11 @@ func (cli *DockerCli) LoadConfigFile() (err error) {
 func waitForExit(cli *DockerCli, containerId string) (int, error) {
 	body, _, err := cli.call("POST", "/containers/"+containerId+"/wait", nil)
 	if err != nil {
-		return -1, err
+		// If we can't connect, then the daemon probably died.
+		if err != ErrConnectionRefused {
+			return -1, err
+		}
+		return -1, nil
 	}
 
 	var out APIWait
@@ -1870,6 +1898,22 @@ func waitForExit(cli *DockerCli, containerId string) (int, error) {
 	return out.StatusCode, nil
 }
 
+func getExitCode(cli *DockerCli, containerId string) (int, error) {
+	body, _, err := cli.call("GET", "/containers/"+containerId+"/json", nil)
+	if err != nil {
+		// If we can't connect, then the daemon probably died.
+		if err != ErrConnectionRefused {
+			return -1, err
+		}
+		return -1, nil
+	}
+	c := &Container{}
+	if err := json.Unmarshal(body, c); err != nil {
+		return -1, err
+	}
+	return c.State.ExitCode, nil
+}
+
 func NewDockerCli(in io.ReadCloser, out, err io.Writer, proto, addr string) *DockerCli {
 	var (
 		isTerminal = false

+ 142 - 0
commands_test.go

@@ -369,6 +369,110 @@ func TestRunAttachStdin(t *testing.T) {
 	}
 }
 
+// TestRunDetach checks attaching and detaching with the escape sequence.
+func TestRunDetach(t *testing.T) {
+
+	stdin, stdinPipe := io.Pipe()
+	stdout, stdoutPipe := io.Pipe()
+
+	cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
+	defer cleanup(globalRuntime)
+
+	ch := make(chan struct{})
+	go func() {
+		defer close(ch)
+		cli.CmdRun("-i", "-t", unitTestImageID, "cat")
+	}()
+
+	setTimeout(t, "First read/write assertion timed out", 2*time.Second, func() {
+		if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	container := globalRuntime.List()[0]
+
+	setTimeout(t, "Escape sequence timeout", 5*time.Second, func() {
+		stdinPipe.Write([]byte{'', ''})
+		if err := stdinPipe.Close(); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	// wait for CmdRun to return
+	setTimeout(t, "Waiting for CmdRun timed out", 15*time.Second, func() {
+		<-ch
+	})
+
+	time.Sleep(500 * time.Millisecond)
+	if !container.State.Running {
+		t.Fatal("The detached container should be still running")
+	}
+
+	setTimeout(t, "Waiting for container to die timed out", 20*time.Second, func() {
+		container.Kill()
+		container.Wait()
+	})
+}
+
+// TestAttachDetach checks that attach in tty mode can be detached
+func TestAttachDetach(t *testing.T) {
+	stdin, stdinPipe := io.Pipe()
+	stdout, stdoutPipe := io.Pipe()
+
+	cli := NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
+	defer cleanup(globalRuntime)
+
+	go stdout.Read(make([]byte, 1024))
+	setTimeout(t, "Starting container timed out", 2*time.Second, func() {
+		if err := cli.CmdRun("-i", "-t", "-d", unitTestImageID, "cat"); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	container := globalRuntime.List()[0]
+
+	stdin, stdinPipe = io.Pipe()
+	stdout, stdoutPipe = io.Pipe()
+	cli = NewDockerCli(stdin, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
+
+	ch := make(chan struct{})
+	go func() {
+		defer close(ch)
+		if err := cli.CmdAttach(container.ShortID()); err != nil {
+			t.Fatal(err)
+		}
+	}()
+
+	setTimeout(t, "First read/write assertion timed out", 2*time.Second, func() {
+		if err := assertPipe("hello\n", "hello", stdout, stdinPipe, 15); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	setTimeout(t, "Escape sequence timeout", 5*time.Second, func() {
+		stdinPipe.Write([]byte{'', ''})
+		if err := stdinPipe.Close(); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	// wait for CmdRun to return
+	setTimeout(t, "Waiting for CmdAttach timed out", 15*time.Second, func() {
+		<-ch
+	})
+
+	time.Sleep(500 * time.Millisecond)
+	if !container.State.Running {
+		t.Fatal("The detached container should be still running")
+	}
+
+	setTimeout(t, "Waiting for container to die timedout", 5*time.Second, func() {
+		container.Kill()
+		container.Wait()
+	})
+}
+
 // Expected behaviour, the process stays alive when the client disconnects
 func TestAttachDisconnect(t *testing.T) {
 	stdin, stdinPipe := io.Pipe()
@@ -438,3 +542,41 @@ func TestAttachDisconnect(t *testing.T) {
 	cStdin.Close()
 	container.Wait()
 }
+
+// Expected behaviour: container gets deleted automatically after exit
+func TestRunAutoRemove(t *testing.T) {
+	t.Skip("Fixme. Skipping test for now, race condition")
+	stdout, stdoutPipe := io.Pipe()
+	cli := NewDockerCli(nil, stdoutPipe, ioutil.Discard, testDaemonProto, testDaemonAddr)
+	defer cleanup(globalRuntime)
+
+	c := make(chan struct{})
+	go func() {
+		defer close(c)
+		if err := cli.CmdRun("-rm", unitTestImageID, "hostname"); err != nil {
+			t.Fatal(err)
+		}
+	}()
+
+	var temporaryContainerID string
+	setTimeout(t, "Reading command output time out", 2*time.Second, func() {
+		cmdOutput, err := bufio.NewReader(stdout).ReadString('\n')
+		if err != nil {
+			t.Fatal(err)
+		}
+		temporaryContainerID = cmdOutput
+		if err := closeWrap(stdout, stdoutPipe); err != nil {
+			t.Fatal(err)
+		}
+	})
+
+	setTimeout(t, "CmdRun timed out", 5*time.Second, func() {
+		<-c
+	})
+
+	time.Sleep(500 * time.Millisecond)
+
+	if len(globalRuntime.List()) > 0 {
+		t.Fatalf("failed to remove container automatically: container %s still exists", temporaryContainerID)
+	}
+}

+ 104 - 78
container.go

@@ -126,6 +126,7 @@ func ParseRun(args []string, capabilities *Capabilities) (*Config, *HostConfig,
 	flContainerIDFile := cmd.String("cidfile", "", "Write the container ID to the file")
 	flNetwork := cmd.Bool("n", true, "Enable networking for this container")
 	flPrivileged := cmd.Bool("privileged", false, "Give extended privileges to this container")
+	flAutoRemove := cmd.Bool("rm", false, "Automatically remove the container when it exits (incompatible with -d)")
 
 	if capabilities != nil && *flMemory > 0 && !capabilities.MemoryLimit {
 		//fmt.Fprintf(stdout, "WARNING: Your kernel does not support memory limit capabilities. Limitation discarded.\n")
@@ -174,6 +175,10 @@ func ParseRun(args []string, capabilities *Capabilities) (*Config, *HostConfig,
 		}
 	}
 
+	if *flDetach && *flAutoRemove {
+		return nil, nil, cmd, fmt.Errorf("Conflicting options: -rm and -d")
+	}
+
 	var binds []string
 
 	// add any bind targets to the list of container volumes
@@ -385,20 +390,20 @@ func (container *Container) startPty() error {
 	// Copy the PTYs to our broadcasters
 	go func() {
 		defer container.stdout.CloseWriters()
-		utils.Debugf("[startPty] Begin of stdout pipe")
+		utils.Debugf("startPty: begin of stdout pipe")
 		io.Copy(container.stdout, ptyMaster)
-		utils.Debugf("[startPty] End of stdout pipe")
+		utils.Debugf("startPty: end of stdout pipe")
 	}()
 
 	// stdin
 	if container.Config.OpenStdin {
 		container.cmd.Stdin = ptySlave
-		container.cmd.SysProcAttr = &syscall.SysProcAttr{Setctty: true, Setsid: true}
+		container.cmd.SysProcAttr.Setctty = true
 		go func() {
 			defer container.stdin.Close()
-			utils.Debugf("[startPty] Begin of stdin pipe")
+			utils.Debugf("startPty: begin of stdin pipe")
 			io.Copy(ptyMaster, container.stdin)
-			utils.Debugf("[startPty] End of stdin pipe")
+			utils.Debugf("startPty: end of stdin pipe")
 		}()
 	}
 	if err := container.cmd.Start(); err != nil {
@@ -418,9 +423,9 @@ func (container *Container) start() error {
 		}
 		go func() {
 			defer stdin.Close()
-			utils.Debugf("Begin of stdin pipe [start]")
+			utils.Debugf("start: begin of stdin pipe")
 			io.Copy(stdin, container.stdin)
-			utils.Debugf("End of stdin pipe [start]")
+			utils.Debugf("start: end of stdin pipe")
 		}()
 	}
 	return container.cmd.Start()
@@ -437,8 +442,8 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 			errors <- err
 		} else {
 			go func() {
-				utils.Debugf("[start] attach stdin\n")
-				defer utils.Debugf("[end] attach stdin\n")
+				utils.Debugf("attach: stdin: begin")
+				defer utils.Debugf("attach: stdin: end")
 				// No matter what, when stdin is closed (io.Copy unblock), close stdout and stderr
 				if container.Config.StdinOnce && !container.Config.Tty {
 					defer cStdin.Close()
@@ -456,7 +461,7 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 					_, err = io.Copy(cStdin, stdin)
 				}
 				if err != nil {
-					utils.Debugf("[error] attach stdin: %s\n", err)
+					utils.Errorf("attach: stdin: %s", err)
 				}
 				// Discard error, expecting pipe error
 				errors <- nil
@@ -470,20 +475,21 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 		} else {
 			cStdout = p
 			go func() {
-				utils.Debugf("[start] attach stdout\n")
-				defer utils.Debugf("[end]  attach stdout\n")
+				utils.Debugf("attach: stdout: begin")
+				defer utils.Debugf("attach: stdout: end")
 				// If we are in StdinOnce mode, then close stdin
-				if container.Config.StdinOnce {
-					if stdin != nil {
-						defer stdin.Close()
-					}
-					if stdinCloser != nil {
-						defer stdinCloser.Close()
-					}
+				if container.Config.StdinOnce && stdin != nil {
+					defer stdin.Close()
+				}
+				if stdinCloser != nil {
+					defer stdinCloser.Close()
 				}
 				_, err := io.Copy(stdout, cStdout)
+				if err == io.ErrClosedPipe {
+					err = nil
+				}
 				if err != nil {
-					utils.Debugf("[error] attach stdout: %s\n", err)
+					utils.Errorf("attach: stdout: %s", err)
 				}
 				errors <- err
 			}()
@@ -493,9 +499,8 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 			if stdinCloser != nil {
 				defer stdinCloser.Close()
 			}
-
 			if cStdout, err := container.StdoutPipe(); err != nil {
-				utils.Debugf("Error stdout pipe")
+				utils.Errorf("attach: stdout pipe: %s", err)
 			} else {
 				io.Copy(&utils.NopWriter{}, cStdout)
 			}
@@ -508,20 +513,21 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 		} else {
 			cStderr = p
 			go func() {
-				utils.Debugf("[start] attach stderr\n")
-				defer utils.Debugf("[end]  attach stderr\n")
+				utils.Debugf("attach: stderr: begin")
+				defer utils.Debugf("attach: stderr: end")
 				// If we are in StdinOnce mode, then close stdin
-				if container.Config.StdinOnce {
-					if stdin != nil {
-						defer stdin.Close()
-					}
-					if stdinCloser != nil {
-						defer stdinCloser.Close()
-					}
+				if container.Config.StdinOnce && stdin != nil {
+					defer stdin.Close()
+				}
+				if stdinCloser != nil {
+					defer stdinCloser.Close()
 				}
 				_, err := io.Copy(stderr, cStderr)
+				if err == io.ErrClosedPipe {
+					err = nil
+				}
 				if err != nil {
-					utils.Debugf("[error] attach stderr: %s\n", err)
+					utils.Errorf("attach: stderr: %s", err)
 				}
 				errors <- err
 			}()
@@ -533,7 +539,7 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 			}
 
 			if cStderr, err := container.StderrPipe(); err != nil {
-				utils.Debugf("Error stdout pipe")
+				utils.Errorf("attach: stdout pipe: %s", err)
 			} else {
 				io.Copy(&utils.NopWriter{}, cStderr)
 			}
@@ -547,24 +553,29 @@ func (container *Container) Attach(stdin io.ReadCloser, stdinCloser io.Closer, s
 		if cStderr != nil {
 			defer cStderr.Close()
 		}
-		// FIXME: how do clean up the stdin goroutine without the unwanted side effect
+		// FIXME: how to clean up the stdin goroutine without the unwanted side effect
 		// of closing the passed stdin? Add an intermediary io.Pipe?
 		for i := 0; i < nJobs; i += 1 {
-			utils.Debugf("Waiting for job %d/%d\n", i+1, nJobs)
+			utils.Debugf("attach: waiting for job %d/%d", i+1, nJobs)
 			if err := <-errors; err != nil {
-				utils.Debugf("Job %d returned error %s. Aborting all jobs\n", i+1, err)
+				utils.Errorf("attach: job %d returned error %s, aborting all jobs", i+1, err)
 				return err
 			}
-			utils.Debugf("Job %d completed successfully\n", i+1)
+			utils.Debugf("attach: job %d completed successfully", i+1)
 		}
-		utils.Debugf("All jobs completed successfully\n")
+		utils.Debugf("attach: all jobs completed successfully")
 		return nil
 	})
 }
 
-func (container *Container) Start(hostConfig *HostConfig) error {
+func (container *Container) Start(hostConfig *HostConfig) (err error) {
 	container.State.Lock()
 	defer container.State.Unlock()
+	defer func() {
+		if err != nil {
+			container.cleanup()
+		}
+	}()
 
 	if hostConfig == nil { // in docker start of docker restart we want to reuse previous HostConfigFile
 		hostConfig, _ = container.ReadHostConfig()
@@ -800,7 +811,8 @@ func (container *Container) Start(hostConfig *HostConfig) error {
 		return err
 	}
 
-	var err error
+	container.cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
+
 	if container.Config.Tty {
 		err = container.startPty()
 	} else {
@@ -818,7 +830,7 @@ func (container *Container) Start(hostConfig *HostConfig) error {
 
 	container.ToDisk()
 	container.SaveHostConfig(hostConfig)
-	go container.monitor()
+	go container.monitor(hostConfig)
 	return nil
 }
 
@@ -846,9 +858,14 @@ func (container *Container) Output() (output []byte, err error) {
 	return output, err
 }
 
-// StdinPipe() returns a pipe connected to the standard input of the container's
-// active process.
-//
+// Container.StdinPipe returns a WriteCloser which can be used to feed data
+// to the standard input of the container's active process.
+// Container.StdoutPipe and Container.StderrPipe each return a ReadCloser
+// which can be used to retrieve the standard output (and error) generated
+// by the container's active process. The output (and error) are actually
+// copied and delivered to all StdoutPipe and StderrPipe consumers, using
+// a kind of "broadcaster".
+
 func (container *Container) StdinPipe() (io.WriteCloser, error) {
 	return container.stdinPipe, nil
 }
@@ -926,7 +943,7 @@ func (container *Container) allocateNetwork() error {
 }
 
 func (container *Container) releaseNetwork() {
-	if container.Config.NetworkDisabled {
+	if container.Config.NetworkDisabled || container.network == nil {
 		return
 	}
 	container.network.Release()
@@ -948,62 +965,46 @@ func (container *Container) waitLxc() error {
 	}
 }
 
-func (container *Container) monitor() {
+func (container *Container) monitor(hostConfig *HostConfig) {
 	// Wait for the program to exit
-	utils.Debugf("Waiting for process")
 
-	// If the command does not exists, try to wait via lxc
+	// If the command does not exist, try to wait via lxc
+	// (This probably happens only for ghost containers, i.e. containers that were running when Docker started)
 	if container.cmd == nil {
+		utils.Debugf("monitor: waiting for container %s using waitLxc", container.ID)
 		if err := container.waitLxc(); err != nil {
-			utils.Debugf("%s: Process: %s", container.ID, err)
+			utils.Errorf("monitor: while waiting for container %s, waitLxc had a problem: %s", container.ID, err)
 		}
 	} else {
+		utils.Debugf("monitor: waiting for container %s using cmd.Wait", container.ID)
 		if err := container.cmd.Wait(); err != nil {
-			// Discard the error as any signals or non 0 returns will generate an error
-			utils.Debugf("%s: Process: %s", container.ID, err)
+			// Since non-zero exit status and signal terminations will cause err to be non-nil,
+			// we have to actually discard it. Still, log it anyway, just in case.
+			utils.Debugf("monitor: cmd.Wait reported exit status %s for container %s", err, container.ID)
 		}
 	}
-	utils.Debugf("Process finished")
-	if container.runtime != nil && container.runtime.srv != nil {
-		container.runtime.srv.LogEvent("die", container.ShortID(), container.runtime.repositories.ImageName(container.Image))
-	}
+	utils.Debugf("monitor: container %s finished", container.ID)
+
 	exitCode := -1
 	if container.cmd != nil {
 		exitCode = container.cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus()
 	}
 
-	// Cleanup
-	container.releaseNetwork()
-	if container.Config.OpenStdin {
-		if err := container.stdin.Close(); err != nil {
-			utils.Debugf("%s: Error close stdin: %s", container.ID, err)
-		}
-	}
-	if err := container.stdout.CloseWriters(); err != nil {
-		utils.Debugf("%s: Error close stdout: %s", container.ID, err)
-	}
-	if err := container.stderr.CloseWriters(); err != nil {
-		utils.Debugf("%s: Error close stderr: %s", container.ID, err)
-	}
+	// Report status back
+	container.State.setStopped(exitCode)
 
-	if container.ptyMaster != nil {
-		if err := container.ptyMaster.Close(); err != nil {
-			utils.Debugf("%s: Error closing Pty master: %s", container.ID, err)
-		}
+	if container.runtime != nil && container.runtime.srv != nil {
+		container.runtime.srv.LogEvent("die", container.ShortID(), container.runtime.repositories.ImageName(container.Image))
 	}
 
-	if err := container.Unmount(); err != nil {
-		log.Printf("%v: Failed to umount filesystem: %v", container.ID, err)
-	}
+	// Cleanup
+	container.cleanup()
 
 	// Re-create a brand new stdin pipe once the container exited
 	if container.Config.OpenStdin {
 		container.stdin, container.stdinPipe = io.Pipe()
 	}
 
-	// Report status back
-	container.State.setStopped(exitCode)
-
 	// Release the lock
 	close(container.waitLock)
 
@@ -1018,6 +1019,31 @@ func (container *Container) monitor() {
 	}
 }
 
+func (container *Container) cleanup() {
+	container.releaseNetwork()
+	if container.Config.OpenStdin {
+		if err := container.stdin.Close(); err != nil {
+			utils.Errorf("%s: Error close stdin: %s", container.ID, err)
+		}
+	}
+	if err := container.stdout.CloseWriters(); err != nil {
+		utils.Errorf("%s: Error close stdout: %s", container.ID, err)
+	}
+	if err := container.stderr.CloseWriters(); err != nil {
+		utils.Errorf("%s: Error close stderr: %s", container.ID, err)
+	}
+
+	if container.ptyMaster != nil {
+		if err := container.ptyMaster.Close(); err != nil {
+			utils.Errorf("%s: Error closing Pty master: %s", container.ID, err)
+		}
+	}
+
+	if err := container.Unmount(); err != nil {
+		log.Printf("%v: Failed to umount filesystem: %v", container.ID, err)
+	}
+}
+
 func (container *Container) kill() error {
 	if !container.State.Running {
 		return nil

+ 23 - 0
contrib/Dockerfile.tmLanguage/Dockerfile.YAML-tmLanguage

@@ -0,0 +1,23 @@
+# [PackageDev] target_format: plist, ext: tmLanguage
+---
+name: Dockerfile
+scopeName: source.dockerfile
+uuid: a39d8795-59d2-49af-aa00-fe74ee29576e
+
+patterns:
+# Keywords
+- name: keyword.control.dockerfile
+  match: ^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s
+- name: keyword.operator.dockerfile
+  match: ^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s
+# String
+- name: string.quoted.double.dockerfile
+  begin: "\""
+  end: "\""
+  patterns:
+  - name: constant.character.escaped.dockerfile
+    match: \\.
+# Comment
+- name: comment.block.dockerfile
+  match: ^\s*#.*$
+...

+ 50 - 0
contrib/Dockerfile.tmLanguage/Dockerfile.tmLanguage

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>name</key>
+	<string>Dockerfile</string>
+	<key>patterns</key>
+	<array>
+		<dict>
+			<key>match</key>
+			<string>^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s</string>
+			<key>name</key>
+			<string>keyword.control.dockerfile</string>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s</string>
+			<key>name</key>
+			<string>keyword.operator.dockerfile</string>
+		</dict>
+		<dict>
+			<key>begin</key>
+			<string>"</string>
+			<key>end</key>
+			<string>"</string>
+			<key>name</key>
+			<string>string.quoted.double.dockerfile</string>
+			<key>patterns</key>
+			<array>
+				<dict>
+					<key>match</key>
+					<string>\\.</string>
+					<key>name</key>
+					<string>constant.character.escaped.dockerfile</string>
+				</dict>
+			</array>
+		</dict>
+		<dict>
+			<key>match</key>
+			<string>^\s*#.*$</string>
+			<key>name</key>
+			<string>comment.block.dockerfile</string>
+		</dict>
+	</array>
+	<key>scopeName</key>
+	<string>source.dockerfile</string>
+	<key>uuid</key>
+	<string>a39d8795-59d2-49af-aa00-fe74ee29576e</string>
+</dict>
+</plist>

+ 1 - 0
contrib/Dockerfile.tmLanguage/MAINTAINERS

@@ -0,0 +1 @@
+Asbjorn Enge <asbjorn@hanafjedle.net> (@asbjornenge)

+ 9 - 0
contrib/Dockerfile.tmLanguage/README.md

@@ -0,0 +1,9 @@
+# Dockerfile.tmLanguage
+
+Pretty basic Dockerfile.tmLanguage for Sublime Text syntax highlighting.
+
+PR's with syntax updates, suggestions etc. are all very much appreciated!
+
+I'll get to making this installable via Package Control soon!
+
+enjoy.

+ 0 - 1
contrib/MAINTAINERS

@@ -1,2 +1 @@
-Kawsar Saiyeed <kawsar.saiyeed@projiris.com> (@KSid)
 Tianon Gravi <admwiggin@gmail.com> (@tianon)

+ 1 - 1
contrib/docker.bash → contrib/completion/bash/docker

@@ -341,7 +341,7 @@ _docker_pull()
 
 _docker_push()
 {
-	return
+	__docker_image_repos
 }
 
 _docker_restart()

+ 242 - 0
contrib/completion/zsh/_docker

@@ -0,0 +1,242 @@
+#compdef docker 
+#
+# zsh completion for docker (http://docker.io)
+#
+# version:  0.2.2
+# author:   Felix Riedel
+# license:  BSD License
+# github:   https://github.com/felixr/docker-zsh-completion
+#
+
+__parse_docker_list() {
+    sed -e '/^ID/d' -e 's/[ ]\{2,\}/|/g' -e 's/ \([hdwm]\)\(inutes\|ays\|ours\|eeks\)/\1/' | awk ' BEGIN {FS="|"} { printf("%s:%7s, %s\n", $1, $4, $2)}'
+}
+
+__docker_stoppedcontainers() {
+    local expl
+    declare -a stoppedcontainers 
+    stoppedcontainers=(${(f)"$(docker ps -a | grep --color=never 'Exit' |  __parse_docker_list )"})
+    _describe -t containers-stopped "Stopped Containers" stoppedcontainers 
+}
+
+__docker_runningcontainers() {
+    local expl
+    declare -a containers 
+
+    containers=(${(f)"$(docker ps | __parse_docker_list)"})
+    _describe -t containers-active "Running Containers" containers 
+}
+
+__docker_containers () {
+    __docker_stoppedcontainers 
+    __docker_runningcontainers
+}
+
+__docker_images () {
+    local expl
+    declare -a images
+    images=(${(f)"$(docker images | awk '(NR > 1){printf("%s\\:%s\n", $1,$2)}')"})
+    images=($images ${(f)"$(docker images | awk '(NR > 1){printf("%s:%-15s in %s\n", $3,$2,$1)}')"})
+    _describe -t docker-images "Images" images
+}
+
+__docker_tags() {
+    local expl
+    declare -a tags
+    tags=(${(f)"$(docker images | awk '(NR>1){print $2}'| sort | uniq)"})
+    _describe -t docker-tags "tags" tags
+}
+
+__docker_search() {
+    # declare -a dockersearch
+    local cache_policy
+    zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+    if [[ -z "$cache_policy" ]]; then
+        zstyle ":completion:${curcontext}:" cache-policy __docker_caching_policy 
+    fi
+
+    local searchterm cachename
+    searchterm="${words[$CURRENT]%/}"
+    cachename=_docker-search-$searchterm
+
+    local expl
+    local -a result 
+    if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \
+        && ! _retrieve_cache ${cachename#_}; then
+        _message "Searching for ${searchterm}..."
+        result=(${(f)"$(docker search ${searchterm} | awk '(NR>2){print $1}')"})
+        _store_cache ${cachename#_} result
+    fi 
+    _wanted dockersearch expl 'Available images' compadd -a result 
+}
+
+__docker_caching_policy()
+{
+  # oldp=( "$1"(Nmh+24) )     # 24 hour
+  oldp=( "$1"(Nmh+1) )     # 24 hour
+  (( $#oldp ))
+}
+
+
+__docker_repositories () {
+    local expl
+    declare -a repos
+    repos=(${(f)"$(docker images | sed -e '1d' -e 's/[ ].*//' | sort | uniq)"})
+    _describe -t docker-repos "Repositories" repos
+}
+
+__docker_commands () {
+    # local -a  _docker_subcommands
+    local cache_policy
+
+    zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+    if [[ -z "$cache_policy" ]]; then
+        zstyle ":completion:${curcontext}:" cache-policy __docker_caching_policy 
+    fi
+
+    if ( [[ ${+_docker_subcommands} -eq 0 ]] || _cache_invalid docker_subcommands) \
+        && ! _retrieve_cache docker_subcommands; 
+    then
+        _docker_subcommands=(${${(f)"$(_call_program commands 
+        docker 2>&1 | sed -e '1,6d' -e '/^[ ]*$/d' -e 's/[ ]*\([^ ]\+\)\s*\([^ ].*\)/\1:\2/' )"}})
+        _docker_subcommands=($_docker_subcommands 'help:Show help for a command') 
+        _store_cache docker_subcommands _docker_subcommands
+    fi
+    _describe -t docker-commands "docker command" _docker_subcommands
+}
+
+__docker_subcommand () {
+    local -a _command_args
+    case "$words[1]" in
+        (attach|wait)
+            _arguments ':containers:__docker_runningcontainers'
+            ;;
+        (build)
+            _arguments \
+                '-t=-:repository:__docker_repositories' \
+                ':path or URL:_directories'
+            ;;
+        (commit)
+            _arguments \
+                ':container:__docker_containers' \
+                ':repository:__docker_repositories' \
+                ':tag: '
+            ;;
+        (diff|export|logs)
+            _arguments '*:containers:__docker_containers'
+            ;;
+        (history)
+            _arguments '*:images:__docker_images'
+            ;;
+        (images)
+            _arguments \
+                '-a[Show all images]' \
+                ':repository:__docker_repositories'
+            ;;
+        (inspect)
+            _arguments '*:containers:__docker_containers'
+            ;;
+        (history)
+            _arguments ':images:__docker_images'
+            ;;
+        (insert)
+            _arguments '1:containers:__docker_containers' \
+                       '2:URL:(http:// file://)' \
+                       '3:file:_files'
+            ;;
+        (kill)
+            _arguments '*:containers:__docker_runningcontainers'
+            ;;
+        (port)
+            _arguments '1:containers:__docker_runningcontainers'
+            ;;
+        (start)
+            _arguments '*:containers:__docker_stoppedcontainers'
+            ;;
+        (rm)
+            _arguments '-v[Remove the volumes associated to the container]' \
+                '*:containers:__docker_stoppedcontainers'
+            ;;
+        (rmi)
+            _arguments '-v[Remove the volumes associated to the container]' \
+                '*:images:__docker_images'
+            ;;
+        (top)
+            _arguments '1:containers:__docker_runningcontainers'
+            ;;
+        (restart|stop)
+            _arguments '-t=-[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)' \
+                '*:containers:__docker_runningcontainers'
+            ;;
+        (top)
+            _arguments ':containers:__docker_runningcontainers'
+            ;;
+        (ps)
+            _arguments '-a[Show all containers. Only running containers are shown by default]' \
+                '-h[Show help]' \
+                '-beforeId=-[Show only container created before Id, include non-running one]:containers:__docker_containers' \
+            '-n=-[Show n last created containers, include non-running one]:n:(1 5 10 25 50)'
+            ;;
+        (tag)
+            _arguments \
+                '-f[force]'\
+                ':image:__docker_images'\
+                ':repository:__docker_repositories' \
+                ':tag:__docker_tags'
+            ;;
+        (run)
+            _arguments \
+                '-a=-[Attach to stdin, stdout or stderr]:toggle:(true false)' \
+                '-c=-[CPU shares (relative weight)]:CPU shares: ' \
+                '-d[Detached mode: leave the container running in the background]' \
+                '*-dns=[Set custom dns servers]:dns server: ' \
+                '*-e=[Set environment variables]:environment variable: ' \
+                '-entrypoint=-[Overwrite the default entrypoint of the image]:entry point: ' \
+                '-h=-[Container host name]:hostname:_hosts' \
+                '-i[Keep stdin open even if not attached]' \
+                '-m=-[Memory limit (in bytes)]:limit: ' \
+                '*-p=-[Expose a container''s port to the host]:port:_ports' \
+                '-t=-[Allocate a pseudo-tty]:toggle:(true false)' \
+                '-u=-[Username or UID]:user:_users' \
+                '*-v=-[Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)]:volume: '\
+                '-volumes-from=-[Mount volumes from the specified container]:volume: ' \
+                '(-):images:__docker_images' \
+                '(-):command: _command_names -e' \
+                '*::arguments: _normal'
+                ;;
+        (pull|search)
+            _arguments ':name:__docker_search'
+            ;;
+        (help)
+            _arguments ':subcommand:__docker_commands'
+            ;;
+        (*)
+            _message 'Unknown sub command'
+    esac
+
+}
+
+_docker () {
+    local curcontext="$curcontext" state line
+    typeset -A opt_args
+
+    _arguments -C \
+      '-H=-[tcp://host:port to bind/connect to]:socket: ' \
+         '(-): :->command' \
+         '(-)*:: :->option-or-argument' 
+
+    if (( CURRENT == 1 )); then
+
+    fi
+    case $state in 
+        (command)
+            __docker_commands
+            ;;
+        (option-or-argument)
+            curcontext=${curcontext%:*:*}:docker-$words[1]:
+            __docker_subcommand 
+            ;;
+    esac
+}
+
+_docker "$@"

+ 0 - 61
contrib/install.sh

@@ -1,61 +0,0 @@
-#!/bin/sh
-# This script is meant for quick & easy install via 'curl URL-OF-SCRIPT | sh'
-# Original version by Jeff Lindsay <progrium@gmail.com>
-# Revamped by Jerome Petazzoni <jerome@dotcloud.com>
-#
-# This script canonical location is https://get.docker.io/; to update it, run:
-# s3cmd put -m text/x-shellscript -P install.sh s3://get.docker.io/index
-
-echo "Ensuring basic dependencies are installed..."
-apt-get -qq update
-apt-get -qq install lxc wget
-
-echo "Looking in /proc/filesystems to see if we have AUFS support..."
-if grep -q aufs /proc/filesystems
-then
-    echo "Found."
-else
-    echo "Ahem, it looks like the current kernel does not support AUFS."
-    echo "Let's see if we can load the AUFS module with modprobe..."
-    if modprobe aufs
-    then
-        echo "Module loaded."
-    else
-        echo "Ahem, things didn't turn out as expected."
-        KPKG=linux-image-extra-$(uname -r)
-        echo "Trying to install $KPKG..."
-        if apt-get -qq install $KPKG
-        then
-            echo "Installed."
-        else
-            echo "Oops, we couldn't install the -extra kernel."
-            echo "Are you sure you are running a supported version of Ubuntu?"
-            echo "Proceeding anyway, but Docker will probably NOT WORK!"
-        fi
-    fi
-fi
-
-echo "Downloading docker binary to /usr/local/bin..."
-curl -s https://get.docker.io/builds/$(uname -s)/$(uname -m)/docker-latest \
-    > /usr/local/bin/docker
-chmod +x /usr/local/bin/docker
-
-if [ -f /etc/init/dockerd.conf ]
-then
-  echo "Upstart script already exists."
-else
-  echo "Creating /etc/init/dockerd.conf..."
-  cat >/etc/init/dockerd.conf <<EOF
-description "Docker daemon"
-start on filesystem and started lxc-net
-stop on runlevel [!2345]
-respawn
-exec /usr/local/bin/docker -d
-EOF
-fi
-
-echo "Starting dockerd..."
-start dockerd > /dev/null
-
-echo "Done."
-echo

+ 67 - 0
contrib/mkimage-arch.sh

@@ -0,0 +1,67 @@
+#!/bin/bash
+# Generate a minimal filesystem for archlinux and load it into the local
+# docker as "archlinux"
+# requires root
+set -e
+
+PACSTRAP=$(which pacstrap)
+[ "$PACSTRAP" ] || {
+    echo "Could not find pacstrap. Run pacman -S arch-install-scripts"
+    exit 1
+}
+EXPECT=$(which expect)
+[ "$EXPECT" ] || {
+    echo "Could not find expect. Run pacman -S expect"
+    exit 1
+}
+
+ROOTFS=~/rootfs-arch-$$-$RANDOM
+mkdir $ROOTFS
+
+#packages to ignore for space savings
+PKGIGNORE=linux,jfsutils,lvm2,cryptsetup,groff,man-db,man-pages,mdadm,pciutils,pcmciautils,reiserfsprogs,s-nail,xfsprogs
+ 
+expect <<EOF
+  set timeout 60
+  set send_slow {1 1}
+  spawn pacstrap -c -d -G -i $ROOTFS base haveged --ignore $PKGIGNORE
+  expect {
+    "Install anyway?" { send n\r; exp_continue }
+    "(default=all)" { send \r; exp_continue }
+    "Proceed with installation?" { send "\r"; exp_continue }
+    "skip the above package" {send "y\r"; exp_continue }
+    "checking" { exp_continue }
+    "loading" { exp_continue }
+    "installing" { exp_continue }
+  }
+EOF
+
+arch-chroot $ROOTFS /bin/sh -c "haveged -w 1024; pacman-key --init; pkill haveged; pacman -Rs --noconfirm haveged; pacman-key --populate archlinux"
+arch-chroot $ROOTFS /bin/sh -c "ln -s /usr/share/zoneinfo/UTC /etc/localtime"
+cat > $ROOTFS/etc/locale.gen <<DELIM
+en_US.UTF-8 UTF-8
+en_US ISO-8859-1
+DELIM
+arch-chroot $ROOTFS locale-gen
+arch-chroot $ROOTFS /bin/sh -c 'echo "Server = http://mirrors.kernel.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist'
+
+# udev doesn't work in containers, rebuild /dev
+DEV=${ROOTFS}/dev
+mv ${DEV} ${DEV}.old
+mkdir -p ${DEV}
+mknod -m 666 ${DEV}/null c 1 3
+mknod -m 666 ${DEV}/zero c 1 5
+mknod -m 666 ${DEV}/random c 1 8
+mknod -m 666 ${DEV}/urandom c 1 9
+mkdir -m 755 ${DEV}/pts
+mkdir -m 1777 ${DEV}/shm
+mknod -m 666 ${DEV}/tty c 5 0
+mknod -m 600 ${DEV}/console c 5 1
+mknod -m 666 ${DEV}/tty0 c 4 0
+mknod -m 666 ${DEV}/full c 1 7
+mknod -m 600 ${DEV}/initctl p
+mknod -m 666 ${DEV}/ptmx c 5 2
+
+tar -C $ROOTFS -c . | docker import - archlinux
+docker run -i -t archlinux echo Success.
+rm -rf $ROOTFS

+ 15 - 0
contrib/mkimage-centos.sh

@@ -0,0 +1,15 @@
+#!/bin/bash
+# Create a CentOS base image for Docker
+# From unclejack https://github.com/dotcloud/docker/issues/290
+set -e
+
+MIRROR_URL="http://centos.netnitco.net/6.4/os/x86_64/"
+MIRROR_URL_UPDATES="http://centos.netnitco.net/6.4/updates/x86_64/"
+
+yum install -y febootstrap xz
+
+febootstrap -i bash -i coreutils -i tar -i bzip2 -i gzip -i vim-minimal -i wget -i patch -i diffutils -i iproute -i yum centos centos64  $MIRROR_URL -u $MIRROR_URL_UPDATES
+touch centos64/etc/resolv.conf
+touch centos64/sbin/init
+
+tar --numeric-owner -Jcpf centos-64.tar.xz -C centos64 .

+ 37 - 9
contrib/mkimage-debian.sh

@@ -10,12 +10,18 @@ variant='minbase'
 include='iproute,iputils-ping'
 
 repo="$1"
-suite="${2:-$stableSuite}"
+suite="$2"
 mirror="${3:-}" # stick to the default debootstrap mirror if one is not provided
 
-if [ ! "$repo" ]; then
-	echo >&2 "usage: $0 repo [suite [mirror]]"
+if [ ! "$repo" ] || [ ! "$suite" ]; then
+	echo >&2 "usage: $0 repo suite [mirror]"
+	echo >&2
 	echo >&2 "   ie: $0 tianon/debian squeeze"
+	echo >&2 "       $0 tianon/debian squeeze http://ftp.uk.debian.org/debian/"
+	echo >&2
+	echo >&2 "   ie: $0 tianon/ubuntu precise"
+	echo >&2 "       $0 tianon/ubuntu precise http://mirrors.melbourne.co.uk/ubuntu/"
+	echo >&2
 	exit 1
 fi
 
@@ -32,22 +38,44 @@ sudo debootstrap --verbose --variant="$variant" --include="$include" "$suite" "$
 
 cd "$target"
 
-# create the image
-img=$(sudo tar -c . | docker import -)
+# prevent init scripts from running during install/update
+#  policy-rc.d (for most scripts)
+echo $'#!/bin/sh\nexit 101' | sudo tee usr/sbin/policy-rc.d > /dev/null
+sudo chmod +x usr/sbin/policy-rc.d
+#  initctl (for some pesky upstart scripts)
+sudo chroot . dpkg-divert --local --rename --add /sbin/initctl
+sudo ln -sf /bin/true sbin/initctl
+# see https://github.com/dotcloud/docker/issues/446#issuecomment-16953173
 
-# tag suite
-docker tag $img $repo $suite
+# shrink the image, since apt makes us fat (wheezy: ~157.5MB vs ~120MB)
+sudo chroot . apt-get clean
+
+# while we're at it, apt is unnecessarily slow inside containers
+#  this forces dpkg not to call sync() after package extraction and speeds up install
+#    the benefit is huge on spinning disks, and the penalty is nonexistent on SSD or decent server virtualization
+echo 'force-unsafe-io' | sudo tee etc/dpkg/dpkg.cfg.d/02apt-speedup > /dev/null
+#  we want to effectively run "apt-get clean" after every install to keep images small
+echo 'DPkg::Post-Invoke {"/bin/rm -f /var/cache/apt/archives/*.deb || true";};' | sudo tee etc/apt/apt.conf.d/no-cache > /dev/null
+
+# helpful undo lines for each the above tweaks (for lack of a better home to keep track of them):
+#  rm /usr/sbin/policy-rc.d
+#  rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl
+#  rm /etc/dpkg/dpkg.cfg.d/02apt-speedup
+#  rm /etc/apt/apt.conf.d/no-cache
+
+# create the image (and tag $repo:$suite)
+sudo tar -c . | docker import - $repo $suite
 
 # test the image
 docker run -i -t $repo:$suite echo success
 
 if [ "$suite" = "$stableSuite" -o "$suite" = 'stable' ]; then
 	# tag latest
-	docker tag $img $repo latest
+	docker tag $repo:$suite $repo latest
 	
 	# tag the specific debian release version
 	ver=$(docker run $repo:$suite cat /etc/debian_version)
-	docker tag $img $repo $ver
+	docker tag $repo:$suite $repo $ver
 fi
 
 # cleanup

+ 22 - 0
contrib/vim-syntax/LICENSE

@@ -0,0 +1,22 @@
+Copyright (c) 2013 Honza Pokorny
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 23 - 0
contrib/vim-syntax/README.md

@@ -0,0 +1,23 @@
+dockerfile.vim
+==============
+
+Syntax highlighting for Dockerfiles
+
+Installation
+------------
+
+Via pathogen, the usual way...
+
+Features
+--------
+
+The syntax highlighting includes:
+
+* The directives (e.g. `FROM`)
+* Strings
+* Comments
+
+License
+-------
+
+BSD, short and sweet

+ 18 - 0
contrib/vim-syntax/doc/dockerfile.txt

@@ -0,0 +1,18 @@
+*dockerfile.txt*  Syntax highlighting for Dockerfiles
+
+Author: Honza Pokorny <http://honza.ca>
+License: BSD
+
+INSTALLATION                                                     *installation*
+
+Drop it on your Pathogen path and you're all set.
+
+FEATURES                                                             *features*
+
+The syntax highlighting includes:
+
+* The directives (e.g. FROM)
+* Strings
+* Comments
+
+ vim:tw=78:et:ft=help:norl:

+ 1 - 0
contrib/vim-syntax/ftdetect/dockerfile.vim

@@ -0,0 +1 @@
+au BufNewFile,BufRead Dockerfile set filetype=dockerfile

+ 22 - 0
contrib/vim-syntax/syntax/dockerfile.vim

@@ -0,0 +1,22 @@
+" dockerfile.vim - Syntax highlighting for Dockerfiles
+" Maintainer:   Honza Pokorny <http://honza.ca>
+" Version:      0.5
+
+
+if exists("b:current_syntax")
+    finish
+endif
+
+let b:current_syntax = "dockerfile"
+
+syntax case ignore
+
+syntax match dockerfileKeyword /\v^\s*(FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD)\s/
+syntax match dockerfileKeyword /\v^\s*(ENTRYPOINT|VOLUME|USER|WORKDIR)\s/
+highlight link dockerfileKeyword Keyword
+
+syntax region dockerfileString start=/\v"/ skip=/\v\\./ end=/\v"/
+highlight link dockerfileString String
+
+syntax match dockerfileComment "\v^\s*#.*$"
+highlight link dockerfileComment Comment

+ 1 - 1
docker/docker.go

@@ -29,7 +29,7 @@ func main() {
 	flVersion := flag.Bool("v", false, "Print version information and quit")
 	flDaemon := flag.Bool("d", false, "Daemon mode")
 	flDebug := flag.Bool("D", false, "Debug mode")
-	flAutoRestart := flag.Bool("r", false, "Restart previously running containers")
+	flAutoRestart := flag.Bool("r", true, "Restart previously running containers")
 	bridgeName := flag.String("b", "", "Attach containers to a pre-existing network bridge. Use 'none' to disable container networking")
 	pidfile := flag.String("p", "/var/run/docker.pid", "File containing process PID")
 	flGraphPath := flag.String("g", "/var/lib/docker", "Path to graph storage base dir.")

+ 87 - 25
docs/README.md

@@ -1,38 +1,93 @@
 Docker Documentation
 ====================
 
-Documentation
--------------
-This is your definite place to contribute to the docker documentation. After each push to master the documentation
-is automatically generated and made available on [docs.docker.io](http://docs.docker.io)
-
-Each of the .rst files under sources reflects a page on the documentation. 
+Overview
+--------
 
-Installation
-------------
+The source for Docker documentation is here under ``sources/`` in the
+form of .rst files. These files use
+[reStructuredText](http://docutils.sourceforge.net/rst.html)
+formatting with [Sphinx](http://sphinx-doc.org/) extensions for
+structure, cross-linking and indexing.
+
+The HTML files are built and hosted on
+[readthedocs.org](https://readthedocs.org/projects/docker/), appearing
+via proxy on https://docs.docker.io. The HTML files update
+automatically after each change to the master or release branch of the
+[docker files on GitHub](https://github.com/dotcloud/docker) thanks to
+post-commit hooks. The "release" branch maps to the "latest"
+documentation and the "master" branch maps to the "master"
+documentation. 
+
+**Warning**: The "master" documentation may include features not yet
+part of any official docker release. "Master" docs should be used only
+for understanding bleeding-edge development and "latest" should be
+used for the latest official release.
+
+If you need to manually trigger a build of an existing branch, then
+you can do that through the [readthedocs
+interface](https://readthedocs.org/builds/docker/). If you would like
+to add new build targets, including new branches or tags, then you
+must contact one of the existing maintainers and get your
+readthedocs.org account added to the maintainers list, or just file an
+issue on GitHub describing the branch/tag and why it needs to be added
+to the docs, and one of the maintainers will add it for you.
+
+Getting Started
+---------------
+
+To edit and test the docs, you'll need to install the Sphinx tool and
+its dependencies. There are two main ways to install this tool:
+
+Native 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`)
+    * 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**
 
+Alternative Installation: Docker Container
+..........................................
+
+If you're running ``docker`` on your development machine then you may
+find it easier and cleaner to use the Dockerfile. This installs Sphinx
+in a container, adds the local ``docs/`` directory and builds the HTML
+docs inside the container, even starting a simple HTTP server on port
+8000 so that you can connect and see your changes. Just run ``docker
+build .`` and run the resulting image. This is the equivalent to
+``make clean server`` since each container starts clean.
+
 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.
+* Follow the contribution guidelines (``../CONTRIBUTING.md``)
+* Work in your own fork of the code, we accept pull requests.
+* Change the ``.rst`` files with your favorite editor -- try to keep the
+  lines short and respect RST and Sphinx conventions. 
+* Run ``make clean docs`` to clean up old files and generate new ones,
+  or just ``make docs`` to update after small changes.
+* Your static website can now be found in the ``_build`` directory.
+* To preview what you have generated run ``make server`` and open
+  http://localhost:8000/ in your favorite browser.
+
+``make clean docs`` must complete without any warnings or errors.
 
 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 careful not to create many commits.
+
+Alternatively, for small changes and typos you might want to use
+GitHub's built in file editor. It allows you to preview your changes
+right online (though there can be some differences between GitHub
+markdown and Sphinx RST). Just be careful not to create many commits.
 
 Images
 ------
-When you need to add images, try to make them as small as possible (e.g. as gif).
+
+When you need to add images, try to make them as small as possible
+(e.g. as gif). Usually images should go in the same directory as the
+.rst file which references them, or in a subdirectory if one already
+exists.
 
 Notes
 -----
@@ -41,7 +96,7 @@ lessc ``lessc main.less`` or watched using watch-lessc ``watch-lessc -i main.les
 
 Guides on using sphinx
 ----------------------
-* To make links to certain pages create a link target like so:
+* To make links to certain sections create a link target like so:
 
   ```
     .. _hello_world:
@@ -52,7 +107,10 @@ Guides on using sphinx
     This is.. (etc.)
   ```
 
-  The ``_hello_world:`` will make it possible to link to this position (page and marker) from all other pages.
+  The ``_hello_world:`` will make it possible to link to this position
+  (page and section heading) from all other pages. See the [Sphinx
+  docs](http://sphinx-doc.org/markup/inline.html#role-ref) for more
+  information and examples.
 
 * Notes, warnings and alarms
 
@@ -68,13 +126,17 @@ Guides on using sphinx
 
 * Code examples
 
-  Start without $, so it's easy to copy and paste.
+  * Start without $, so it's easy to copy and paste.
+  * Use "sudo" with docker to ensure that your command is runnable
+    even if they haven't [used the *docker*
+    group](http://docs.docker.io/en/latest/use/basics/#why-sudo).
 
 Manpages
 --------
 
-* To make the manpages, simply run 'make man'. Please note there is a bug in spinx 1.1.3 which makes this fail.
-Upgrade to the latest version of sphinx.
-* Then preview the manpage by running `man _build/man/docker.1`, where _build/man/docker.1 is the path to the generated
-manfile
-* The manpages are also autogenerated by our hosted readthedocs here: http://docs-docker.dotcloud.com/projects/docker/downloads/
+* To make the manpages, run ``make man``. Please note there is a bug
+  in spinx 1.1.3 which makes this fail.  Upgrade to the latest version
+  of Sphinx.
+* Then preview the manpage by running ``man _build/man/docker.1``,
+  where ``_build/man/docker.1`` is the path to the generated manfile
+

+ 62 - 47
docs/sources/api/docker_remote_api.rst

@@ -9,7 +9,6 @@
 Docker Remote API
 =================
 
-.. contents:: Table of Contents
 
 1. Brief introduction
 =====================
@@ -27,16 +26,41 @@ Docker Remote API
 2. Versions
 ===========
 
-The current version of the API is 1.5
+The current version of the API is 1.6
 
 Calling /images/<name>/insert is the same as calling
-/v1.5/images/<name>/insert 
+/v1.6/images/<name>/insert
 
 You can still call an old version of the api using
 /v1.0/images/<name>/insert
 
+v1.6
+****
+
+Full Documentation
+------------------
+
+:doc:`docker_remote_api_v1.6`
+
+What's new
+----------
+
+.. http:post:: /containers/(id)/attach
+
+   **New!** You can now split stderr from stdout. This is done by prefixing
+   a header to each transmition. See :http:post:`/containers/(id)/attach`.
+   The WebSocket attach is unchanged.
+   Note that attach calls on the previous API version didn't change. Stdout and
+   stderr are merged.
+
+
+v1.5
+****
+
+Full Documentation
+------------------
+
 :doc:`docker_remote_api_v1.5`
-*****************************
 
 What's new
 ----------
@@ -57,8 +81,13 @@ What's new
    dicts each containing `PublicPort`, `PrivatePort` and `Type` describing a
    port mapping.
 
+v1.4
+****
+
+Full Documentation
+------------------
+
 :doc:`docker_remote_api_v1.4`
-*****************************
 
 What's new
 ----------
@@ -75,11 +104,16 @@ What's new
 
    **New!** Image's name added in the events
 
-:doc:`docker_remote_api_v1.3`
-*****************************
+v1.3
+****
 
 docker v0.5.0 51f6c4a_
 
+Full Documentation
+------------------
+
+:doc:`docker_remote_api_v1.3`
+
 What's new
 ----------
 
@@ -112,11 +146,16 @@ Start containers (/containers/<id>/start):
 - You can now pass host-specific configuration (e.g. bind mounts) in
   the POST body for start calls
 
-:doc:`docker_remote_api_v1.2`
-*****************************
+v1.2
+****
 
 docker v0.4.2 2e7649b_
 
+Full Documentation
+------------------
+
+:doc:`docker_remote_api_v1.2`
+
 What's new
 ----------
 
@@ -142,11 +181,16 @@ The client should send it's authConfig as POST on each call of
   deleted/untagged.
 
 
-:doc:`docker_remote_api_v1.1`
-*****************************
+v1.1
+****
 
 docker v0.4.0 a8ae398_
 
+Full Documentation
+------------------
+
+:doc:`docker_remote_api_v1.1`
+
 What's new
 ----------
 
@@ -166,12 +210,16 @@ What's new
 	   {"error":"Invalid..."}
 	   ...
 
-
-:doc:`docker_remote_api_v1.0`
-*****************************
+v1.0
+****
 
 docker v0.3.4 8d73740_
 
+Full Documentation
+------------------
+
+:doc:`docker_remote_api_v1.0`
+
 What's new
 ----------
 
@@ -182,36 +230,3 @@ Initial version
 .. _8d73740: https://github.com/dotcloud/docker/commit/8d73740343778651c09160cde9661f5f387b36f4
 .. _2e7649b: https://github.com/dotcloud/docker/commit/2e7649beda7c820793bd46766cbc2cfeace7b168
 .. _51f6c4a: https://github.com/dotcloud/docker/commit/51f6c4a7372450d164c61e0054daf0223ddbd909
-
-==================================
-Docker Remote API Client Libraries
-==================================
-
-These libraries have not been tested by the Docker Maintainers for
-compatibility. Please file issues with the library owners.  If you
-find more library implementations, please list them in Docker doc bugs
-and we will add the libraries here.
-
-+----------------------+----------------+--------------------------------------------+
-| Language/Framework   | Name           | Repository                                 |
-+======================+================+============================================+
-| Python               | docker-py      | https://github.com/dotcloud/docker-py      |
-+----------------------+----------------+--------------------------------------------+
-| Ruby                 | docker-client  | https://github.com/geku/docker-client      |
-+----------------------+----------------+--------------------------------------------+
-| Ruby                 | docker-api     | https://github.com/swipely/docker-api      |
-+----------------------+----------------+--------------------------------------------+
-| Javascript (NodeJS)  | docker.io      | https://github.com/appersonlabs/docker.io  |
-|                      |                | Install via NPM: `npm install docker.io`   |
-+----------------------+----------------+--------------------------------------------+
-| Javascript           | docker-js      | https://github.com/dgoujard/docker-js      |
-+----------------------+----------------+--------------------------------------------+
-| Javascript (Angular) | dockerui       | https://github.com/crosbymichael/dockerui  |
-| **WebUI**            |                |                                            |
-+----------------------+----------------+--------------------------------------------+
-| Java                 | docker-java    | https://github.com/kpelykh/docker-java     |
-+----------------------+----------------+--------------------------------------------+
-| Erlang               | erldocker      | https://github.com/proger/erldocker        |
-+----------------------+----------------+--------------------------------------------+
-| Go                   | go-dockerclient| https://github.com/fsouza/go-dockerclient  |
-+----------------------+----------------+--------------------------------------------+

File diff suppressed because it is too large
+ 607 - 635
docs/sources/api/docker_remote_api_v1.5.rst


+ 1218 - 0
docs/sources/api/docker_remote_api_v1.6.rst

@@ -0,0 +1,1218 @@
+:title: Remote API v1.6
+:description: API Documentation for Docker
+:keywords: API, Docker, rcli, REST, documentation
+
+:orphan:
+
+======================
+Docker Remote API v1.6
+======================
+
+.. contents:: Table of Contents
+
+1. Brief introduction
+=====================
+
+- The Remote API is replacing rcli
+- Default port in the docker daemon is 4243
+- The API tends to be REST, but for some complex commands, like attach or pull, the HTTP connection is hijacked to transport stdout stdin and stderr
+
+2. Endpoints
+============
+
+2.1 Containers
+--------------
+
+List containers
+***************
+
+.. http:get:: /containers/json
+
+	List containers
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /containers/json?all=1&before=8dfafdbc3a40&size=1 HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+	   
+	   [
+		{
+			"Id": "8dfafdbc3a40",
+			"Image": "base:latest",
+			"Command": "echo 1",
+			"Created": 1367854155,
+			"Status": "Exit 0",
+			"Ports":[{"PrivatePort": 2222, "PublicPort": 3333, "Type": "tcp"}],
+			"SizeRw":12288,
+			"SizeRootFs":0
+		},
+		{
+			"Id": "9cd87474be90",
+			"Image": "base:latest",
+			"Command": "echo 222222",
+			"Created": 1367854155,
+			"Status": "Exit 0",
+			"Ports":[],
+			"SizeRw":12288,
+			"SizeRootFs":0
+		},
+		{
+			"Id": "3176a2479c92",
+			"Image": "base:latest",
+			"Command": "echo 3333333333333333",
+			"Created": 1367854154,
+			"Status": "Exit 0",
+			"Ports":[],
+			"SizeRw":12288,
+			"SizeRootFs":0
+		},
+		{
+			"Id": "4cb07b47f9fb",
+			"Image": "base:latest",
+			"Command": "echo 444444444444444444444444444444444",
+			"Created": 1367854152,
+			"Status": "Exit 0",
+			"Ports":[],
+			"SizeRw":12288,
+			"SizeRootFs":0
+		}
+	   ]
+ 
+	:query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default
+	:query limit: Show ``limit`` last created containers, include non-running ones.
+	:query since: Show only containers created since Id, include non-running ones.
+	:query before: Show only containers created before Id, include non-running ones.
+	:query size: 1/True/true or 0/False/false, Show the containers sizes
+	:statuscode 200: no error
+	:statuscode 400: bad parameter
+	:statuscode 500: server error
+
+
+Create a container
+******************
+
+.. http:post:: /containers/create
+
+	Create a container
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/create HTTP/1.1
+	   Content-Type: application/json
+
+	   {
+		"Hostname":"",
+		"User":"",
+		"Memory":0,
+		"MemorySwap":0,
+		"AttachStdin":false,
+		"AttachStdout":true,
+		"AttachStderr":true,
+		"PortSpecs":null,
+		"Privileged": false,
+		"Tty":false,
+		"OpenStdin":false,
+		"StdinOnce":false,
+		"Env":null,
+		"Cmd":[
+			"date"
+		],
+		"Dns":null,
+		"Image":"base",
+		"Volumes":{},
+		"VolumesFrom":"",
+		"WorkingDir":""
+
+	   }
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 201 OK
+	   Content-Type: application/json
+
+	   {
+		"Id":"e90e34656806"
+		"Warnings":[]
+	   }
+	
+	:jsonparam config: the container's configuration
+	:statuscode 201: no error
+	:statuscode 404: no such container
+	:statuscode 406: impossible to attach (container not running)
+	:statuscode 500: server error
+
+
+Inspect a container
+*******************
+
+.. http:get:: /containers/(id)/json
+
+	Return low-level information on the container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /containers/4fa6e0f0c678/json HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {
+			"Id": "4fa6e0f0c6786287e131c3852c58a2e01cc697a68231826813597e4994f1d6e2",
+			"Created": "2013-05-07T14:51:42.041847+02:00",
+			"Path": "date",
+			"Args": [],
+			"Config": {
+				"Hostname": "4fa6e0f0c678",
+				"User": "",
+				"Memory": 0,
+				"MemorySwap": 0,
+				"AttachStdin": false,
+				"AttachStdout": true,
+				"AttachStderr": true,
+				"PortSpecs": null,
+				"Tty": false,
+				"OpenStdin": false,
+				"StdinOnce": false,
+				"Env": null,
+				"Cmd": [
+					"date"
+				],
+				"Dns": null,
+				"Image": "base",
+				"Volumes": {},
+				"VolumesFrom": "",
+				"WorkingDir":""
+
+			},
+			"State": {
+				"Running": false,
+				"Pid": 0,
+				"ExitCode": 0,
+				"StartedAt": "2013-05-07T14:51:42.087658+02:01360",
+				"Ghost": false
+			},
+			"Image": "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
+			"NetworkSettings": {
+				"IpAddress": "",
+				"IpPrefixLen": 0,
+				"Gateway": "",
+				"Bridge": "",
+				"PortMapping": null
+			},
+			"SysInitPath": "/home/kitty/go/src/github.com/dotcloud/docker/bin/docker",
+			"ResolvConfPath": "/etc/resolv.conf",
+			"Volumes": {}
+	   }
+
+	:statuscode 200: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+List processes running inside a container
+*****************************************
+
+.. http:get:: /containers/(id)/top
+
+	List processes running inside the container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /containers/4fa6e0f0c678/top HTTP/1.1
+
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {
+		"Titles":[
+			"USER",
+			"PID",
+			"%CPU",
+			"%MEM",
+			"VSZ",
+			"RSS",
+			"TTY",
+			"STAT",
+			"START",
+			"TIME",
+			"COMMAND"
+			],
+		"Processes":[
+			["root","20147","0.0","0.1","18060","1864","pts/4","S","10:06","0:00","bash"],
+			["root","20271","0.0","0.0","4312","352","pts/4","S+","10:07","0:00","sleep","10"]
+		]
+	   }
+
+	:query ps_args: ps arguments to use (eg. aux)
+	:statuscode 200: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Inspect changes on a container's filesystem
+*******************************************
+
+.. http:get:: /containers/(id)/changes
+
+	Inspect changes on container ``id`` 's filesystem
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /containers/4fa6e0f0c678/changes HTTP/1.1
+
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+	   
+	   [
+		{
+			"Path":"/dev",
+			"Kind":0
+		},
+		{
+			"Path":"/dev/kmsg",
+			"Kind":1
+		},
+		{
+			"Path":"/test",
+			"Kind":1
+		}
+	   ]
+
+	:statuscode 200: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Export a container
+******************
+
+.. http:get:: /containers/(id)/export
+
+	Export the contents of container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /containers/4fa6e0f0c678/export HTTP/1.1
+
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/octet-stream
+	   
+	   {{ STREAM }}
+
+	:statuscode 200: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Start a container
+*****************
+
+.. http:post:: /containers/(id)/start
+
+        Start the container ``id``
+
+        **Example request**:
+
+        .. sourcecode:: http
+
+           POST /containers/(id)/start HTTP/1.1
+           Content-Type: application/json
+
+           {
+                "Binds":["/tmp:/tmp"],
+                "LxcConf":{"lxc.utsname":"docker"}
+           }
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 204 No Content
+           Content-Type: text/plain
+
+        :jsonparam hostConfig: the container's host configuration (optional)
+        :statuscode 204: no error
+        :statuscode 404: no such container
+        :statuscode 500: server error
+
+
+Stop a container
+****************
+
+.. http:post:: /containers/(id)/stop
+
+	Stop the container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/e90e34656806/stop?t=5 HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 204 OK
+	   	
+	:query t: number of seconds to wait before killing the container
+	:statuscode 204: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Restart a container
+*******************
+
+.. http:post:: /containers/(id)/restart
+
+	Restart the container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/e90e34656806/restart?t=5 HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 204 OK
+	   	
+	:query t: number of seconds to wait before killing the container
+	:statuscode 204: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Kill a container
+****************
+
+.. http:post:: /containers/(id)/kill
+
+	Kill the container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/e90e34656806/kill HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 204 OK
+	   	
+	:statuscode 204: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Attach to a container
+*********************
+
+.. http:post:: /containers/(id)/attach
+
+	Attach to the container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/16253994b7c4/attach?logs=1&stream=0&stdout=1 HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/vnd.docker.raw-stream
+
+	   {{ STREAM }}
+	   	
+	:query logs: 1/True/true or 0/False/false, return logs. Default false
+	:query stream: 1/True/true or 0/False/false, return stream. Default false
+	:query stdin: 1/True/true or 0/False/false, if stream=true, attach to stdin. Default false
+	:query stdout: 1/True/true or 0/False/false, if logs=true, return stdout log, if stream=true, attach to stdout. Default false
+	:query stderr: 1/True/true or 0/False/false, if logs=true, return stderr log, if stream=true, attach to stderr. Default false
+	:statuscode 200: no error
+	:statuscode 400: bad parameter
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+	**Stream details**:
+
+	When using the TTY setting is enabled in
+	:http:post:`/containers/create`, the stream is the raw data
+	from the process PTY and client's stdin.  When the TTY is
+	disabled, then the stream is multiplexed to separate stdout
+	and stderr.
+
+	The format is a **Header** and a **Payload** (frame).
+
+	**HEADER**
+
+	The header will contain the information on which stream write
+	the stream (stdout or stderr). It also contain the size of
+	the associated frame encoded on the last 4 bytes (uint32).
+
+	It is encoded on the first 8 bytes like this::
+
+	    header := [8]byte{STREAM_TYPE, 0, 0, 0, SIZE1, SIZE2, SIZE3, SIZE4}
+
+	``STREAM_TYPE`` can be:
+
+	- 0: stdin (will be writen on stdout)
+	- 1: stdout
+	- 2: stderr
+
+	``SIZE1, SIZE2, SIZE3, SIZE4`` are the 4 bytes of the uint32 size encoded as big endian.
+
+	**PAYLOAD**
+
+	The payload is the raw stream.
+
+	**IMPLEMENTATION**
+
+	The simplest way to implement the Attach protocol is the following:
+
+	1) Read 8 bytes
+	2) chose stdout or stderr depending on the first byte
+	3) Extract the frame size from the last 4 byets
+	4) Read the extracted size and output it on the correct output
+	5) Goto 1)
+
+
+
+Wait a container
+****************
+
+.. http:post:: /containers/(id)/wait
+
+	Block until container ``id`` stops, then returns the exit code
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/16253994b7c4/wait HTTP/1.1
+	   
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {"StatusCode":0}
+	   	
+	:statuscode 200: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+Remove a container
+*******************
+
+.. http:delete:: /containers/(id)
+
+	Remove the container ``id`` from the filesystem
+
+	**Example request**:
+
+        .. sourcecode:: http
+
+           DELETE /containers/16253994b7c4?v=1 HTTP/1.1
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+	   HTTP/1.1 204 OK
+
+	:query v: 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false
+        :statuscode 204: no error
+	:statuscode 400: bad parameter
+        :statuscode 404: no such container
+        :statuscode 500: server error
+
+
+Copy files or folders from a container
+**************************************
+
+.. http:post:: /containers/(id)/copy
+
+	Copy files or folders of container ``id``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   POST /containers/4fa6e0f0c678/copy HTTP/1.1
+	   Content-Type: application/json
+
+	   {
+		"Resource":"test.txt"
+	   }
+
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/octet-stream
+	   
+	   {{ STREAM }}
+
+	:statuscode 200: no error
+	:statuscode 404: no such container
+	:statuscode 500: server error
+
+
+2.2 Images
+----------
+
+List Images
+***********
+
+.. http:get:: /images/(format)
+
+	List images ``format`` could be json or viz (json default)
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /images/json?all=0 HTTP/1.1
+
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+	   
+	   [
+		{
+			"Repository":"base",
+			"Tag":"ubuntu-12.10",
+			"Id":"b750fe79269d",
+			"Created":1364102658,
+			"Size":24653,
+			"VirtualSize":180116135
+		},
+		{
+			"Repository":"base",
+			"Tag":"ubuntu-quantal",
+			"Id":"b750fe79269d",
+			"Created":1364102658,
+			"Size":24653,
+			"VirtualSize":180116135
+		}
+	   ]
+
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /images/viz HTTP/1.1
+
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: text/plain
+
+	   digraph docker {
+	   "d82cbacda43a" -> "074be284591f"
+	   "1496068ca813" -> "08306dc45919"
+	   "08306dc45919" -> "0e7893146ac2"
+	   "b750fe79269d" -> "1496068ca813"
+	   base -> "27cf78414709" [style=invis]
+	   "f71189fff3de" -> "9a33b36209ed"
+	   "27cf78414709" -> "b750fe79269d"
+	   "0e7893146ac2" -> "d6434d954665"
+	   "d6434d954665" -> "d82cbacda43a"
+	   base -> "e9aa60c60128" [style=invis]
+	   "074be284591f" -> "f71189fff3de"
+	   "b750fe79269d" [label="b750fe79269d\nbase",shape=box,fillcolor="paleturquoise",style="filled,rounded"];
+	   "e9aa60c60128" [label="e9aa60c60128\nbase2",shape=box,fillcolor="paleturquoise",style="filled,rounded"];
+	   "9a33b36209ed" [label="9a33b36209ed\ntest",shape=box,fillcolor="paleturquoise",style="filled,rounded"];
+	   base [style=invisible]
+	   }
+ 
+	:query all: 1/True/true or 0/False/false, Show all containers. Only running containers are shown by default
+	:statuscode 200: no error
+	:statuscode 400: bad parameter
+	:statuscode 500: server error
+
+
+Create an image
+***************
+
+.. http:post:: /images/create
+
+	Create an image, either by pull it from the registry or by importing it
+
+	**Example request**:
+
+        .. sourcecode:: http
+
+           POST /images/create?fromImage=base HTTP/1.1
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {"status":"Pulling..."}
+	   {"status":"Pulling", "progress":"1/? (n/a)"}
+	   {"error":"Invalid..."}
+	   ...
+
+	When using this endpoint to pull an image from the registry,
+	the ``X-Registry-Auth`` header can be used to include a
+	base64-encoded AuthConfig object.
+
+        :query fromImage: name of the image to pull
+	:query fromSrc: source to import, - means stdin
+        :query repo: repository
+	:query tag: tag
+	:query registry: the registry to pull from
+        :statuscode 200: no error
+        :statuscode 500: server error
+
+
+Insert a file in an image
+*************************
+
+.. http:post:: /images/(name)/insert
+
+	Insert a file from ``url`` in the image ``name`` at ``path``
+
+	**Example request**:
+
+        .. sourcecode:: http
+
+           POST /images/test/insert?path=/usr&url=myurl HTTP/1.1
+
+	**Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {"status":"Inserting..."}
+	   {"status":"Inserting", "progress":"1/? (n/a)"}
+	   {"error":"Invalid..."}
+	   ...
+
+	:statuscode 200: no error
+        :statuscode 500: server error
+
+
+Inspect an image
+****************
+
+.. http:get:: /images/(name)/json
+
+	Return low-level information on the image ``name``
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   GET /images/base/json HTTP/1.1
+
+	**Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {
+		"id":"b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc",
+		"parent":"27cf784147099545",
+		"created":"2013-03-23T22:24:18.818426-07:00",
+		"container":"3d67245a8d72ecf13f33dffac9f79dcdf70f75acb84d308770391510e0c23ad0",
+		"container_config":
+			{
+				"Hostname":"",
+				"User":"",
+				"Memory":0,
+				"MemorySwap":0,
+				"AttachStdin":false,
+				"AttachStdout":false,
+				"AttachStderr":false,
+				"PortSpecs":null,
+				"Tty":true,
+				"OpenStdin":true,
+				"StdinOnce":false,
+				"Env":null,
+				"Cmd": ["/bin/bash"]
+				,"Dns":null,
+				"Image":"base",
+				"Volumes":null,
+				"VolumesFrom":"",
+				"WorkingDir":""
+			},
+		"Size": 6824592
+	   }
+
+	:statuscode 200: no error
+	:statuscode 404: no such image
+        :statuscode 500: server error
+
+
+Get the history of an image
+***************************
+
+.. http:get:: /images/(name)/history
+
+        Return the history of the image ``name``
+
+        **Example request**:
+
+        .. sourcecode:: http
+
+           GET /images/base/history HTTP/1.1
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   [
+		{
+			"Id":"b750fe79269d",
+			"Created":1364102658,
+			"CreatedBy":"/bin/bash"
+		},
+		{
+			"Id":"27cf78414709",
+			"Created":1364068391,
+			"CreatedBy":""
+		}
+	   ]
+
+        :statuscode 200: no error
+        :statuscode 404: no such image
+        :statuscode 500: server error
+
+
+Push an image on the registry
+*****************************
+
+.. http:post:: /images/(name)/push
+
+   Push the image ``name`` on the registry
+
+   **Example request**:
+
+   .. sourcecode:: http
+
+      POST /images/test/push HTTP/1.1
+
+   **Example response**:
+
+   .. sourcecode:: http
+
+    HTTP/1.1 200 OK
+    Content-Type: application/json
+
+   {"status":"Pushing..."}
+   {"status":"Pushing", "progress":"1/? (n/a)"}
+   {"error":"Invalid..."}
+   ...
+
+	The ``X-Registry-Auth`` header can be used to include a
+	base64-encoded AuthConfig object.
+
+   :query registry: the registry you wan to push, optional
+   :statuscode 200: no error
+        :statuscode 404: no such image
+        :statuscode 500: server error
+
+
+Tag an image into a repository
+******************************
+
+.. http:post:: /images/(name)/tag
+
+	Tag the image ``name`` into a repository
+
+        **Example request**:
+
+        .. sourcecode:: http
+			
+	   POST /images/test/tag?repo=myrepo&force=0 HTTP/1.1
+
+	**Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+
+	:query repo: The repository to tag in
+	:query force: 1/True/true or 0/False/false, default false
+	:statuscode 200: no error
+	:statuscode 400: bad parameter
+	:statuscode 404: no such image
+	:statuscode 409: conflict
+        :statuscode 500: server error
+
+
+Remove an image
+***************
+
+.. http:delete:: /images/(name)
+
+	Remove the image ``name`` from the filesystem 
+	
+	**Example request**:
+
+	.. sourcecode:: http
+
+	   DELETE /images/test HTTP/1.1
+
+	**Example response**:
+
+        .. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-type: application/json
+
+	   [
+	    {"Untagged":"3e2f21a89f"},
+	    {"Deleted":"3e2f21a89f"},
+	    {"Deleted":"53b4f83ac9"}
+	   ]
+
+	:statuscode 200: no error
+        :statuscode 404: no such image
+	:statuscode 409: conflict
+        :statuscode 500: server error
+
+
+Search images
+*************
+
+.. http:get:: /images/search
+
+	Search for an image in the docker index
+	
+	**Example request**:
+
+        .. sourcecode:: http
+
+           GET /images/search?term=sshd HTTP/1.1
+
+	**Example response**:
+
+	.. sourcecode:: http
+
+	   HTTP/1.1 200 OK
+	   Content-Type: application/json
+	   
+	   [
+		{
+			"Name":"cespare/sshd",
+			"Description":""
+		},
+		{
+			"Name":"johnfuller/sshd",
+			"Description":""
+		},
+		{
+			"Name":"dhrp/mongodb-sshd",
+			"Description":""
+		}
+	   ]
+
+	   :query term: term to search
+	   :statuscode 200: no error
+	   :statuscode 500: server error
+
+
+2.3 Misc
+--------
+
+Build an image from Dockerfile via stdin
+****************************************
+
+.. http:post:: /build
+
+   Build an image from Dockerfile via stdin
+
+   **Example request**:
+
+   .. sourcecode:: http
+
+      POST /build HTTP/1.1
+
+      {{ STREAM }}
+
+   **Example response**:
+
+   .. sourcecode:: http
+
+      HTTP/1.1 200 OK
+
+      {{ STREAM }}
+
+
+       The stream must be a tar archive compressed with one of the following algorithms:
+       identity (no compression), gzip, bzip2, xz. The archive must include a file called
+       `Dockerfile` at its root. It may include any number of other files, which will be
+       accessible in the build context (See the ADD build command).
+
+       The Content-type header should be set to "application/tar".
+
+	:query t: repository name (and optionally a tag) to be applied to the resulting image in case of success
+	:query q: suppress verbose build output
+    :query nocache: do not use the cache when building the image
+	:statuscode 200: no error
+    :statuscode 500: server error
+
+
+Check auth configuration
+************************
+
+.. http:post:: /auth
+
+        Get the default username and email
+
+        **Example request**:
+
+        .. sourcecode:: http
+
+           POST /auth HTTP/1.1
+	   Content-Type: application/json
+
+	   {
+		"username":"hannibal",
+		"password:"xxxx",
+		"email":"hannibal@a-team.com",
+		"serveraddress":"https://index.docker.io/v1/"
+	   }
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+
+        :statuscode 200: no error
+        :statuscode 204: no error
+        :statuscode 500: server error
+
+
+Display system-wide information
+*******************************
+
+.. http:get:: /info
+
+	Display system-wide information
+	
+	**Example request**:
+
+        .. sourcecode:: http
+
+           GET /info HTTP/1.1
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {
+		"Containers":11,
+		"Images":16,
+		"Debug":false,
+		"NFd": 11,
+		"NGoroutines":21,
+		"MemoryLimit":true,
+		"SwapLimit":false,
+		"IPv4Forwarding":true
+	   }
+
+        :statuscode 200: no error
+        :statuscode 500: server error
+
+
+Show the docker version information
+***********************************
+
+.. http:get:: /version
+
+	Show the docker version information
+
+	**Example request**:
+
+        .. sourcecode:: http
+
+           GET /version HTTP/1.1
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {
+		"Version":"0.2.2",
+		"GitCommit":"5a2a5cc+CHANGES",
+		"GoVersion":"go1.0.3"
+	   }
+
+        :statuscode 200: no error
+	:statuscode 500: server error
+
+
+Create a new image from a container's changes
+*********************************************
+
+.. http:post:: /commit
+
+    Create a new image from a container's changes
+
+    **Example request**:
+
+    .. sourcecode:: http
+
+        POST /commit?container=44c004db4b17&m=message&repo=myrepo HTTP/1.1
+
+    **Example response**:
+
+    .. sourcecode:: http
+
+        HTTP/1.1 201 OK
+	    Content-Type: application/vnd.docker.raw-stream
+
+        {"Id":"596069db4bf5"}
+
+    :query container: source container
+    :query repo: repository
+    :query tag: tag
+    :query m: commit message
+    :query author: author (eg. "John Hannibal Smith <hannibal@a-team.com>")
+    :query run: config automatically applied when the image is run. (ex: {"Cmd": ["cat", "/world"], "PortSpecs":["22"]})
+    :statuscode 201: no error
+    :statuscode 404: no such container
+    :statuscode 500: server error
+
+
+Monitor Docker's events
+***********************
+
+.. http:get:: /events
+
+	Get events from docker, either in real time via streaming, or via polling (using `since`)
+
+	**Example request**:
+
+	.. sourcecode:: http
+
+           POST /events?since=1374067924
+
+        **Example response**:
+
+        .. sourcecode:: http
+
+           HTTP/1.1 200 OK
+	   Content-Type: application/json
+
+	   {"status":"create","id":"dfdf82bd3881","from":"base:latest","time":1374067924}
+	   {"status":"start","id":"dfdf82bd3881","from":"base:latest","time":1374067924}
+	   {"status":"stop","id":"dfdf82bd3881","from":"base:latest","time":1374067966}
+	   {"status":"destroy","id":"dfdf82bd3881","from":"base:latest","time":1374067970}
+
+	:query since: timestamp used for polling
+        :statuscode 200: no error
+        :statuscode 500: server error
+
+
+3. Going further
+================
+
+3.1 Inside 'docker run'
+-----------------------
+
+Here are the steps of 'docker run' :
+
+* Create the container
+* If the status code is 404, it means the image doesn't exists:
+        * Try to pull it
+        * Then retry to create the container
+* Start the container
+* If you are not in detached mode:
+        * Attach to the container, using logs=1 (to have stdout and stderr from the container's start) and stream=1
+* If in detached mode or only stdin is attached:
+	* Display the container's id
+
+
+3.2 Hijacking
+-------------
+
+In this version of the API, /attach, uses hijacking to transport stdin, stdout and stderr on the same socket. This might change in the future.
+
+3.3 CORS Requests
+-----------------
+
+To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
+
+.. code-block:: bash
+
+   docker -d -H="192.168.1.9:4243" -api-enable-cors
+

+ 22 - 20
docs/sources/api/index_api.rst

@@ -6,8 +6,6 @@
 Docker Index API
 =================
 
-.. contents:: Table of Contents
-
 1. Brief introduction
 =====================
 
@@ -42,7 +40,7 @@ User Repo
         Authorization: Basic akmklmasadalkm==
         X-Docker-Token: true
 
-        [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
+        [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
 
     :parameter namespace: the namespace for the repo
     :parameter repo_name: the name for the repo
@@ -54,7 +52,8 @@ User Repo
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
-        WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=write
+        WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=write
+        X-Docker-Token: signature=123abc,repository="foo/bar",access=write
         X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
 
         ""
@@ -92,7 +91,8 @@ User Repo
         HTTP/1.1 202
         Vary: Accept
         Content-Type: application/json
-        WWW-Authenticate: Token signature=123abc,repository=”foo/bar”,access=delete
+        WWW-Authenticate: Token signature=123abc,repository="foo/bar",access=delete
+        X-Docker-Token: signature=123abc,repository="foo/bar",access=delete
         X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
 
         ""
@@ -124,7 +124,7 @@ Library Repo
         Authorization: Basic akmklmasadalkm==
         X-Docker-Token: true
 
-        [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”}]
+        [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"}]
 
     :parameter repo_name:  the library name for the repo
 
@@ -135,7 +135,8 @@ Library Repo
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
-        WWW-Authenticate: Token signature=123abc,repository=”library/foobar”,access=write
+        WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=write
+        X-Docker-Token: signature=123abc,repository="foo/bar",access=write
         X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
 
         ""
@@ -174,7 +175,8 @@ Library Repo
         HTTP/1.1 202
         Vary: Accept
         Content-Type: application/json
-        WWW-Authenticate: Token signature=123abc,repository=”library/foobar”,access=delete
+        WWW-Authenticate: Token signature=123abc,repository="library/foobar",access=delete
+        X-Docker-Token: signature=123abc,repository="foo/bar",access=delete
         X-Docker-Endpoints: registry-1.docker.io [, registry-2.docker.io]
 
         ""
@@ -205,8 +207,8 @@ User Repo Images
         Content-Type: application/json
         Authorization: Basic akmklmasadalkm==
 
-        [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
-        “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
+        [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
+        "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
 
     :parameter namespace: the namespace for the repo
     :parameter repo_name: the name for the repo
@@ -250,10 +252,10 @@ User Repo Images
         Vary: Accept
         Content-Type: application/json
 
-        [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
-        “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”},
-        {“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”,
-        “checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}]
+        [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
+        "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
+        {"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
+        "checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
 
     :statuscode 200: OK
     :statuscode 404: Not found
@@ -275,8 +277,8 @@ Library Repo Images
         Content-Type: application/json
         Authorization: Basic akmklmasadalkm==
 
-        [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
-        “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”}]
+        [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
+        "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"}]
 
     :parameter repo_name: the library name for the repo
 
@@ -318,10 +320,10 @@ Library Repo Images
         Vary: Accept
         Content-Type: application/json
 
-        [{“id”: “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”,
-        “checksum”: “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”},
-        {“id”: “ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds”,
-        “checksum”: “34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew”}]
+        [{"id": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
+        "checksum": "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"},
+        {"id": "ertwetewtwe38722009fe6857087b486531f9a779a0c1dfddgfgsdgdsgds",
+        "checksum": "34t23f23fc17e3ed29dae8f12c4f9e89cc6f0bsdfgfsdgdsgdsgerwgew"}]
 
     :statuscode 200: OK
     :statuscode 404: Not found

+ 114 - 77
docs/sources/api/registry_api.rst

@@ -6,7 +6,6 @@
 Docker Registry API
 ===================
 
-.. contents:: Table of Contents
 
 1. Brief introduction
 =====================
@@ -61,7 +60,7 @@ Layer
         Host: registry-1.docker.io
         Accept: application/json
         Content-Type: application/json
-        Authorization: Token akmklmasadalkmsdfgsdgdge33
+        Authorization: Token signature=123abc,repository="foo/bar",access=read
 
     :parameter image_id: the id for the layer you want to get
 
@@ -71,39 +70,10 @@ Layer
 
         HTTP/1.1 200
         Vary: Accept
-        Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
         Cookie: (Cookie provided by the Registry)
 
-        {
-            id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
-            parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
-            created: "2013-04-30T17:46:10.843673+03:00",
-            container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
-            container_config: {
-                Hostname: "host-test",
-                User: "",
-                Memory: 0,
-                MemorySwap: 0,
-                AttachStdin: false,
-                AttachStdout: false,
-                AttachStderr: false,
-                PortSpecs: null,
-                Tty: false,
-                OpenStdin: false,
-                StdinOnce: false,
-                Env: null,
-                Cmd: [
-                "/bin/bash",
-                "-c",
-                "apt-get -q -yy -f install libevent-dev"
-                ],
-                Dns: null,
-                Image: "imagename/blah",
-                Volumes: { },
-                VolumesFrom: ""
-            },
-            docker_version: "0.1.7"
-        }
+        {layer binary data stream}
 
     :statuscode 200: OK
     :statuscode 401: Requires authorization
@@ -120,40 +90,10 @@ Layer
 
         PUT /v1/images/088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c/layer HTTP/1.1
         Host: registry-1.docker.io
-        Accept: application/json
-        Content-Type: application/json
-        Authorization: Token akmklmasadalkmsdfgsdgdge33
+        Transfer-Encoding: chunked
+        Authorization: Token signature=123abc,repository="foo/bar",access=write
 
-        {
-            id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
-            parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
-            created: "2013-04-30T17:46:10.843673+03:00",
-            container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
-            container_config: {
-                Hostname: "host-test",
-                User: "",
-                Memory: 0,
-                MemorySwap: 0,
-                AttachStdin: false,
-                AttachStdout: false,
-                AttachStderr: false,
-                PortSpecs: null,
-                Tty: false,
-                OpenStdin: false,
-                StdinOnce: false,
-                Env: null,
-                Cmd: [
-                "/bin/bash",
-                "-c",
-                "apt-get -q -yy -f install libevent-dev"
-                ],
-                Dns: null,
-                Image: "imagename/blah",
-                Volumes: { },
-                VolumesFrom: ""
-            },
-            docker_version: "0.1.7"
-        }
+        {layer binary data stream}
 
     :parameter image_id: the id for the layer you want to get
 
@@ -165,6 +105,7 @@ Layer
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         ""
 
@@ -191,13 +132,38 @@ Image
         Cookie: (Cookie provided by the Registry)
 
         {
-         “id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”,
-         “checksum”:  “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
-         }
+            id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
+            parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
+            created: "2013-04-30T17:46:10.843673+03:00",
+            container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
+            container_config: {
+                Hostname: "host-test",
+                User: "",
+                Memory: 0,
+                MemorySwap: 0,
+                AttachStdin: false,
+                AttachStdout: false,
+                AttachStderr: false,
+                PortSpecs: null,
+                Tty: false,
+                OpenStdin: false,
+                StdinOnce: false,
+                Env: null,
+                Cmd: [
+                "/bin/bash",
+                "-c",
+                "apt-get -q -yy -f install libevent-dev"
+                ],
+                Dns: null,
+                Image: "imagename/blah",
+                Volumes: { },
+                VolumesFrom: ""
+            },
+            docker_version: "0.1.7"
+        }
 
     :parameter image_id: the id for the layer you want to get
 
-
     **Example Response**:
 
     .. sourcecode:: http
@@ -205,6 +171,7 @@ Image
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         ""
 
@@ -234,11 +201,40 @@ Image
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
+        X-Docker-Size: 456789
+        X-Docker-Checksum: b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087
 
         {
-         “id”: “088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c”,
-         “checksum”:  “sha256:b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
-         }
+            id: "088b4505aa3adc3d35e79c031fa126b403200f02f51920fbd9b7c503e87c7a2c",
+            parent: "aeee6396d62273d180a49c96c62e45438d87c7da4a5cf5d2be6bee4e21bc226f",
+            created: "2013-04-30T17:46:10.843673+03:00",
+            container: "8305672a76cc5e3d168f97221106ced35a76ec7ddbb03209b0f0d96bf74f6ef7",
+            container_config: {
+                Hostname: "host-test",
+                User: "",
+                Memory: 0,
+                MemorySwap: 0,
+                AttachStdin: false,
+                AttachStdout: false,
+                AttachStderr: false,
+                PortSpecs: null,
+                Tty: false,
+                OpenStdin: false,
+                StdinOnce: false,
+                Env: null,
+                Cmd: [
+                "/bin/bash",
+                "-c",
+                "apt-get -q -yy -f install libevent-dev"
+                ],
+                Dns: null,
+                Image: "imagename/blah",
+                Volumes: { },
+                VolumesFrom: ""
+            },
+            docker_version: "0.1.7"
+        }
 
     :statuscode 200: OK
     :statuscode 401: Requires authorization
@@ -271,6 +267,7 @@ Ancestry
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         ["088b4502f51920fbd9b7c503e87c7a2c05aa3adc3d35e79c031fa126b403200f",
          "aeee63968d87c7da4a5cf5d2be6bee4e21bc226fd62273d180a49c96c62e4543",
@@ -297,6 +294,7 @@ Ancestry
         Host: registry-1.docker.io
         Accept: application/json
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
         Cookie: (Cookie provided by the Registry)
 
     :parameter namespace: namespace for the repo
@@ -309,10 +307,11 @@ Ancestry
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         {
             "latest": "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f",
-            “0.1.1”:  “b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087”
+            "0.1.1":  "b486531f9a779a0c17e3ed29dae8f12c4f9e89cc6f0bc3c38722009fe6857087"
         }
 
     :statuscode 200: OK
@@ -332,6 +331,7 @@ Ancestry
         Host: registry-1.docker.io
         Accept: application/json
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
         Cookie: (Cookie provided by the Registry)
 
     :parameter namespace: namespace for the repo
@@ -345,6 +345,7 @@ Ancestry
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
 
@@ -377,6 +378,7 @@ Ancestry
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         ""
 
@@ -399,7 +401,7 @@ Ancestry
         Content-Type: application/json
         Cookie: (Cookie provided by the Registry)
 
-        “9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f”
+        "9e89cc6f0bc3c38722009fe6857087b486531f9a779a0c17e3ed29dae8f12c4f"
 
     :parameter namespace: namespace for the repo
     :parameter repository: name for the repo
@@ -412,6 +414,7 @@ Ancestry
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         ""
 
@@ -449,6 +452,7 @@ Ancestry
         HTTP/1.1 200
         Vary: Accept
         Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
 
         ""
 
@@ -456,8 +460,41 @@ Ancestry
     :statuscode 401: Requires authorization
     :statuscode 404: Repository not found
 
-3.0 Authorization
-=================
+2.4 Status
+----------
+
+.. http:get:: /v1/_ping
+
+    Check status of the registry. This endpoint is also used to determine if
+    the registry supports SSL.
+
+    **Example Request**:
+
+    .. sourcecode:: http
+
+        GET /v1/_ping HTTP/1.1
+        Host: registry-1.docker.io
+        Accept: application/json
+        Content-Type: application/json
+
+        ""
+
+    **Example Response**:
+
+    .. sourcecode:: http
+
+        HTTP/1.1 200
+        Vary: Accept
+        Content-Type: application/json
+        X-Docker-Registry-Version: 0.6.0
+
+        ""
+
+    :statuscode 200: OK
+
+
+3 Authorization
+===============
 This is where we describe the authorization process, including the tokens and cookies. 
 
 TODO: add more info.

+ 2 - 4
docs/sources/api/registry_index_spec.rst

@@ -8,8 +8,6 @@
 Registry & Index Spec
 =====================
 
-.. contents:: Table of Contents
-
 1. The 3 roles
 ===============
 
@@ -564,8 +562,8 @@ Next request::
     Cookie: session="wD/J7LqL5ctqw8haL10vgfhrb2Q=?foo=UydiYXInCnAxCi4=&timestamp=RjEzNjYzMTQ5NDcuNDc0NjQzCi4="
 
 
-7.0 Document Version
----------------------
+7 Document Version
+====================
 
 - 1.0 : May 6th 2013 : initial release 
 - 1.1 : June 1st 2013 : Added Delete Repository and way to handle new source namespace.

+ 37 - 0
docs/sources/api/remote_api_client_libraries.rst

@@ -0,0 +1,37 @@
+:title: Registry API
+:description: Various client libraries available to use with the Docker remote API
+:keywords: API, Docker, index, registry, REST, documentation, clients, Python, Ruby, Javascript, Erlang, Go
+
+
+==================================
+Docker Remote API Client Libraries
+==================================
+
+These libraries have not been tested by the Docker Maintainers for
+compatibility. Please file issues with the library owners.  If you
+find more library implementations, please list them in Docker doc bugs
+and we will add the libraries here.
+
++----------------------+----------------+--------------------------------------------+
+| Language/Framework   | Name           | Repository                                 |
++======================+================+============================================+
+| Python               | docker-py      | https://github.com/dotcloud/docker-py      |
++----------------------+----------------+--------------------------------------------+
+| Ruby                 | docker-client  | https://github.com/geku/docker-client      |
++----------------------+----------------+--------------------------------------------+
+| Ruby                 | docker-api     | https://github.com/swipely/docker-api      |
++----------------------+----------------+--------------------------------------------+
+| Javascript (NodeJS)  | docker.io      | https://github.com/appersonlabs/docker.io  |
+|                      |                | Install via NPM: `npm install docker.io`   |
++----------------------+----------------+--------------------------------------------+
+| Javascript           | docker-js      | https://github.com/dgoujard/docker-js      |
++----------------------+----------------+--------------------------------------------+
+| Javascript (Angular) | dockerui       | https://github.com/crosbymichael/dockerui  |
+| **WebUI**            |                |                                            |
++----------------------+----------------+--------------------------------------------+
+| Java                 | docker-java    | https://github.com/kpelykh/docker-java     |
++----------------------+----------------+--------------------------------------------+
+| Erlang               | erldocker      | https://github.com/proger/erldocker        |
++----------------------+----------------+--------------------------------------------+
+| Go                   | go-dockerclient| https://github.com/fsouza/go-dockerclient  |
++----------------------+----------------+--------------------------------------------+

+ 66 - 35
docs/sources/commandline/cli.rst

@@ -8,7 +8,7 @@ Overview
 ======================
 
 Docker Usage
-~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~
 
 To list available commands, either run ``docker`` with no parameters or execute
 ``docker help``::
@@ -21,40 +21,71 @@ To list available commands, either run ``docker`` with no parameters or execute
 
     ...
 
+
+
 Available Commands
 ~~~~~~~~~~~~~~~~~~
 
-.. toctree::
-   :maxdepth: 2
-
-   command/attach
-   command/build
-   command/commit
-   command/cp
-   command/diff
-   command/events
-   command/export
-   command/history
-   command/images
-   command/import
-   command/info
-   command/insert
-   command/inspect
-   command/kill
-   command/login
-   command/logs
-   command/port
-   command/ps
-   command/pull
-   command/push
-   command/restart
-   command/rm
-   command/rmi
-   command/run
-   command/search
-   command/start
-   command/stop
-   command/tag
-   command/top
-   command/version
-   command/wait
+.. include:: command/attach.rst
+
+.. include:: command/build.rst
+
+.. include:: command/commit.rst
+
+.. include:: command/cp.rst
+
+.. include:: command/diff.rst
+
+.. include:: command/events.rst
+
+.. include:: command/export.rst
+
+.. include:: command/history.rst
+
+.. include:: command/images.rst
+
+.. include:: command/import.rst
+
+.. include:: command/info.rst
+
+.. include:: command/insert.rst
+
+.. include:: command/inspect.rst
+
+.. include:: command/kill.rst
+
+.. include:: command/login.rst
+
+.. include:: command/logs.rst
+
+.. include:: command/port.rst
+
+.. include:: command/ps.rst
+
+.. include:: command/pull.rst
+
+.. include:: command/push.rst
+
+.. include:: command/restart.rst
+
+.. include:: command/rm.rst
+
+.. include:: command/rmi.rst
+
+.. include:: command/run.rst
+
+.. include:: command/search.rst
+
+.. include:: command/start.rst
+
+.. include:: command/stop.rst
+
+.. include:: command/tag.rst
+
+.. include:: command/top.rst
+
+.. include:: command/version.rst
+
+.. include:: command/wait.rst
+
+

+ 8 - 5
docs/sources/commandline/command/commit.rst

@@ -14,12 +14,15 @@
 
       -m="": Commit message
       -author="": Author (eg. "John Hannibal Smith <hannibal@a-team.com>"
-      -run="": Config automatically applied when the image is
-       run. "+`(ex: {"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
+      -run="": Configuration to be applied when the image is launched with `docker run`. 
+               (ex: '{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
 
-Full -run example::
+Full -run example (multiline is ok within a single quote ``'``)
 
-{
+::
+
+  $ sudo docker commit -run='
+  {
       "Entrypoint" : null,
       "Privileged" : false,
       "User" : "",
@@ -46,4 +49,4 @@ Full -run example::
       "NetworkDisabled" : false,
       "Memory" : 0,
       "AttachStdout" : false
-}
+  }' $CONTAINER_ID

+ 1 - 1
docs/sources/commandline/command/images.rst

@@ -23,4 +23,4 @@ Displaying images visually
 
     sudo docker images -viz | dot -Tpng -o docker.png
 
-.. image:: images/docker_images.gif
+.. image:: https://docs.docker.io/en/latest/_static/docker_images.gif

+ 2 - 1
docs/sources/commandline/command/run.rst

@@ -23,10 +23,11 @@
       -m=0: Memory limit (in bytes)
       -n=true: Enable networking for this container
       -p=[]: Map a network port to the container
+      -rm=false: Automatically remove the container when it exits (incompatible with -d)
       -t=false: Allocate a pseudo-tty
       -u="": Username or UID
       -dns=[]: Set custom dns servers for the container
-      -v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro]. If "host-dir" is missing, then docker creates a new volume.
+      -v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro]. If "container-dir" is missing, then docker creates a new volume.
       -volumes-from="": Mount all volumes from the given container.
       -entrypoint="": Overwrite the default entrypoint set by the image.
       -w="": Working directory inside the container

+ 1 - 1
docs/sources/contributing/devenvironment.rst

@@ -124,7 +124,7 @@ You can run an interactive session in the newly built container:
 
 
 
-.. note:: The binary is availalbe outside the container in the directory  ``./bundles/<version>-dev/binary/``.
+.. note:: The binary is available outside the container in the directory  ``./bundles/<version>-dev/binary/``. You can swap your host docker executable with this binary for live testing - for example, on ubuntu: ``sudo service docker stop ; sudo cp $(which docker) $(which docker)_ ; sudo cp ./bundles/<version>-dev/binary/docker-<version>-dev $(which docker);sudo service docker start``.
 
 
 **Need More Help?**

+ 12 - 9
docs/sources/examples/hello_world.rst

@@ -2,6 +2,11 @@
 :description: A simple hello world example with Docker
 :keywords: docker, example, hello world
 
+.. _examples:
+
+Hello World
+-----------
+
 .. _running_examples:
 
 Running the Examples
@@ -166,13 +171,11 @@ See the example in action
 The next example in the series is a :ref:`python_web_app` example, or
 you could skip to any of the other examples:
 
-.. toctree::
-   :maxdepth: 1
 
-   python_web_app
-   nodejs_web_app
-   running_redis_service
-   running_ssh_service
-   couchdb_data_volumes
-   postgresql_service
-   mongodb
+* :ref:`python_web_app`
+* :ref:`nodejs_web_app`
+* :ref:`running_redis_service`
+* :ref:`running_ssh_service`
+* :ref:`running_couchdb_service`
+* :ref:`postgresql_service`
+* :ref:`mongodb`

+ 25 - 13
docs/sources/examples/postgresql_service.rst

@@ -39,12 +39,12 @@ Update its dependencies.
 
     apt-get update
 
-Install ``python-software-properies``.
+Install ``python-software-properties``.
 
 .. code-block:: bash
 
-    apt-get install python-software-properties
-    apt-get install software-properties-common
+    apt-get -y install python-software-properties
+    apt-get -y install software-properties-common
 
 Add Pitti's PostgreSQL repository. It contains the most recent stable release
 of PostgreSQL i.e. ``9.2``.
@@ -66,18 +66,19 @@ other roles.  Following Vagrant's convention the role will be named
 
 .. code-block:: bash
 
-    sudo -u postgres createuser -P -d -r -s docker
+    su postgres -c "createuser -P -d -r -s docker"
 
 Create a test database also named ``docker`` owned by previously created ``docker``
 role.
 
 .. code-block:: bash
 
-    sudo -u postgres createdb -O docker docker
+    su postgres -c "createdb -O docker docker"
 
 Adjust PostgreSQL configuration so that remote connections to the
 database are possible. Make sure that inside
-``/etc/postgresql/9.2/main/pg_hba.conf`` you have following line:
+``/etc/postgresql/9.2/main/pg_hba.conf`` you have following line (you will need
+to install an editor, e.g. ``apt-get install vim``):
 
 .. code-block:: bash
 
@@ -90,9 +91,17 @@ uncomment ``listen_addresses`` so it is as follows:
 
     listen_addresses='*'
 
-*Note:* this PostgreSQL setup is for development only purposes. Refer
-to PostgreSQL documentation how to fine-tune these settings so that it
-is enough secure.
+.. note::
+
+    This PostgreSQL setup is for development only purposes. Refer
+    to PostgreSQL documentation how to fine-tune these settings so that it
+    is enough secure.
+
+Exit.
+
+.. code-block:: bash
+
+    exit
 
 Create an image and assign it a name. ``<container_id>`` is in the
 Bash prompt; you can also locate it using ``docker ps -a``.
@@ -111,7 +120,9 @@ Finally, run PostgreSQL server via ``docker``.
         -D /var/lib/postgresql/9.2/main \
         -c config_file=/etc/postgresql/9.2/main/postgresql.conf')
 
-Connect the PostgreSQL server using ``psql``.
+Connect the PostgreSQL server using ``psql`` (You will need postgres installed
+on the machine.  For ubuntu, use something like
+``sudo apt-get install postgresql``).
 
 .. code-block:: bash
 
@@ -128,7 +139,7 @@ As before, create roles or databases if needed.
     docker=# CREATE DATABASE foo OWNER=docker;
     CREATE DATABASE
 
-Additionally, publish there your newly created image on Docker Index.
+Additionally, publish your newly created image on Docker Index.
 
 .. code-block:: bash
 
@@ -149,10 +160,11 @@ container starts.
 
 .. code-block:: bash
 
-    sudo docker commit <container_id> <your username>/postgresql -run='{"Cmd": \
+    sudo docker commit -run='{"Cmd": \
       ["/bin/su", "postgres", "-c", "/usr/lib/postgresql/9.2/bin/postgres -D \
       /var/lib/postgresql/9.2/main -c \
-      config_file=/etc/postgresql/9.2/main/postgresql.conf"], PortSpecs": ["5432"]}
+      config_file=/etc/postgresql/9.2/main/postgresql.conf"], "PortSpecs": ["5432"]}' \
+      <container_id> <your username>/postgresql
 
 From now on, just type ``docker run <your username>/postgresql`` and
 PostgreSQL should automatically start.

+ 1 - 1
docs/sources/index.rst

@@ -2,7 +2,7 @@
 :description: An overview of the Docker Documentation
 :keywords: containers, lxc, concepts, explanation
 
-.. image:: static_files/dockerlogo-h.png
+.. image:: https://www.docker.io/static/img/linked/dockerlogo-horizontal.png
 
 Introduction
 ------------

+ 4 - 4
docs/sources/installation/amazon.rst

@@ -44,10 +44,10 @@ Security Group to allow SSH.** By default all incoming ports to your
 new instance will be blocked by the AWS Security Group, so you might
 just get timeouts when you try to connect.
 
-Installing with ``get.docker.io`` (as above) will create a service
-named ``dockerd``. You may want to set up a :ref:`docker group
-<dockergroup>` and add the *ubuntu* user to it so that you don't have
-to use ``sudo`` for every Docker command.
+Installing with ``get.docker.io`` (as above) will create a service named
+``lxc-docker``. It will also set up a :ref:`docker group <dockergroup>` and you
+may want to add the *ubuntu* user to it so that you don't have to use ``sudo``
+for every Docker command.
 
 Once you've got Docker installed, you're ready to try it out -- head
 on over to the :doc:`../use/basics` or :doc:`../examples/index` section.

+ 1 - 1
docs/sources/installation/archlinux.rst

@@ -80,7 +80,7 @@ To enable the forwarding, run as root on the host system:
 
     sysctl net.ipv4.ip_forward=1
     
-And, to make it persistent across reboots, enable it on the host's **/etc/sysctl.conf**:
+And, to make it persistent across reboots, enable it on the host's **/etc/sysctl.d/docker.conf**:
 
 ::
 

+ 24 - 51
docs/sources/installation/gentoolinux.rst

@@ -11,59 +11,45 @@ Gentoo Linux
 
 .. include:: install_unofficial.inc
 
-Installing Docker on Gentoo Linux can be accomplished by using the overlay
-provided at https://github.com/tianon/docker-overlay.  The most up-to-date
-documentation for properly installing the overlay can be found in the overlay
-README.  The information here is provided for reference, and may be out of date.
+Installing Docker on Gentoo Linux can be accomplished using one of two methods.
+The first and best way if you're looking for a stable experience is to use the
+official `app-emulation/docker` package directly in the portage tree.
+
+If you're looking for a ``-bin`` ebuild, a live ebuild, or bleeding edge
+ebuild changes/fixes, the second installation method is to use the overlay
+provided at https://github.com/tianon/docker-overlay which can be added using
+``app-portage/layman``. The most accurate and up-to-date documentation for
+properly installing and using the overlay can be found in `the overlay README
+<https://github.com/tianon/docker-overlay/blob/master/README.md#using-this-overlay>`_.
 
 Installation
 ^^^^^^^^^^^^
 
-Ensure that layman is installed:
-
-.. code-block:: bash
-
-   sudo emerge -av app-portage/layman
-
-Add the "docker" overlay using layman:
-
-.. code-block:: bash
-
-   sudo layman -a docker
-
-Once that completes, the ``app-emulation/docker`` package will be available
-for emerge:
+The package should properly pull in all the necessary dependencies and prompt
+for all necessary kernel options.  For the most straightforward installation
+experience, use ``sys-kernel/aufs-sources`` as your kernel sources.  If you
+prefer not to use ``sys-kernel/aufs-sources``, the portage tree also contains
+``sys-fs/aufs3``, which includes the patches necessary for adding AUFS support
+to other kernel source packages such as ``sys-kernel/gentoo-sources`` (and a
+``kernel-patch`` USE flag to perform the patching to ``/usr/src/linux``
+automatically).
 
 .. code-block:: bash
 
    sudo emerge -av app-emulation/docker
 
-If you prefer to use the official binaries, or just do not wish to compile
-docker, emerge ``app-emulation/docker-bin`` instead.  It is important to
-remember that Gentoo is still an unofficial platform, even when using the
-official binaries.
-
-The package should already include all the necessary dependencies.  For the
-simplest installation experience, use ``sys-kernel/aufs-sources`` directly as
-your kernel sources.  If you prefer not to use ``sys-kernel/aufs-sources``, the
-portage tree also contains ``sys-fs/aufs3``, which contains the patches
-necessary for adding AUFS support to other kernel source packages (and a
-``kernel-patch`` use flag to perform the patching automatically).
-
-Between ``app-emulation/lxc`` and ``app-emulation/docker``, all the
-necessary kernel configuration flags should be checked for and warned about in
-the standard manner.
-
 If any issues arise from this ebuild or the resulting binary, including and
 especially missing kernel configuration flags and/or dependencies, `open an
-issue <https://github.com/tianon/docker-overlay/issues>`_ on the docker-overlay
-repository or ping tianon in the #docker IRC channel.
+issue on the docker-overlay repository
+<https://github.com/tianon/docker-overlay/issues>`_ or ping tianon directly in
+the #docker IRC channel on the freenode network.
 
 Starting Docker
 ^^^^^^^^^^^^^^^
 
-Ensure that you are running a kernel that includes the necessary AUFS support
-and includes all the necessary modules and/or configuration for LXC.
+Ensure that you are running a kernel that includes the necessary AUFS
+patches/support and includes all the necessary modules and/or configuration for
+LXC.
 
 OpenRC
 ------
@@ -110,16 +96,3 @@ Or, to enable it more permanently:
 .. code-block:: bash
 
    echo net.ipv4.ip_forward = 1 | sudo tee /etc/sysctl.d/docker.conf
-
-fork/exec /usr/sbin/lxc-start: operation not permitted
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Unfortunately, Gentoo suffers from `issue #1422
-<https://github.com/dotcloud/docker/issues/1422>`_, meaning that after every
-fresh start of docker, the first docker run fails due to some tricky terminal
-issues, so be sure to run something trivial (such as ``docker run -i -t busybox
-echo hi``) before attempting to run anything important.
-
-There is a tentative (and very hacky) workaround for this in the OpenRC init
-script, and it can be enabled by modifying the appropriate value in
-``/etc/conf.d/docker`` after successful installation.

+ 2 - 2
docs/sources/installation/ubuntulinux.rst

@@ -75,7 +75,7 @@ Docker is available as a Debian package, which makes installation easy.
 
    # Add the Docker repository key to your local keychain
    # using apt-key finger you can check the fingerprint matches 36A1 D786 9245 C895 0F96 6E92 D857 6A8B A88D 21E9
-   sudo sh -c "curl https://get.docker.io/gpg | apt-key add -"
+   sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
 
    # Add the Docker repository to your apt sources list.
    sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@@ -129,7 +129,7 @@ to follow them again.*
 
    # Add the Docker repository key to your local keychain
    # using apt-key finger you can check the fingerprint matches 36A1 D786 9245 C895 0F96 6E92 D857 6A8B A88D 21E9
-   sudo sh -c "curl https://get.docker.io/gpg | apt-key add -"
+   sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
 
    # Add the Docker repository to your apt sources list.
    sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"

+ 5 - 8
docs/sources/installation/upgrading.rst

@@ -53,13 +53,10 @@ If you installed the Docker :ref:`binaries` then follow these steps:
 .. code-block:: bash
 
    # get the latest binary
-   wget http://get.docker.io/builds/Linux/x86_64/docker-latest.tgz
-
-
-.. code-block:: bash
-
-   # Unpack it to your current dir
-   tar -xf docker-latest.tgz
+   wget http://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
+   
+   # make it executable
+   chmod +x docker
 
 
 Start docker in daemon mode (``-d``) and disconnect, running the
@@ -73,4 +70,4 @@ which might reside in your path.
    sudo ./docker -d &
 
 
-Alternatively you can replace the docker binary in ``/usr/local/bin``
+Alternatively you can replace the docker binary in ``/usr/local/bin``.

+ 1 - 3
docs/sources/installation/vagrant.rst

@@ -53,9 +53,7 @@ Spin it up
 
    * Download the 'official' Precise64 base ubuntu virtual machine image from vagrantup.com
    * Boot this image in virtualbox
-   * Add the `Docker PPA sources <https://launchpad.net/~dotcloud/+archive/lxc-docker>`_ to /etc/apt/sources.lst
-   * Update your sources
-   * Install lxc-docker
+   * Follow official :ref:`ubuntu_linux` installation path
 
    You now have a Ubuntu Virtual Machine running with docker pre-installed.
 

+ 0 - 0
docs/sources/commandline/command/images/docker_images.gif → docs/sources/static_files/docker_images.gif


+ 1 - 1
docs/sources/toctree.rst

@@ -8,7 +8,7 @@ Documentation
 This documentation has the following resources:
 
 .. toctree::
-   :titlesonly:
+   :maxdepth: 1
 
    Introduction <index>
    installation/index

+ 4 - 2
docs/sources/use/baseimages.rst

@@ -27,7 +27,7 @@ It can be as simple as this to create an Ubuntu base image::
   $ sudo debootstrap raring raring > /dev/null
   $ sudo tar -C raring -c . | sudo docker import - raring
   a29c15f1bf7a
-  $ sudo docker run raring cat /etc/lsb-release                     
+  $ sudo docker run raring cat /etc/lsb-release
   DISTRIB_ID=Ubuntu
   DISTRIB_RELEASE=13.04
   DISTRIB_CODENAME=raring
@@ -37,5 +37,7 @@ There are more example scripts for creating base images in the
 Docker Github Repo:
 
 * `BusyBox <https://github.com/dotcloud/docker/blob/master/contrib/mkimage-busybox.sh>`_
-* `Debian
+* `CentOS
+  <https://github.com/dotcloud/docker/blob/master/contrib/mkimage-centos.sh>`_
+* `Debian/Ubuntu
   <https://github.com/dotcloud/docker/blob/master/contrib/mkimage-debian.sh>`_

+ 12 - 6
docs/sources/use/builder.rst

@@ -54,8 +54,14 @@ Docker evaluates the instructions in a Dockerfile in order. **The
 first instruction must be `FROM`** in order to specify the
 :ref:`base_image_def` from which you are building.
 
-Docker will ignore **comment lines** *beginning* with ``#``. A comment
-marker anywhere in the rest of the line will be treated as an argument.
+Docker will treat lines that *begin* with ``#`` as a comment. A ``#``
+marker anywhere else in the line will be treated as an argument. This
+allows statements like:
+
+::
+
+    # Comment
+    RUN echo 'we are running some # of cool things'
 
 3. Instructions
 ===============
@@ -226,10 +232,10 @@ The copy obeys the following rules:
   with conflicts resolved in favor of 2) on a file-by-file basis.
 
 * If ``<src>`` is any other kind of file, it is copied individually
-  along with its metadata. In this case, if ``<dst>`` ends with a
+  along with its metadata. In this case, if ``<dest>`` ends with a
   trailing slash ``/``, it will be considered a directory and the
-  contents of ``<src>`` will be written at ``<dst>/base(<src>)``.
-* If ``<dst>`` does not end with a trailing slash, it will be
+  contents of ``<src>`` will be written at ``<dest>/base(<src>)``.
+* If ``<dest>`` does not end with a trailing slash, it will be
   considered a regular file and the contents of ``<src>`` will be
   written at ``<dst>``.
 * If ``<dest>`` doesn't exist, it is created along with all missing
@@ -321,7 +327,7 @@ the command given by ``CMD`` is executed.
     # VERSION               0.0.1
 
     FROM      ubuntu
-    MAINTAINER Guillaume J. Charmes "guillaume@dotcloud.com"
+    MAINTAINER Guillaume J. Charmes <guillaume@dotcloud.com>
 
     # make sure the package repository is up to date
     RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list

+ 27 - 0
docs/sources/use/workingwithrepository.rst

@@ -176,3 +176,30 @@ you can push and pull it like any other repository, but it will
 **not** be searchable (or indexed at all) in the Central Index, and
 there will be no user name checking performed. Your registry will
 function completely independently from the Central Index.
+
+Authentication file
+-------------------
+
+The authentication is stored in a json file, ``.dockercfg`` located in your
+home directory. It supports multiple registry urls.
+
+``docker login`` will create the "https://index.docker.io/v1/" key.
+
+``docker login https://my-registry.com`` will create the "https://my-registry.com" key.
+
+For example:
+
+.. code-block:: json
+
+   {
+	"https://index.docker.io/v1/": {
+		"auth": "xXxXxXxXxXx=",
+		"email": "email@example.com"
+	},
+	"https://my-registry.com": {
+		"auth": "XxXxXxXxXxX=",
+		"email": "email@my-registry.com"
+	}
+   }
+
+The ``auth`` field represents ``base64(<username>:<password>)``

+ 113 - 198
docs/theme/docker/layout.html

@@ -1,51 +1,47 @@
 <!DOCTYPE html>
-<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
-<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
-<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
 <head>
     <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     <meta name="google-site-verification" content="UxV66EKuPe87dgnH1sbrldrx6VsoWMrx5NjwkgUFxXI" />
-
     <title>{{ meta['title'] if meta and meta['title'] else title }} - Docker Documentation</title>
-
     <meta name="description" content="{{ meta['description'] if meta }}" />
     <meta name="keywords" content="{{ meta['keywords'] if meta }}" />
+    <!-- Swiftype tags: https://swiftype.com/documentation/meta_tags -->
+    <meta property='st:popularity' content='4' />
+    <meta property='st:type' content='docker_doc' />
 
     {%- set url_root = pathto('', 1) %}
     {%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
 
     <script type="text/javascript">
-        // This is probably used by the search engine
-        var DOCUMENTATION_OPTIONS = {
-            URL_ROOT:    '{{ url_root }}',
-            VERSION:     '{{ release|e }}',
-            COLLAPSE_INDEX: false,
-            FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
-            HAS_SOURCE:  {{ has_source|lower }}
-        };
+        // This is included here for Javascript that doesn't have access to the templates.
+        var doc_version = "{{ current_version }}";
+        var doc_slug = "{{ slug }}";
     </script>
 
     {%- 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
+    ['//code.jquery.com/jquery-1.10.1.min.js']
+    + ['//fonts.googleapis.com/css?family=Cabin:400,700,400italic']
     %}
 
-    {%- set script_files = script_files + ['_static/js/docs.js'] %}
+    {#
+        This part is hopefully complex because things like |cut '/index/' are not available in spinx jinja
+        and will make it crash. (and we need index/ out.
+    #}
+    <link rel="canonical" href="http://docs.docker.io/en/latest/
+    {%- for word in pagename.split('/') -%}
+        {%- if word != 'index' -%}
+            {%- if word != '' -%}
+                {{ word }}/
+            {%- endif -%}
+        {%- endif -%}
+    {%- endfor -%}
+    ">
 
-    {%- if pagename == 'index' %}
-    <link rel="canonical" href="http://docs.docker.io/en/latest/">
-    {% else %}
-    <link rel="canonical" href="http://docs.docker.io/en/latest/{{ pagename }}/">
-    {% endif %}
     {%- for cssfile in css_files %}
     <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
     {%- endfor %}
@@ -53,19 +49,17 @@
     {%- for scriptfile in script_files if scriptfile != '_static/jquery.js' %}
     <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
     {%- endfor %}
-
     <link rel="shortcut icon" href="{{ pathto('_static/favicon.png', 1) }}"/>
-
-
     {%- block extrahead %}{% endblock %}
 
 </head>
 
 <body>
 
-<div class="navbar navbar-fixed-top">
+<div id="wrap">
+<div class="navbar navbar-static-top navbar-inner navbar-fixed-top ">
     <div class="navbar-dotcloud">
-        <div class="container" style="text-align: center;">
+        <div class="container">
 
             <div style="float: right" class="pull-right">
                 <ul class="nav">
@@ -75,49 +69,37 @@
                     <li id="nav-community"><a href="http://www.docker.io/community/" title="Community">Community</a></li>
                     <li id="nav-documentation" class="active"><a href="http://docs.docker.io/en/latest/">Documentation</a></li>
                     <li id="nav-blog"><a href="http://blog.docker.io/" title="Docker Blog">Blog</a></li>
-                    <li id="nav-index"><a href="http://index.docker.io/" title="Docker Image Index, find images here">INDEX <img class="inline-icon" src="{{ pathto('_static/img/external-link-icon.png', 1) }}" title="external link"> </a></li>
+                    <li id="nav-index"><a href="http://index.docker.io/" title="Docker Image Index, find images here">INDEX <img class="inline-icon" alt="link to external site" src="{{ pathto('_static/img/external-link-icon.png', 1) }}" title="external link"> </a></li>
                 </ul>
             </div>
 
-            <div style="margin-left: -12px; float: left;">
-                <a href="http://www.docker.io" title="Docker Homepage"><img style="margin-top: 0px; height: 60px; width: 160px; margin-left: 10px;" src="{{ pathto('_static/img/docker-top-logo.png', 1) }}"></a>
+            <div class="brand-logo">
+                <a href="http://www.docker.io" title="Docker Homepage"><img src="{{ pathto('_static/img/docker-top-logo.png', 1) }}" alt="Docker logo"></a>
             </div>
         </div>
-
-
     </div>
 </div>
 
-
-<div class="container">
-    <div class="row">
-        <div class="span12 titlebar">
-            <!--<span class="pull-right" style="margin-left: 20px; font-size: 20px">{{version}}</span>-->
-            <div class="pull-right" id="fork-us" style="margin-top: 16px; margin-right: 16px;">
-                <a  href="https://github.com/dotcloud/docker/blob/master/docs/sources/{{ pagename }}.rst"><img src="{{ pathto('_static/img/fork-us.png', 1) }}"> Edit this page on Github</a>
-            </div>
-            <h1 class="pageheader"><a href="http://docs.docker.io/en/latest/" title="Documentation" style="color: white;">DOCUMENTATION</a></h1>
-
-        </div>
-    </div>
-
-</div>
-
 <div class="container">
 
     <!-- Docs nav
      ================================================== -->
-    <div class="row" style="position: relative">
+    <div class="row main-row">
 
         <div class="span3 sidebar bs-docs-sidebar">
+            <div class="page-title" >
+                <h4>DOCUMENTATION</h4>
+            </div>
+            
             {{ toctree(collapse=False, maxdepth=3) }}
 	    <form>
 	      <input type="text" id="st-search-input" class="st-search-input span3" style="width:160px;" />
+          <div id="st-results-container"></div>
 	    </form>
         </div>
 
         <!-- body block -->
-        <div class="span9">
+        <div class="span9 main-content">
 
             <!-- Main section
             ================================================== -->
@@ -125,167 +107,100 @@
                 {% block body %}{% endblock %}
             </section>
 
-	    <!-- Swiftype search -->
-	    <div id="st-results-container"></div>
-	    <script type="text/javascript">
-	      var Swiftype = window.Swiftype || {};
-	      (function() {
-	      Swiftype.key = 'pWPnnyvwcfpcrw1o51Sz';
-	      Swiftype.inputElement = '#st-search-input';
-	      Swiftype.resultContainingElement = '#st-results-container';
-	      Swiftype.attachElement = '#st-search-input';
-	      Swiftype.renderStyle = "overlay";
-
-	      var script = document.createElement('script');
-	      script.type = 'text/javascript';
-	      script.async = true;
-	      script.src = "//swiftype.com/embed.js";
-	      var entry = document.getElementsByTagName('script')[0];
-	      entry.parentNode.insertBefore(script, entry);
-	      }());
-	    </script>
-
+            <div class="pull-right"><a href="https://github.com/dotcloud/docker/blob/{{ current_version }}/docs/sources/{{ pagename }}.rst" title="edit this article">Edit this article on GitHub</a></div>
         </div>
     </div>
 </div>
 
-<div id="footer" class="container" >
-    <div class="row">
-
-        <div class="span12 footer">
-            <div class="tbox textright forceleftmargin social links pull-right">
-                <a class="twitter" href="http://twitter.com/docker">Twitter</a>
-                <a class="github" href="https://github.com/dotcloud/docker/">GitHub</a>
+<div id="push-the-footer"></div>
+</div> <!-- end wrap for pushing footer -->
+
+<div id="footer">
+    <div class="footer-landscape">
+        <div class="footer-landscape-image">
+            <!-- footer -->
+            <div class="container">
+                <div class="row footer">
+                    <div class="span12 tbox">
+                        <div class="tbox">
+                            <p>Docker is an open source project, sponsored by  <a href="https://dotcloud.com">dotCloud</a>, under the <a href="https://github.com/dotcloud/docker/blob/master/LICENSE" title="Docker licence, hosted in the Github repository">apache 2.0 licence</a></p>
+                        </div>
+
+                        <div class="social links">
+                            <a class="twitter" href="http://twitter.com/docker">Twitter</a>
+                            <a class="github" href="https://github.com/dotcloud/docker/">GitHub</a>
+                        </div>
+
+                        <div class="tbox version-flyer ">
+                            <div class="content">
+                                <small>Current version:</small>
+                                <ul class="inline">
+                                    {% for slug, url in versions %}
+                                    <li class="alternative"><a href="{{ url }}{%- for word in pagename.split('/') -%}
+                                        {%- if word != 'index' -%}
+                                            {%- if word != '' -%}
+                                                {{ word }}/
+                                            {%- endif -%}
+                                        {%- endif -%}
+                                    {%- endfor -%}"
+                                    title="Switch to {{ slug }}">{{ slug }}</a></li>
+                                    {% endfor %}
+                                </ul>
+                            </div>
+                        </div>
+
+
+                    </div>
+                </div>
             </div>
-
-            Docker is a project by <a href="http://www.dotcloud.com">dotCloud</a>
-
-
-{#            {%- if show_source and has_source and sourcename %}#}
-{#            ·#}
-{#            <a href="{{ pathto('_sources/' + sourcename, true)|e }}"#}
-{#               rel="nofollow">View the RST source of this page</a>#}
-{#            {%- endif %}#}
-{#            {%- if pagename != "search" %}#}
-
-{#TODO: Make a proper location for the search #}
-{#            Search:#}
-{#            <form#}
-{#                    style="display: inline;"#}
-{#                    class="search" action="{{ pathto('search') }}" method="get">#}
-{#                <input type="text" name="q" size="18" />#}
-{#                <input type="hidden" name="check_keywords" value="yes" />#}
-{#                <input type="hidden" name="area" value="default" />#}
-{#            </form>#}
-{#            {%- endif %}#}
-
-
         </div>
+        <!-- end of footer -->
     </div>
 </div>
 
 
-  <!-- script which should be loaded after everything else -->
-<script type="text/javascript">
+<script type="text/javascript" src="{{ pathto('_static/js/docs.js', 1) }}"></script>
+
+<!-- Swiftype search -->
 
-    // Function to make the sticky header possible
-    var shiftWindow = function() {
-        scrollBy(0, -70);
-        console.log("window shifted")
-    };
-    window.addEventListener("hashchange", shiftWindow);
-
-    function loadShift() {
-        if (window.location.hash) {
-            console.log("window has hash");
-            shiftWindow();
-        }
-    }
-
-    $(window).load(function() {
-        loadShift();
-        console.log("late loadshift");
-    });
-
-    $(function(){
-
-        // sidebar accordian-ing
-        // don't apply on last object (it should be the FAQ)
-
-        // define an array to which all opened items should be added
-        var openmenus = [];
-
-        var elements = $('.toctree-l2');
-        for (var i = 0; i < elements.length; i += 1) { var current = $(elements[i]); current.children('ul').hide();}
-
-
-        // set initial collapsed state
-        var elements = $('.toctree-l1');
-        for (var i = 0; i < elements.length; i += 1) {
-            var current = $(elements[i]);
-            if (current.hasClass('current')) {
-
-                currentlink = current.children('a')[0].href;
-                openmenus.push(currentlink);
-
-                // do nothing
-            } else {
-                // collapse children
-                current.children('ul').hide();
-            }
-        }
-
-        // attached handler on click
-        // Do not attach to first element or last (intro, faq) so that
-        // first and last link directly instead of accordian
-        $('.sidebar > ul > li > a').not(':last').not(':first').click(function(){
-
-            var index = $.inArray(this.href, openmenus)
-
-            if (index > -1) {
-                console.log(index);
-                openmenus.splice(index, 1);
-
-
-                $(this).parent().children('ul').slideUp(200, function() {
-                    // $(this).parent().removeClass('current'); // toggle after effect
-                });
-            }
-            else {
-                openmenus.push(this.href);
-                console.log(this);
-
-                var current = $(this);
-
-                setTimeout(function() {
-                    $('.sidebar > ul > li').removeClass('current');
-                    current.parent().addClass('current'); // toggle before effect
-                    current.parent().children('ul').hide();
-                    current.parent().children('ul').slideDown(200);
-                }, 100);
-            }
-            return false;
-        });
-
-    });
+<script type="text/javascript">
+  var Swiftype = window.Swiftype || {};
+  (function() {
+  Swiftype.key = 'pWPnnyvwcfpcrw1o51Sz';
+  Swiftype.inputElement = '#st-search-input';
+  Swiftype.resultContainingElement = '#st-results-container';
+  Swiftype.attachElement = '#st-search-input';
+  Swiftype.renderStyle = "overlay";
+  // from https://swiftype.com/questions/how-can-i-make-more-popular-content-rank-higher 
+  // Use "page" for now -- they don't subgroup by document type yet.
+  Swiftype.searchFunctionalBoosts = {"page": {"popularity": "linear"}};
+
+  var script = document.createElement('script');
+  script.type = 'text/javascript';
+  script.async = true;
+  script.src = "//swiftype.com/embed.js";
+  var entry = document.getElementsByTagName('script')[0];
+  entry.parentNode.insertBefore(script, entry);
+  }());
 </script>
 
-    <!-- Google analytics -->
-    <script type="text/javascript">
 
-        var _gaq = _gaq || [];
-        _gaq.push(['_setAccount', 'UA-6096819-11']);
-        _gaq.push(['_setDomainName', 'docker.io']);
-        _gaq.push(['_setAllowLinker', true]);
-        _gaq.push(['_trackPageview']);
+<!-- Google analytics -->
+<script type="text/javascript">
 
-        (function() {
-            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-        })();
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-6096819-11']);
+    _gaq.push(['_setDomainName', 'docker.io']);
+    _gaq.push(['_setAllowLinker', true]);
+    _gaq.push(['_trackPageview']);
 
-    </script>
+    (function() {
+        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+    })();
+
+</script>
 
 </body>
 </html>

+ 0 - 1109
docs/theme/docker/static/css/bootstrap-responsive.css

@@ -1,1109 +0,0 @@
-/*!
- * Bootstrap Responsive v2.3.0
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-
-.clearfix {
-  *zoom: 1;
-}
-
-.clearfix:before,
-.clearfix:after {
-  display: table;
-  line-height: 0;
-  content: "";
-}
-
-.clearfix:after {
-  clear: both;
-}
-
-.hide-text {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-
-.input-block-level {
-  display: block;
-  width: 100%;
-  min-height: 30px;
-  -webkit-box-sizing: border-box;
-     -moz-box-sizing: border-box;
-          box-sizing: border-box;
-}
-
-@-ms-viewport {
-  width: device-width;
-}
-
-.hidden {
-  display: none;
-  visibility: hidden;
-}
-
-.visible-phone {
-  display: none !important;
-}
-
-.visible-tablet {
-  display: none !important;
-}
-
-.hidden-desktop {
-  display: none !important;
-}
-
-.visible-desktop {
-  display: inherit !important;
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
-  .hidden-desktop {
-    display: inherit !important;
-  }
-  .visible-desktop {
-    display: none !important ;
-  }
-  .visible-tablet {
-    display: inherit !important;
-  }
-  .hidden-tablet {
-    display: none !important;
-  }
-}
-
-@media (max-width: 767px) {
-  .hidden-desktop {
-    display: inherit !important;
-  }
-  .visible-desktop {
-    display: none !important;
-  }
-  .visible-phone {
-    display: inherit !important;
-  }
-  .hidden-phone {
-    display: none !important;
-  }
-}
-
-.visible-print {
-  display: none !important;
-}
-
-@media print {
-  .visible-print {
-    display: inherit !important;
-  }
-  .hidden-print {
-    display: none !important;
-  }
-}
-
-@media (min-width: 1200px) {
-  .row {
-    margin-left: -30px;
-    *zoom: 1;
-  }
-  .row:before,
-  .row:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row:after {
-    clear: both;
-  }
-  [class*="span"] {
-    float: left;
-    min-height: 1px;
-    margin-left: 30px;
-  }
-  .container,
-  .navbar-static-top .container,
-  .navbar-fixed-top .container,
-  .navbar-fixed-bottom .container {
-    width: 1170px;
-  }
-  .span12 {
-    width: 1170px;
-  }
-  .span11 {
-    width: 1070px;
-  }
-  .span10 {
-    width: 970px;
-  }
-  .span9 {
-    width: 870px;
-  }
-  .span8 {
-    width: 770px;
-  }
-  .span7 {
-    width: 670px;
-  }
-  .span6 {
-    width: 570px;
-  }
-  .span5 {
-    width: 470px;
-  }
-  .span4 {
-    width: 370px;
-  }
-  .span3 {
-    width: 270px;
-  }
-  .span2 {
-    width: 170px;
-  }
-  .span1 {
-    width: 70px;
-  }
-  .offset12 {
-    margin-left: 1230px;
-  }
-  .offset11 {
-    margin-left: 1130px;
-  }
-  .offset10 {
-    margin-left: 1030px;
-  }
-  .offset9 {
-    margin-left: 930px;
-  }
-  .offset8 {
-    margin-left: 830px;
-  }
-  .offset7 {
-    margin-left: 730px;
-  }
-  .offset6 {
-    margin-left: 630px;
-  }
-  .offset5 {
-    margin-left: 530px;
-  }
-  .offset4 {
-    margin-left: 430px;
-  }
-  .offset3 {
-    margin-left: 330px;
-  }
-  .offset2 {
-    margin-left: 230px;
-  }
-  .offset1 {
-    margin-left: 130px;
-  }
-  .row-fluid {
-    width: 100%;
-    *zoom: 1;
-  }
-  .row-fluid:before,
-  .row-fluid:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row-fluid:after {
-    clear: both;
-  }
-  .row-fluid [class*="span"] {
-    display: block;
-    float: left;
-    width: 100%;
-    min-height: 30px;
-    margin-left: 2.564102564102564%;
-    *margin-left: 2.5109110747408616%;
-    -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-            box-sizing: border-box;
-  }
-  .row-fluid [class*="span"]:first-child {
-    margin-left: 0;
-  }
-  .row-fluid .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 2.564102564102564%;
-  }
-  .row-fluid .span12 {
-    width: 100%;
-    *width: 99.94680851063829%;
-  }
-  .row-fluid .span11 {
-    width: 91.45299145299145%;
-    *width: 91.39979996362975%;
-  }
-  .row-fluid .span10 {
-    width: 82.90598290598291%;
-    *width: 82.8527914166212%;
-  }
-  .row-fluid .span9 {
-    width: 74.35897435897436%;
-    *width: 74.30578286961266%;
-  }
-  .row-fluid .span8 {
-    width: 65.81196581196582%;
-    *width: 65.75877432260411%;
-  }
-  .row-fluid .span7 {
-    width: 57.26495726495726%;
-    *width: 57.21176577559556%;
-  }
-  .row-fluid .span6 {
-    width: 48.717948717948715%;
-    *width: 48.664757228587014%;
-  }
-  .row-fluid .span5 {
-    width: 40.17094017094017%;
-    *width: 40.11774868157847%;
-  }
-  .row-fluid .span4 {
-    width: 31.623931623931625%;
-    *width: 31.570740134569924%;
-  }
-  .row-fluid .span3 {
-    width: 23.076923076923077%;
-    *width: 23.023731587561375%;
-  }
-  .row-fluid .span2 {
-    width: 14.52991452991453%;
-    *width: 14.476723040552828%;
-  }
-  .row-fluid .span1 {
-    width: 5.982905982905983%;
-    *width: 5.929714493544281%;
-  }
-  .row-fluid .offset12 {
-    margin-left: 105.12820512820512%;
-    *margin-left: 105.02182214948171%;
-  }
-  .row-fluid .offset12:first-child {
-    margin-left: 102.56410256410257%;
-    *margin-left: 102.45771958537915%;
-  }
-  .row-fluid .offset11 {
-    margin-left: 96.58119658119658%;
-    *margin-left: 96.47481360247316%;
-  }
-  .row-fluid .offset11:first-child {
-    margin-left: 94.01709401709402%;
-    *margin-left: 93.91071103837061%;
-  }
-  .row-fluid .offset10 {
-    margin-left: 88.03418803418803%;
-    *margin-left: 87.92780505546462%;
-  }
-  .row-fluid .offset10:first-child {
-    margin-left: 85.47008547008548%;
-    *margin-left: 85.36370249136206%;
-  }
-  .row-fluid .offset9 {
-    margin-left: 79.48717948717949%;
-    *margin-left: 79.38079650845607%;
-  }
-  .row-fluid .offset9:first-child {
-    margin-left: 76.92307692307693%;
-    *margin-left: 76.81669394435352%;
-  }
-  .row-fluid .offset8 {
-    margin-left: 70.94017094017094%;
-    *margin-left: 70.83378796144753%;
-  }
-  .row-fluid .offset8:first-child {
-    margin-left: 68.37606837606839%;
-    *margin-left: 68.26968539734497%;
-  }
-  .row-fluid .offset7 {
-    margin-left: 62.393162393162385%;
-    *margin-left: 62.28677941443899%;
-  }
-  .row-fluid .offset7:first-child {
-    margin-left: 59.82905982905982%;
-    *margin-left: 59.72267685033642%;
-  }
-  .row-fluid .offset6 {
-    margin-left: 53.84615384615384%;
-    *margin-left: 53.739770867430444%;
-  }
-  .row-fluid .offset6:first-child {
-    margin-left: 51.28205128205128%;
-    *margin-left: 51.175668303327875%;
-  }
-  .row-fluid .offset5 {
-    margin-left: 45.299145299145295%;
-    *margin-left: 45.1927623204219%;
-  }
-  .row-fluid .offset5:first-child {
-    margin-left: 42.73504273504273%;
-    *margin-left: 42.62865975631933%;
-  }
-  .row-fluid .offset4 {
-    margin-left: 36.75213675213675%;
-    *margin-left: 36.645753773413354%;
-  }
-  .row-fluid .offset4:first-child {
-    margin-left: 34.18803418803419%;
-    *margin-left: 34.081651209310785%;
-  }
-  .row-fluid .offset3 {
-    margin-left: 28.205128205128204%;
-    *margin-left: 28.0987452264048%;
-  }
-  .row-fluid .offset3:first-child {
-    margin-left: 25.641025641025642%;
-    *margin-left: 25.53464266230224%;
-  }
-  .row-fluid .offset2 {
-    margin-left: 19.65811965811966%;
-    *margin-left: 19.551736679396257%;
-  }
-  .row-fluid .offset2:first-child {
-    margin-left: 17.094017094017094%;
-    *margin-left: 16.98763411529369%;
-  }
-  .row-fluid .offset1 {
-    margin-left: 11.11111111111111%;
-    *margin-left: 11.004728132387708%;
-  }
-  .row-fluid .offset1:first-child {
-    margin-left: 8.547008547008547%;
-    *margin-left: 8.440625568285142%;
-  }
-  input,
-  textarea,
-  .uneditable-input {
-    margin-left: 0;
-  }
-  .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 30px;
-  }
-  input.span12,
-  textarea.span12,
-  .uneditable-input.span12 {
-    width: 1156px;
-  }
-  input.span11,
-  textarea.span11,
-  .uneditable-input.span11 {
-    width: 1056px;
-  }
-  input.span10,
-  textarea.span10,
-  .uneditable-input.span10 {
-    width: 956px;
-  }
-  input.span9,
-  textarea.span9,
-  .uneditable-input.span9 {
-    width: 856px;
-  }
-  input.span8,
-  textarea.span8,
-  .uneditable-input.span8 {
-    width: 756px;
-  }
-  input.span7,
-  textarea.span7,
-  .uneditable-input.span7 {
-    width: 656px;
-  }
-  input.span6,
-  textarea.span6,
-  .uneditable-input.span6 {
-    width: 556px;
-  }
-  input.span5,
-  textarea.span5,
-  .uneditable-input.span5 {
-    width: 456px;
-  }
-  input.span4,
-  textarea.span4,
-  .uneditable-input.span4 {
-    width: 356px;
-  }
-  input.span3,
-  textarea.span3,
-  .uneditable-input.span3 {
-    width: 256px;
-  }
-  input.span2,
-  textarea.span2,
-  .uneditable-input.span2 {
-    width: 156px;
-  }
-  input.span1,
-  textarea.span1,
-  .uneditable-input.span1 {
-    width: 56px;
-  }
-  .thumbnails {
-    margin-left: -30px;
-  }
-  .thumbnails > li {
-    margin-left: 30px;
-  }
-  .row-fluid .thumbnails {
-    margin-left: 0;
-  }
-}
-
-@media (min-width: 768px) and (max-width: 979px) {
-  .row {
-    margin-left: -20px;
-    *zoom: 1;
-  }
-  .row:before,
-  .row:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row:after {
-    clear: both;
-  }
-  [class*="span"] {
-    float: left;
-    min-height: 1px;
-    margin-left: 20px;
-  }
-  .container,
-  .navbar-static-top .container,
-  .navbar-fixed-top .container,
-  .navbar-fixed-bottom .container {
-    width: 724px;
-  }
-  .span12 {
-    width: 724px;
-  }
-  .span11 {
-    width: 662px;
-  }
-  .span10 {
-    width: 600px;
-  }
-  .span9 {
-    width: 538px;
-  }
-  .span8 {
-    width: 476px;
-  }
-  .span7 {
-    width: 414px;
-  }
-  .span6 {
-    width: 352px;
-  }
-  .span5 {
-    width: 290px;
-  }
-  .span4 {
-    width: 228px;
-  }
-  .span3 {
-    width: 166px;
-  }
-  .span2 {
-    width: 104px;
-  }
-  .span1 {
-    width: 42px;
-  }
-  .offset12 {
-    margin-left: 764px;
-  }
-  .offset11 {
-    margin-left: 702px;
-  }
-  .offset10 {
-    margin-left: 640px;
-  }
-  .offset9 {
-    margin-left: 578px;
-  }
-  .offset8 {
-    margin-left: 516px;
-  }
-  .offset7 {
-    margin-left: 454px;
-  }
-  .offset6 {
-    margin-left: 392px;
-  }
-  .offset5 {
-    margin-left: 330px;
-  }
-  .offset4 {
-    margin-left: 268px;
-  }
-  .offset3 {
-    margin-left: 206px;
-  }
-  .offset2 {
-    margin-left: 144px;
-  }
-  .offset1 {
-    margin-left: 82px;
-  }
-  .row-fluid {
-    width: 100%;
-    *zoom: 1;
-  }
-  .row-fluid:before,
-  .row-fluid:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row-fluid:after {
-    clear: both;
-  }
-  .row-fluid [class*="span"] {
-    display: block;
-    float: left;
-    width: 100%;
-    min-height: 30px;
-    margin-left: 2.7624309392265194%;
-    *margin-left: 2.709239449864817%;
-    -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-            box-sizing: border-box;
-  }
-  .row-fluid [class*="span"]:first-child {
-    margin-left: 0;
-  }
-  .row-fluid .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 2.7624309392265194%;
-  }
-  .row-fluid .span12 {
-    width: 100%;
-    *width: 99.94680851063829%;
-  }
-  .row-fluid .span11 {
-    width: 91.43646408839778%;
-    *width: 91.38327259903608%;
-  }
-  .row-fluid .span10 {
-    width: 82.87292817679558%;
-    *width: 82.81973668743387%;
-  }
-  .row-fluid .span9 {
-    width: 74.30939226519337%;
-    *width: 74.25620077583166%;
-  }
-  .row-fluid .span8 {
-    width: 65.74585635359117%;
-    *width: 65.69266486422946%;
-  }
-  .row-fluid .span7 {
-    width: 57.18232044198895%;
-    *width: 57.12912895262725%;
-  }
-  .row-fluid .span6 {
-    width: 48.61878453038674%;
-    *width: 48.56559304102504%;
-  }
-  .row-fluid .span5 {
-    width: 40.05524861878453%;
-    *width: 40.00205712942283%;
-  }
-  .row-fluid .span4 {
-    width: 31.491712707182323%;
-    *width: 31.43852121782062%;
-  }
-  .row-fluid .span3 {
-    width: 22.92817679558011%;
-    *width: 22.87498530621841%;
-  }
-  .row-fluid .span2 {
-    width: 14.3646408839779%;
-    *width: 14.311449394616199%;
-  }
-  .row-fluid .span1 {
-    width: 5.801104972375691%;
-    *width: 5.747913483013988%;
-  }
-  .row-fluid .offset12 {
-    margin-left: 105.52486187845304%;
-    *margin-left: 105.41847889972962%;
-  }
-  .row-fluid .offset12:first-child {
-    margin-left: 102.76243093922652%;
-    *margin-left: 102.6560479605031%;
-  }
-  .row-fluid .offset11 {
-    margin-left: 96.96132596685082%;
-    *margin-left: 96.8549429881274%;
-  }
-  .row-fluid .offset11:first-child {
-    margin-left: 94.1988950276243%;
-    *margin-left: 94.09251204890089%;
-  }
-  .row-fluid .offset10 {
-    margin-left: 88.39779005524862%;
-    *margin-left: 88.2914070765252%;
-  }
-  .row-fluid .offset10:first-child {
-    margin-left: 85.6353591160221%;
-    *margin-left: 85.52897613729868%;
-  }
-  .row-fluid .offset9 {
-    margin-left: 79.8342541436464%;
-    *margin-left: 79.72787116492299%;
-  }
-  .row-fluid .offset9:first-child {
-    margin-left: 77.07182320441989%;
-    *margin-left: 76.96544022569647%;
-  }
-  .row-fluid .offset8 {
-    margin-left: 71.2707182320442%;
-    *margin-left: 71.16433525332079%;
-  }
-  .row-fluid .offset8:first-child {
-    margin-left: 68.50828729281768%;
-    *margin-left: 68.40190431409427%;
-  }
-  .row-fluid .offset7 {
-    margin-left: 62.70718232044199%;
-    *margin-left: 62.600799341718584%;
-  }
-  .row-fluid .offset7:first-child {
-    margin-left: 59.94475138121547%;
-    *margin-left: 59.838368402492065%;
-  }
-  .row-fluid .offset6 {
-    margin-left: 54.14364640883978%;
-    *margin-left: 54.037263430116376%;
-  }
-  .row-fluid .offset6:first-child {
-    margin-left: 51.38121546961326%;
-    *margin-left: 51.27483249088986%;
-  }
-  .row-fluid .offset5 {
-    margin-left: 45.58011049723757%;
-    *margin-left: 45.47372751851417%;
-  }
-  .row-fluid .offset5:first-child {
-    margin-left: 42.81767955801105%;
-    *margin-left: 42.71129657928765%;
-  }
-  .row-fluid .offset4 {
-    margin-left: 37.01657458563536%;
-    *margin-left: 36.91019160691196%;
-  }
-  .row-fluid .offset4:first-child {
-    margin-left: 34.25414364640884%;
-    *margin-left: 34.14776066768544%;
-  }
-  .row-fluid .offset3 {
-    margin-left: 28.45303867403315%;
-    *margin-left: 28.346655695309746%;
-  }
-  .row-fluid .offset3:first-child {
-    margin-left: 25.69060773480663%;
-    *margin-left: 25.584224756083227%;
-  }
-  .row-fluid .offset2 {
-    margin-left: 19.88950276243094%;
-    *margin-left: 19.783119783707537%;
-  }
-  .row-fluid .offset2:first-child {
-    margin-left: 17.12707182320442%;
-    *margin-left: 17.02068884448102%;
-  }
-  .row-fluid .offset1 {
-    margin-left: 11.32596685082873%;
-    *margin-left: 11.219583872105325%;
-  }
-  .row-fluid .offset1:first-child {
-    margin-left: 8.56353591160221%;
-    *margin-left: 8.457152932878806%;
-  }
-  input,
-  textarea,
-  .uneditable-input {
-    margin-left: 0;
-  }
-  .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 20px;
-  }
-  input.span12,
-  textarea.span12,
-  .uneditable-input.span12 {
-    width: 710px;
-  }
-  input.span11,
-  textarea.span11,
-  .uneditable-input.span11 {
-    width: 648px;
-  }
-  input.span10,
-  textarea.span10,
-  .uneditable-input.span10 {
-    width: 586px;
-  }
-  input.span9,
-  textarea.span9,
-  .uneditable-input.span9 {
-    width: 524px;
-  }
-  input.span8,
-  textarea.span8,
-  .uneditable-input.span8 {
-    width: 462px;
-  }
-  input.span7,
-  textarea.span7,
-  .uneditable-input.span7 {
-    width: 400px;
-  }
-  input.span6,
-  textarea.span6,
-  .uneditable-input.span6 {
-    width: 338px;
-  }
-  input.span5,
-  textarea.span5,
-  .uneditable-input.span5 {
-    width: 276px;
-  }
-  input.span4,
-  textarea.span4,
-  .uneditable-input.span4 {
-    width: 214px;
-  }
-  input.span3,
-  textarea.span3,
-  .uneditable-input.span3 {
-    width: 152px;
-  }
-  input.span2,
-  textarea.span2,
-  .uneditable-input.span2 {
-    width: 90px;
-  }
-  input.span1,
-  textarea.span1,
-  .uneditable-input.span1 {
-    width: 28px;
-  }
-}
-
-@media (max-width: 767px) {
-  body {
-    padding-right: 20px;
-    padding-left: 20px;
-  }
-  .navbar-fixed-top,
-  .navbar-fixed-bottom,
-  .navbar-static-top {
-    margin-right: -20px;
-    margin-left: -20px;
-  }
-  .container-fluid {
-    padding: 0;
-  }
-  .dl-horizontal dt {
-    float: none;
-    width: auto;
-    clear: none;
-    text-align: left;
-  }
-  .dl-horizontal dd {
-    margin-left: 0;
-  }
-  .container {
-    width: auto;
-  }
-  .row-fluid {
-    width: 100%;
-  }
-  .row,
-  .thumbnails {
-    margin-left: 0;
-  }
-  .thumbnails > li {
-    float: none;
-    margin-left: 0;
-  }
-  [class*="span"],
-  .uneditable-input[class*="span"],
-  .row-fluid [class*="span"] {
-    display: block;
-    float: none;
-    width: 100%;
-    margin-left: 0;
-    -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-            box-sizing: border-box;
-  }
-  .span12,
-  .row-fluid .span12 {
-    width: 100%;
-    -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-            box-sizing: border-box;
-  }
-  .row-fluid [class*="offset"]:first-child {
-    margin-left: 0;
-  }
-  .input-large,
-  .input-xlarge,
-  .input-xxlarge,
-  input[class*="span"],
-  select[class*="span"],
-  textarea[class*="span"],
-  .uneditable-input {
-    display: block;
-    width: 100%;
-    min-height: 30px;
-    -webkit-box-sizing: border-box;
-       -moz-box-sizing: border-box;
-            box-sizing: border-box;
-  }
-  .input-prepend input,
-  .input-append input,
-  .input-prepend input[class*="span"],
-  .input-append input[class*="span"] {
-    display: inline-block;
-    width: auto;
-  }
-  .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 0;
-  }
-  .modal {
-    position: fixed;
-    top: 20px;
-    right: 20px;
-    left: 20px;
-    width: auto;
-    margin: 0;
-  }
-  .modal.fade {
-    top: -100px;
-  }
-  .modal.fade.in {
-    top: 20px;
-  }
-}
-
-@media (max-width: 480px) {
-  .nav-collapse {
-    -webkit-transform: translate3d(0, 0, 0);
-  }
-  .page-header h1 small {
-    display: block;
-    line-height: 20px;
-  }
-  input[type="checkbox"],
-  input[type="radio"] {
-    border: 1px solid #ccc;
-  }
-  .form-horizontal .control-label {
-    float: none;
-    width: auto;
-    padding-top: 0;
-    text-align: left;
-  }
-  .form-horizontal .controls {
-    margin-left: 0;
-  }
-  .form-horizontal .control-list {
-    padding-top: 0;
-  }
-  .form-horizontal .form-actions {
-    padding-right: 10px;
-    padding-left: 10px;
-  }
-  .media .pull-left,
-  .media .pull-right {
-    display: block;
-    float: none;
-    margin-bottom: 10px;
-  }
-  .media-object {
-    margin-right: 0;
-    margin-left: 0;
-  }
-  .modal {
-    top: 10px;
-    right: 10px;
-    left: 10px;
-  }
-  .modal-header .close {
-    padding: 10px;
-    margin: -10px;
-  }
-  .carousel-caption {
-    position: static;
-  }
-}
-
-@media (max-width: 979px) {
-  body {
-    padding-top: 0;
-  }
-  .navbar-fixed-top,
-  .navbar-fixed-bottom {
-    position: static;
-  }
-  .navbar-fixed-top {
-    margin-bottom: 20px;
-  }
-  .navbar-fixed-bottom {
-    margin-top: 20px;
-  }
-  .navbar-fixed-top .navbar-inner,
-  .navbar-fixed-bottom .navbar-inner {
-    padding: 5px;
-  }
-  .navbar .container {
-    width: auto;
-    padding: 0;
-  }
-  .navbar .brand {
-    padding-right: 10px;
-    padding-left: 10px;
-    margin: 0 0 0 -5px;
-  }
-  .nav-collapse {
-    clear: both;
-  }
-  .nav-collapse .nav {
-    float: none;
-    margin: 0 0 10px;
-  }
-  .nav-collapse .nav > li {
-    float: none;
-  }
-  .nav-collapse .nav > li > a {
-    margin-bottom: 2px;
-  }
-  .nav-collapse .nav > .divider-vertical {
-    display: none;
-  }
-  .nav-collapse .nav .nav-header {
-    color: #777777;
-    text-shadow: none;
-  }
-  .nav-collapse .nav > li > a,
-  .nav-collapse .dropdown-menu a {
-    padding: 9px 15px;
-    font-weight: bold;
-    color: #777777;
-    -webkit-border-radius: 3px;
-       -moz-border-radius: 3px;
-            border-radius: 3px;
-  }
-  .nav-collapse .btn {
-    padding: 4px 10px 4px;
-    font-weight: normal;
-    -webkit-border-radius: 4px;
-       -moz-border-radius: 4px;
-            border-radius: 4px;
-  }
-  .nav-collapse .dropdown-menu li + li a {
-    margin-bottom: 2px;
-  }
-  .nav-collapse .nav > li > a:hover,
-  .nav-collapse .nav > li > a:focus,
-  .nav-collapse .dropdown-menu a:hover,
-  .nav-collapse .dropdown-menu a:focus {
-    background-color: #f2f2f2;
-  }
-  .navbar-inverse .nav-collapse .nav > li > a,
-  .navbar-inverse .nav-collapse .dropdown-menu a {
-    color: #999999;
-  }
-  .navbar-inverse .nav-collapse .nav > li > a:hover,
-  .navbar-inverse .nav-collapse .nav > li > a:focus,
-  .navbar-inverse .nav-collapse .dropdown-menu a:hover,
-  .navbar-inverse .nav-collapse .dropdown-menu a:focus {
-    background-color: #111111;
-  }
-  .nav-collapse.in .btn-group {
-    padding: 0;
-    margin-top: 5px;
-  }
-  .nav-collapse .dropdown-menu {
-    position: static;
-    top: auto;
-    left: auto;
-    display: none;
-    float: none;
-    max-width: none;
-    padding: 0;
-    margin: 0 15px;
-    background-color: transparent;
-    border: none;
-    -webkit-border-radius: 0;
-       -moz-border-radius: 0;
-            border-radius: 0;
-    -webkit-box-shadow: none;
-       -moz-box-shadow: none;
-            box-shadow: none;
-  }
-  .nav-collapse .open > .dropdown-menu {
-    display: block;
-  }
-  .nav-collapse .dropdown-menu:before,
-  .nav-collapse .dropdown-menu:after {
-    display: none;
-  }
-  .nav-collapse .dropdown-menu .divider {
-    display: none;
-  }
-  .nav-collapse .nav > li > .dropdown-menu:before,
-  .nav-collapse .nav > li > .dropdown-menu:after {
-    display: none;
-  }
-  .nav-collapse .navbar-form,
-  .nav-collapse .navbar-search {
-    float: none;
-    padding: 10px 15px;
-    margin: 10px 0;
-    border-top: 1px solid #f2f2f2;
-    border-bottom: 1px solid #f2f2f2;
-    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-       -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-  }
-  .navbar-inverse .nav-collapse .navbar-form,
-  .navbar-inverse .nav-collapse .navbar-search {
-    border-top-color: #111111;
-    border-bottom-color: #111111;
-  }
-  .navbar .nav-collapse .nav.pull-right {
-    float: none;
-    margin-left: 0;
-  }
-  .nav-collapse,
-  .nav-collapse.collapse {
-    height: 0;
-    overflow: hidden;
-  }
-  .navbar .btn-navbar {
-    display: block;
-  }
-  .navbar-static .navbar-inner {
-    padding-right: 10px;
-    padding-left: 10px;
-  }
-}
-
-@media (min-width: 980px) {
-  .nav-collapse.collapse {
-    height: auto !important;
-    overflow: visible !important;
-  }
-}

+ 0 - 1088
docs/theme/docker/static/css/bootstrap-responsive.min.css

@@ -1,1088 +0,0 @@
-/*!
- * Bootstrap Responsive v2.3.0
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-.clearfix {
-  *zoom: 1;
-}
-.clearfix:before,
-.clearfix:after {
-  display: table;
-  line-height: 0;
-  content: "";
-}
-.clearfix:after {
-  clear: both;
-}
-.hide-text {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-.input-block-level {
-  display: block;
-  width: 100%;
-  min-height: 30px;
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-@-ms-viewport {
-  width: device-width;
-}
-.hidden {
-  display: none;
-  visibility: hidden;
-}
-.visible-phone {
-  display: none !important;
-}
-.visible-tablet {
-  display: none !important;
-}
-.hidden-desktop {
-  display: none !important;
-}
-.visible-desktop {
-  display: inherit !important;
-}
-@media (min-width: 768px) and (max-width: 979px) {
-  .hidden-desktop {
-    display: inherit !important;
-  }
-  .visible-desktop {
-    display: none !important ;
-  }
-  .visible-tablet {
-    display: inherit !important;
-  }
-  .hidden-tablet {
-    display: none !important;
-  }
-}
-@media (max-width: 767px) {
-  .hidden-desktop {
-    display: inherit !important;
-  }
-  .visible-desktop {
-    display: none !important;
-  }
-  .visible-phone {
-    display: inherit !important;
-  }
-  .hidden-phone {
-    display: none !important;
-  }
-}
-.visible-print {
-  display: none !important;
-}
-@media print {
-  .visible-print {
-    display: inherit !important;
-  }
-  .hidden-print {
-    display: none !important;
-  }
-}
-@media (min-width: 1200px) {
-  .row {
-    margin-left: -30px;
-    *zoom: 1;
-  }
-  .row:before,
-  .row:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row:after {
-    clear: both;
-  }
-  [class*="span"] {
-    float: left;
-    min-height: 1px;
-    margin-left: 30px;
-  }
-  .container,
-  .navbar-static-top .container,
-  .navbar-fixed-top .container,
-  .navbar-fixed-bottom .container {
-    width: 1170px;
-  }
-  .span12 {
-    width: 1170px;
-  }
-  .span11 {
-    width: 1070px;
-  }
-  .span10 {
-    width: 970px;
-  }
-  .span9 {
-    width: 870px;
-  }
-  .span8 {
-    width: 770px;
-  }
-  .span7 {
-    width: 670px;
-  }
-  .span6 {
-    width: 570px;
-  }
-  .span5 {
-    width: 470px;
-  }
-  .span4 {
-    width: 370px;
-  }
-  .span3 {
-    width: 270px;
-  }
-  .span2 {
-    width: 170px;
-  }
-  .span1 {
-    width: 70px;
-  }
-  .offset12 {
-    margin-left: 1230px;
-  }
-  .offset11 {
-    margin-left: 1130px;
-  }
-  .offset10 {
-    margin-left: 1030px;
-  }
-  .offset9 {
-    margin-left: 930px;
-  }
-  .offset8 {
-    margin-left: 830px;
-  }
-  .offset7 {
-    margin-left: 730px;
-  }
-  .offset6 {
-    margin-left: 630px;
-  }
-  .offset5 {
-    margin-left: 530px;
-  }
-  .offset4 {
-    margin-left: 430px;
-  }
-  .offset3 {
-    margin-left: 330px;
-  }
-  .offset2 {
-    margin-left: 230px;
-  }
-  .offset1 {
-    margin-left: 130px;
-  }
-  .row-fluid {
-    width: 100%;
-    *zoom: 1;
-  }
-  .row-fluid:before,
-  .row-fluid:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row-fluid:after {
-    clear: both;
-  }
-  .row-fluid [class*="span"] {
-    display: block;
-    float: left;
-    width: 100%;
-    min-height: 30px;
-    margin-left: 2.564102564102564%;
-    *margin-left: 2.5109110747408616%;
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-  }
-  .row-fluid [class*="span"]:first-child {
-    margin-left: 0;
-  }
-  .row-fluid .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 2.564102564102564%;
-  }
-  .row-fluid .span12 {
-    width: 100%;
-    *width: 99.94680851063829%;
-  }
-  .row-fluid .span11 {
-    width: 91.45299145299145%;
-    *width: 91.39979996362975%;
-  }
-  .row-fluid .span10 {
-    width: 82.90598290598291%;
-    *width: 82.8527914166212%;
-  }
-  .row-fluid .span9 {
-    width: 74.35897435897436%;
-    *width: 74.30578286961266%;
-  }
-  .row-fluid .span8 {
-    width: 65.81196581196582%;
-    *width: 65.75877432260411%;
-  }
-  .row-fluid .span7 {
-    width: 57.26495726495726%;
-    *width: 57.21176577559556%;
-  }
-  .row-fluid .span6 {
-    width: 48.717948717948715%;
-    *width: 48.664757228587014%;
-  }
-  .row-fluid .span5 {
-    width: 40.17094017094017%;
-    *width: 40.11774868157847%;
-  }
-  .row-fluid .span4 {
-    width: 31.623931623931625%;
-    *width: 31.570740134569924%;
-  }
-  .row-fluid .span3 {
-    width: 23.076923076923077%;
-    *width: 23.023731587561375%;
-  }
-  .row-fluid .span2 {
-    width: 14.52991452991453%;
-    *width: 14.476723040552828%;
-  }
-  .row-fluid .span1 {
-    width: 5.982905982905983%;
-    *width: 5.929714493544281%;
-  }
-  .row-fluid .offset12 {
-    margin-left: 105.12820512820512%;
-    *margin-left: 105.02182214948171%;
-  }
-  .row-fluid .offset12:first-child {
-    margin-left: 102.56410256410257%;
-    *margin-left: 102.45771958537915%;
-  }
-  .row-fluid .offset11 {
-    margin-left: 96.58119658119658%;
-    *margin-left: 96.47481360247316%;
-  }
-  .row-fluid .offset11:first-child {
-    margin-left: 94.01709401709402%;
-    *margin-left: 93.91071103837061%;
-  }
-  .row-fluid .offset10 {
-    margin-left: 88.03418803418803%;
-    *margin-left: 87.92780505546462%;
-  }
-  .row-fluid .offset10:first-child {
-    margin-left: 85.47008547008548%;
-    *margin-left: 85.36370249136206%;
-  }
-  .row-fluid .offset9 {
-    margin-left: 79.48717948717949%;
-    *margin-left: 79.38079650845607%;
-  }
-  .row-fluid .offset9:first-child {
-    margin-left: 76.92307692307693%;
-    *margin-left: 76.81669394435352%;
-  }
-  .row-fluid .offset8 {
-    margin-left: 70.94017094017094%;
-    *margin-left: 70.83378796144753%;
-  }
-  .row-fluid .offset8:first-child {
-    margin-left: 68.37606837606839%;
-    *margin-left: 68.26968539734497%;
-  }
-  .row-fluid .offset7 {
-    margin-left: 62.393162393162385%;
-    *margin-left: 62.28677941443899%;
-  }
-  .row-fluid .offset7:first-child {
-    margin-left: 59.82905982905982%;
-    *margin-left: 59.72267685033642%;
-  }
-  .row-fluid .offset6 {
-    margin-left: 53.84615384615384%;
-    *margin-left: 53.739770867430444%;
-  }
-  .row-fluid .offset6:first-child {
-    margin-left: 51.28205128205128%;
-    *margin-left: 51.175668303327875%;
-  }
-  .row-fluid .offset5 {
-    margin-left: 45.299145299145295%;
-    *margin-left: 45.1927623204219%;
-  }
-  .row-fluid .offset5:first-child {
-    margin-left: 42.73504273504273%;
-    *margin-left: 42.62865975631933%;
-  }
-  .row-fluid .offset4 {
-    margin-left: 36.75213675213675%;
-    *margin-left: 36.645753773413354%;
-  }
-  .row-fluid .offset4:first-child {
-    margin-left: 34.18803418803419%;
-    *margin-left: 34.081651209310785%;
-  }
-  .row-fluid .offset3 {
-    margin-left: 28.205128205128204%;
-    *margin-left: 28.0987452264048%;
-  }
-  .row-fluid .offset3:first-child {
-    margin-left: 25.641025641025642%;
-    *margin-left: 25.53464266230224%;
-  }
-  .row-fluid .offset2 {
-    margin-left: 19.65811965811966%;
-    *margin-left: 19.551736679396257%;
-  }
-  .row-fluid .offset2:first-child {
-    margin-left: 17.094017094017094%;
-    *margin-left: 16.98763411529369%;
-  }
-  .row-fluid .offset1 {
-    margin-left: 11.11111111111111%;
-    *margin-left: 11.004728132387708%;
-  }
-  .row-fluid .offset1:first-child {
-    margin-left: 8.547008547008547%;
-    *margin-left: 8.440625568285142%;
-  }
-  input,
-  textarea,
-  .uneditable-input {
-    margin-left: 0;
-  }
-  .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 30px;
-  }
-  input.span12,
-  textarea.span12,
-  .uneditable-input.span12 {
-    width: 1156px;
-  }
-  input.span11,
-  textarea.span11,
-  .uneditable-input.span11 {
-    width: 1056px;
-  }
-  input.span10,
-  textarea.span10,
-  .uneditable-input.span10 {
-    width: 956px;
-  }
-  input.span9,
-  textarea.span9,
-  .uneditable-input.span9 {
-    width: 856px;
-  }
-  input.span8,
-  textarea.span8,
-  .uneditable-input.span8 {
-    width: 756px;
-  }
-  input.span7,
-  textarea.span7,
-  .uneditable-input.span7 {
-    width: 656px;
-  }
-  input.span6,
-  textarea.span6,
-  .uneditable-input.span6 {
-    width: 556px;
-  }
-  input.span5,
-  textarea.span5,
-  .uneditable-input.span5 {
-    width: 456px;
-  }
-  input.span4,
-  textarea.span4,
-  .uneditable-input.span4 {
-    width: 356px;
-  }
-  input.span3,
-  textarea.span3,
-  .uneditable-input.span3 {
-    width: 256px;
-  }
-  input.span2,
-  textarea.span2,
-  .uneditable-input.span2 {
-    width: 156px;
-  }
-  input.span1,
-  textarea.span1,
-  .uneditable-input.span1 {
-    width: 56px;
-  }
-  .thumbnails {
-    margin-left: -30px;
-  }
-  .thumbnails > li {
-    margin-left: 30px;
-  }
-  .row-fluid .thumbnails {
-    margin-left: 0;
-  }
-}
-@media (min-width: 768px) and (max-width: 979px) {
-  .row {
-    margin-left: -20px;
-    *zoom: 1;
-  }
-  .row:before,
-  .row:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row:after {
-    clear: both;
-  }
-  [class*="span"] {
-    float: left;
-    min-height: 1px;
-    margin-left: 20px;
-  }
-  .container,
-  .navbar-static-top .container,
-  .navbar-fixed-top .container,
-  .navbar-fixed-bottom .container {
-    width: 724px;
-  }
-  .span12 {
-    width: 724px;
-  }
-  .span11 {
-    width: 662px;
-  }
-  .span10 {
-    width: 600px;
-  }
-  .span9 {
-    width: 538px;
-  }
-  .span8 {
-    width: 476px;
-  }
-  .span7 {
-    width: 414px;
-  }
-  .span6 {
-    width: 352px;
-  }
-  .span5 {
-    width: 290px;
-  }
-  .span4 {
-    width: 228px;
-  }
-  .span3 {
-    width: 166px;
-  }
-  .span2 {
-    width: 104px;
-  }
-  .span1 {
-    width: 42px;
-  }
-  .offset12 {
-    margin-left: 764px;
-  }
-  .offset11 {
-    margin-left: 702px;
-  }
-  .offset10 {
-    margin-left: 640px;
-  }
-  .offset9 {
-    margin-left: 578px;
-  }
-  .offset8 {
-    margin-left: 516px;
-  }
-  .offset7 {
-    margin-left: 454px;
-  }
-  .offset6 {
-    margin-left: 392px;
-  }
-  .offset5 {
-    margin-left: 330px;
-  }
-  .offset4 {
-    margin-left: 268px;
-  }
-  .offset3 {
-    margin-left: 206px;
-  }
-  .offset2 {
-    margin-left: 144px;
-  }
-  .offset1 {
-    margin-left: 82px;
-  }
-  .row-fluid {
-    width: 100%;
-    *zoom: 1;
-  }
-  .row-fluid:before,
-  .row-fluid:after {
-    display: table;
-    line-height: 0;
-    content: "";
-  }
-  .row-fluid:after {
-    clear: both;
-  }
-  .row-fluid [class*="span"] {
-    display: block;
-    float: left;
-    width: 100%;
-    min-height: 30px;
-    margin-left: 2.7624309392265194%;
-    *margin-left: 2.709239449864817%;
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-  }
-  .row-fluid [class*="span"]:first-child {
-    margin-left: 0;
-  }
-  .row-fluid .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 2.7624309392265194%;
-  }
-  .row-fluid .span12 {
-    width: 100%;
-    *width: 99.94680851063829%;
-  }
-  .row-fluid .span11 {
-    width: 91.43646408839778%;
-    *width: 91.38327259903608%;
-  }
-  .row-fluid .span10 {
-    width: 82.87292817679558%;
-    *width: 82.81973668743387%;
-  }
-  .row-fluid .span9 {
-    width: 74.30939226519337%;
-    *width: 74.25620077583166%;
-  }
-  .row-fluid .span8 {
-    width: 65.74585635359117%;
-    *width: 65.69266486422946%;
-  }
-  .row-fluid .span7 {
-    width: 57.18232044198895%;
-    *width: 57.12912895262725%;
-  }
-  .row-fluid .span6 {
-    width: 48.61878453038674%;
-    *width: 48.56559304102504%;
-  }
-  .row-fluid .span5 {
-    width: 40.05524861878453%;
-    *width: 40.00205712942283%;
-  }
-  .row-fluid .span4 {
-    width: 31.491712707182323%;
-    *width: 31.43852121782062%;
-  }
-  .row-fluid .span3 {
-    width: 22.92817679558011%;
-    *width: 22.87498530621841%;
-  }
-  .row-fluid .span2 {
-    width: 14.3646408839779%;
-    *width: 14.311449394616199%;
-  }
-  .row-fluid .span1 {
-    width: 5.801104972375691%;
-    *width: 5.747913483013988%;
-  }
-  .row-fluid .offset12 {
-    margin-left: 105.52486187845304%;
-    *margin-left: 105.41847889972962%;
-  }
-  .row-fluid .offset12:first-child {
-    margin-left: 102.76243093922652%;
-    *margin-left: 102.6560479605031%;
-  }
-  .row-fluid .offset11 {
-    margin-left: 96.96132596685082%;
-    *margin-left: 96.8549429881274%;
-  }
-  .row-fluid .offset11:first-child {
-    margin-left: 94.1988950276243%;
-    *margin-left: 94.09251204890089%;
-  }
-  .row-fluid .offset10 {
-    margin-left: 88.39779005524862%;
-    *margin-left: 88.2914070765252%;
-  }
-  .row-fluid .offset10:first-child {
-    margin-left: 85.6353591160221%;
-    *margin-left: 85.52897613729868%;
-  }
-  .row-fluid .offset9 {
-    margin-left: 79.8342541436464%;
-    *margin-left: 79.72787116492299%;
-  }
-  .row-fluid .offset9:first-child {
-    margin-left: 77.07182320441989%;
-    *margin-left: 76.96544022569647%;
-  }
-  .row-fluid .offset8 {
-    margin-left: 71.2707182320442%;
-    *margin-left: 71.16433525332079%;
-  }
-  .row-fluid .offset8:first-child {
-    margin-left: 68.50828729281768%;
-    *margin-left: 68.40190431409427%;
-  }
-  .row-fluid .offset7 {
-    margin-left: 62.70718232044199%;
-    *margin-left: 62.600799341718584%;
-  }
-  .row-fluid .offset7:first-child {
-    margin-left: 59.94475138121547%;
-    *margin-left: 59.838368402492065%;
-  }
-  .row-fluid .offset6 {
-    margin-left: 54.14364640883978%;
-    *margin-left: 54.037263430116376%;
-  }
-  .row-fluid .offset6:first-child {
-    margin-left: 51.38121546961326%;
-    *margin-left: 51.27483249088986%;
-  }
-  .row-fluid .offset5 {
-    margin-left: 45.58011049723757%;
-    *margin-left: 45.47372751851417%;
-  }
-  .row-fluid .offset5:first-child {
-    margin-left: 42.81767955801105%;
-    *margin-left: 42.71129657928765%;
-  }
-  .row-fluid .offset4 {
-    margin-left: 37.01657458563536%;
-    *margin-left: 36.91019160691196%;
-  }
-  .row-fluid .offset4:first-child {
-    margin-left: 34.25414364640884%;
-    *margin-left: 34.14776066768544%;
-  }
-  .row-fluid .offset3 {
-    margin-left: 28.45303867403315%;
-    *margin-left: 28.346655695309746%;
-  }
-  .row-fluid .offset3:first-child {
-    margin-left: 25.69060773480663%;
-    *margin-left: 25.584224756083227%;
-  }
-  .row-fluid .offset2 {
-    margin-left: 19.88950276243094%;
-    *margin-left: 19.783119783707537%;
-  }
-  .row-fluid .offset2:first-child {
-    margin-left: 17.12707182320442%;
-    *margin-left: 17.02068884448102%;
-  }
-  .row-fluid .offset1 {
-    margin-left: 11.32596685082873%;
-    *margin-left: 11.219583872105325%;
-  }
-  .row-fluid .offset1:first-child {
-    margin-left: 8.56353591160221%;
-    *margin-left: 8.457152932878806%;
-  }
-  input,
-  textarea,
-  .uneditable-input {
-    margin-left: 0;
-  }
-  .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 20px;
-  }
-  input.span12,
-  textarea.span12,
-  .uneditable-input.span12 {
-    width: 710px;
-  }
-  input.span11,
-  textarea.span11,
-  .uneditable-input.span11 {
-    width: 648px;
-  }
-  input.span10,
-  textarea.span10,
-  .uneditable-input.span10 {
-    width: 586px;
-  }
-  input.span9,
-  textarea.span9,
-  .uneditable-input.span9 {
-    width: 524px;
-  }
-  input.span8,
-  textarea.span8,
-  .uneditable-input.span8 {
-    width: 462px;
-  }
-  input.span7,
-  textarea.span7,
-  .uneditable-input.span7 {
-    width: 400px;
-  }
-  input.span6,
-  textarea.span6,
-  .uneditable-input.span6 {
-    width: 338px;
-  }
-  input.span5,
-  textarea.span5,
-  .uneditable-input.span5 {
-    width: 276px;
-  }
-  input.span4,
-  textarea.span4,
-  .uneditable-input.span4 {
-    width: 214px;
-  }
-  input.span3,
-  textarea.span3,
-  .uneditable-input.span3 {
-    width: 152px;
-  }
-  input.span2,
-  textarea.span2,
-  .uneditable-input.span2 {
-    width: 90px;
-  }
-  input.span1,
-  textarea.span1,
-  .uneditable-input.span1 {
-    width: 28px;
-  }
-}
-@media (max-width: 767px) {
-  body {
-    padding-right: 20px;
-    padding-left: 20px;
-  }
-  .navbar-fixed-top,
-  .navbar-fixed-bottom,
-  .navbar-static-top {
-    margin-right: -20px;
-    margin-left: -20px;
-  }
-  .container-fluid {
-    padding: 0;
-  }
-  .dl-horizontal dt {
-    float: none;
-    width: auto;
-    clear: none;
-    text-align: left;
-  }
-  .dl-horizontal dd {
-    margin-left: 0;
-  }
-  .container {
-    width: auto;
-  }
-  .row-fluid {
-    width: 100%;
-  }
-  .row,
-  .thumbnails {
-    margin-left: 0;
-  }
-  .thumbnails > li {
-    float: none;
-    margin-left: 0;
-  }
-  [class*="span"],
-  .uneditable-input[class*="span"],
-  .row-fluid [class*="span"] {
-    display: block;
-    float: none;
-    width: 100%;
-    margin-left: 0;
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-  }
-  .span12,
-  .row-fluid .span12 {
-    width: 100%;
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-  }
-  .row-fluid [class*="offset"]:first-child {
-    margin-left: 0;
-  }
-  .input-large,
-  .input-xlarge,
-  .input-xxlarge,
-  input[class*="span"],
-  select[class*="span"],
-  textarea[class*="span"],
-  .uneditable-input {
-    display: block;
-    width: 100%;
-    min-height: 30px;
-    -webkit-box-sizing: border-box;
-    -moz-box-sizing: border-box;
-    box-sizing: border-box;
-  }
-  .input-prepend input,
-  .input-append input,
-  .input-prepend input[class*="span"],
-  .input-append input[class*="span"] {
-    display: inline-block;
-    width: auto;
-  }
-  .controls-row [class*="span"] + [class*="span"] {
-    margin-left: 0;
-  }
-  .modal {
-    position: fixed;
-    top: 20px;
-    right: 20px;
-    left: 20px;
-    width: auto;
-    margin: 0;
-  }
-  .modal.fade {
-    top: -100px;
-  }
-  .modal.fade.in {
-    top: 20px;
-  }
-}
-@media (max-width: 480px) {
-  .nav-collapse {
-    -webkit-transform: translate3d(0, 0, 0);
-  }
-  .page-header h1 small {
-    display: block;
-    line-height: 20px;
-  }
-  input[type="checkbox"],
-  input[type="radio"] {
-    border: 1px solid #ccc;
-  }
-  .form-horizontal .control-label {
-    float: none;
-    width: auto;
-    padding-top: 0;
-    text-align: left;
-  }
-  .form-horizontal .controls {
-    margin-left: 0;
-  }
-  .form-horizontal .control-list {
-    padding-top: 0;
-  }
-  .form-horizontal .form-actions {
-    padding-right: 10px;
-    padding-left: 10px;
-  }
-  .media .pull-left,
-  .media .pull-right {
-    display: block;
-    float: none;
-    margin-bottom: 10px;
-  }
-  .media-object {
-    margin-right: 0;
-    margin-left: 0;
-  }
-  .modal {
-    top: 10px;
-    right: 10px;
-    left: 10px;
-  }
-  .modal-header .close {
-    padding: 10px;
-    margin: -10px;
-  }
-  .carousel-caption {
-    position: static;
-  }
-}
-@media (max-width: 979px) {
-  body {
-    padding-top: 0;
-  }
-  .navbar-fixed-top,
-  .navbar-fixed-bottom {
-    position: static;
-  }
-  .navbar-fixed-top {
-    margin-bottom: 20px;
-  }
-  .navbar-fixed-bottom {
-    margin-top: 20px;
-  }
-  .navbar-fixed-top .navbar-inner,
-  .navbar-fixed-bottom .navbar-inner {
-    padding: 5px;
-  }
-  .navbar .container {
-    width: auto;
-    padding: 0;
-  }
-  .navbar .brand {
-    padding-right: 10px;
-    padding-left: 10px;
-    margin: 0 0 0 -5px;
-  }
-  .nav-collapse {
-    clear: both;
-  }
-  .nav-collapse .nav {
-    float: none;
-    margin: 0 0 10px;
-  }
-  .nav-collapse .nav > li {
-    float: none;
-  }
-  .nav-collapse .nav > li > a {
-    margin-bottom: 2px;
-  }
-  .nav-collapse .nav > .divider-vertical {
-    display: none;
-  }
-  .nav-collapse .nav .nav-header {
-    color: #777777;
-    text-shadow: none;
-  }
-  .nav-collapse .nav > li > a,
-  .nav-collapse .dropdown-menu a {
-    padding: 9px 15px;
-    font-weight: bold;
-    color: #777777;
-    -webkit-border-radius: 3px;
-    -moz-border-radius: 3px;
-    border-radius: 3px;
-  }
-  .nav-collapse .btn {
-    padding: 4px 10px 4px;
-    font-weight: normal;
-    -webkit-border-radius: 4px;
-    -moz-border-radius: 4px;
-    border-radius: 4px;
-  }
-  .nav-collapse .dropdown-menu li + li a {
-    margin-bottom: 2px;
-  }
-  .nav-collapse .nav > li > a:hover,
-  .nav-collapse .nav > li > a:focus,
-  .nav-collapse .dropdown-menu a:hover,
-  .nav-collapse .dropdown-menu a:focus {
-    background-color: #f2f2f2;
-  }
-  .navbar-inverse .nav-collapse .nav > li > a,
-  .navbar-inverse .nav-collapse .dropdown-menu a {
-    color: #999999;
-  }
-  .navbar-inverse .nav-collapse .nav > li > a:hover,
-  .navbar-inverse .nav-collapse .nav > li > a:focus,
-  .navbar-inverse .nav-collapse .dropdown-menu a:hover,
-  .navbar-inverse .nav-collapse .dropdown-menu a:focus {
-    background-color: #111111;
-  }
-  .nav-collapse.in .btn-group {
-    padding: 0;
-    margin-top: 5px;
-  }
-  .nav-collapse .dropdown-menu {
-    position: static;
-    top: auto;
-    left: auto;
-    display: none;
-    float: none;
-    max-width: none;
-    padding: 0;
-    margin: 0 15px;
-    background-color: transparent;
-    border: none;
-    -webkit-border-radius: 0;
-    -moz-border-radius: 0;
-    border-radius: 0;
-    -webkit-box-shadow: none;
-    -moz-box-shadow: none;
-    box-shadow: none;
-  }
-  .nav-collapse .open > .dropdown-menu {
-    display: block;
-  }
-  .nav-collapse .dropdown-menu:before,
-  .nav-collapse .dropdown-menu:after {
-    display: none;
-  }
-  .nav-collapse .dropdown-menu .divider {
-    display: none;
-  }
-  .nav-collapse .nav > li > .dropdown-menu:before,
-  .nav-collapse .nav > li > .dropdown-menu:after {
-    display: none;
-  }
-  .nav-collapse .navbar-form,
-  .nav-collapse .navbar-search {
-    float: none;
-    padding: 10px 15px;
-    margin: 10px 0;
-    border-top: 1px solid #f2f2f2;
-    border-bottom: 1px solid #f2f2f2;
-    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-    -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
-  }
-  .navbar-inverse .nav-collapse .navbar-form,
-  .navbar-inverse .nav-collapse .navbar-search {
-    border-top-color: #111111;
-    border-bottom-color: #111111;
-  }
-  .navbar .nav-collapse .nav.pull-right {
-    float: none;
-    margin-left: 0;
-  }
-  .nav-collapse,
-  .nav-collapse.collapse {
-    height: 0;
-    overflow: hidden;
-  }
-  .navbar .btn-navbar {
-    display: block;
-  }
-  .navbar-static .navbar-inner {
-    padding-right: 10px;
-    padding-left: 10px;
-  }
-}
-@media (min-width: 980px) {
-  .nav-collapse.collapse {
-    height: auto !important;
-    overflow: visible !important;
-  }
-}

+ 330 - 329
docs/theme/docker/static/css/main.css

@@ -1,280 +1,205 @@
-/* ==========================================================================
-   Author's custom styles
-   ========================================================================== */
-.red {
-  background-color: red;
+.debug {
+  border: 2px dotted red !important;
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
 }
-.blue {
-  background-color: blue;
+body {
+  min-width: 940px;
+  font-family: "Cabin", "Helvetica Neue", Helvetica, Arial, sans-serif;
 }
-.orange {
-  background-color: orange;
+p a {
+  text-decoration: underline;
 }
-.gray {
-  background-color: grey;
+p a.btn {
+  text-decoration: none;
 }
-body {
-  padding-top: 58px;
-  font-family: Arial, Helvetica, sans-serif;
-}
-h1,
-h2,
-h3,
-h4 {
-  font-family: Arial, Helvetica, sans-serif;
-  font-weight: 900;
-}
-/* ===================
-	Top navigation
-===================== */
-.navbar {
-  z-index: 999;
-  background-color: white;
+.brand.logo a {
+  text-decoration: none;
+}
+.navbar .navbar-inner {
+  padding-left: 0px;
+  padding-right: 0px;
 }
 .navbar .nav li a {
-  padding: 22px 15px 22px;
+  padding: 24.2857142855px 17px 24.2857142855px;
+  color: #777777;
+  text-decoration: none;
+  text-shadow: 0 1px 0 #f2f2f2;
+}
+.navbar .nav > li {
+  float: left;
+}
+.nav-underline {
+  height: 6px;
+  background-color: #71afc0;
+}
+.nav-login li a {
+  color: white;
+  padding: 10px 15px 10px;
 }
-.navbar-dotcloud .container {
-  border-bottom: 2px #000000 solid;
+.navbar .brand {
+  margin-left: 0px;
+  float: left;
+  display: block;
+}
+.navbar-inner {
+  min-height: 70px;
+  padding-left: 20px;
+  padding-right: 20px;
+  background-color: #ededed;
+  background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+  background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+  border: 1px solid #c7c7c7;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+}
+.brand.logo a {
+  color: white;
 }
 .inline-icon {
   margin-bottom: 6px;
 }
-/*
-* Responsive YouTube, Vimeo, Embed, and HTML5 Videos with CSS
-* http://www.jonsuh.com
-*
-* Copyright (c) 2012 Jonathan Suh
-* Free to use under the MIT license.
-* http://www.opensource.org/licenses/mit-license.php
-*/
-.js-video {
-  height: 0;
-  padding-top: 25px;
-  padding-bottom: 67.5%;
-  margin-bottom: 10px;
-  position: relative;
-  overflow: hidden;
+.row {
+  margin-top: 15px;
+  margin-bottom: 15px;
 }
-.js-video.vimeo {
-  padding-top: 0;
+div[class*='span'] {
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
 }
-.js-video.widescreen {
-  padding-bottom: 57.25%;
+.box {
+  padding: 30px;
+  background-color: white;
+  margin-top: 8px;
 }
-.js-video embed,
-.js-video iframe,
-.js-video object,
-.js-video video {
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  position: absolute;
+.paper {
+  background-color: white;
+  padding-top: 30px;
+  padding-bottom: 30px;
 }
-/* Responsive */
-@media (max-width: 767px) {
-  .js-video {
-    padding-top: 0;
-  }
+.copy-headline {
+  margin-top: 0px;
 }
-/* button style from http://charliepark.org/bootstrap_buttons/ */
-.btn-custom {
-  background-color: #292929 !important;
-  background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#515151", endColorstr="#282828");
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#515151), to(#282828));
-  background-image: -moz-linear-gradient(top, #515151, #282828);
-  background-image: -ms-linear-gradient(top, #515151, #282828);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #515151), color-stop(100%, #282828));
-  background-image: -webkit-linear-gradient(top, #515151, #282828);
-  background-image: -o-linear-gradient(top, #515151, #282828);
-  background-image: linear-gradient(#515151, #282828);
-  border-color: #282828 #282828 #1f1f1f;
-  color: #fff !important;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.26);
-  -webkit-font-smoothing: antialiased;
-}
-/* ===================
-	Page title bar
-===================== */
-h1.pageheader {
-  color: #ffffff;
-  font-size: 20px;
-  font-family: "Arial Black", Tahoma, sans-serif;
-  margin: 8px;
-  margin-left: 22px;
-}
-/* ===================
-	Hero unit
-===================== */
-section.header {
-  margin-top: 0;
-}
-.hero-unit {
-  background-color: #292e33;
-}
-.hero-unit h5 {
-  color: #ffffff;
-}
-/* ===================
-	Main content layout
-===================== */
-.contentblock {
-  margin-top: 20px;
-  border-width: 3px;
-  background-color: #eeeeee;
-  box-sizing: content-box;
-  padding: 20px;
-}
-.section img {
-  margin: 15px 15px 15px 0;
-  border: 2px solid gray;
-}
-.admonition {
-  padding: 10px;
-  border: 1px solid grey;
-  margin-bottom: 10px;
-  margin-top: 10px;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
+.box h1,
+.box h2,
+.box h3,
+.box h4 {
+  margin-top: -5px;
 }
-.admonition .admonition-title {
-  font-weight: bold;
+.nested {
+  padding: 30px;
 }
-.admonition.note {
-  background-color: #f1ebba;
+.box.div {
+  padding: 30px;
 }
-.admonition.warning {
-  background-color: #eed9af;
+span.read-more {
+  margin-left: 15px;
+  white-space: nowrap;
 }
-.admonition.danger {
-  background-color: #e9bcab;
+.forcetopalign {
+  margin-top: 15px !important;
 }
-/* ===================
-	left navigation
-===================== */
-.dotcloudsidebar {
-  float: left;
-  height: 100%;
-  top: 0px;
-  bottom: 0px;
-  position: relative;
-  min-height: 100%;
-  margin-top: 78px;
-  margin-bottom: 22px;
+.forcetopmargin {
+  margin-top: 23px !important;
 }
-.sidebar {
-  font-weight: normal;
-  float: left;
-  /*  min-height: 475px;*/
-
-  background: #ececec;
-  /*  border-left: 1px solid #bbbbbb;*/
-
-  /*  border-right: 1px solid #cccccc;*/
-
-  position: relative;
+.forceleftalign {
+  margin-left: 15px !important;
 }
-.sidebar ul {
-  padding: 0px;
+.forceleftmargin {
+  margin-left: 21px !important;
 }
-.sidebar ul li {
-  font-size: 14px;
-  list-style-type: none;
-  list-style-position: outside;
-  list-style-image: none;
-  margin-left: -25px;
-  padding: 0px;
+.textcenter {
+  text-align: center;
 }
-.sidebar ul li a {
-  display: block;
-  color: #443331;
-  outline: 1px solid #dddddd;
-  padding: 12px 12px 10px 12px;
-  margin-top: 1px;
-  background-color: #d2d2d2;
+.textright {
+  text-align: right;
 }
-.sidebar ul li .toctree-l1 {
-  font-size: larger;
+.textsmaller {
+  font-size: 12px;
 }
-.sidebar ul li .toctree-l1 a {
-  background-color: #dfdfdf;
+.modal-backdrop {
+  opacity: 0.4;
 }
-.sidebar ul li .toctree-l1 .current {
-  font-weight: bold;
+/* generic page copy styles */
+.copy-headline h1 {
+  font-size: 21px;
 }
-.sidebar ul li .toctree-l2 a {
-  padding-left: 18px;
-  background-color: #ffffff;
+/* =======================
+   Sticky footer
+======================= */
+html,
+body {
+  height: 100%;
+  /* The html and body elements cannot have any padding or margin. */
+
 }
-.sidebar ul li .toctree-l2 .current {
-  font-weight: bold;
+/* Wrapper for page content to push down footer */
+#wrap {
+  min-height: 100%;
+  height: auto !important;
+  height: 100%;
+  /* Negative indent footer by it's height */
+
+  margin: 0 auto -280px;
 }
-.sidebar ul li .toctree-l3 {
-  font-size: smaller;
+/* Set the fixed height of the footer here */
+#push-the-footer,
+#footer {
+  height: 280px;
 }
-.sidebar ul li .toctree-l3 a {
-  padding-left: 36px;
-  background-color: #ffffff;
+.main-row {
+  padding-top: 50px;
 }
-.sidebar ul li .toctree-l3 .current {
-  font-weight: bold;
+#footer .footer {
+  margin-top: 160px;
 }
-.brand img {
-  height: 38px;
-  margin-left: -6px;
+#footer .footer .ligaturesymbols {
+  font-size: 30px;
+  color: black;
 }
-.border-box {
-  box-sizing: border-box;
-  padding: 20px;
-  background-color: #111188;
-  color: white;
+#footer .footer .ligaturesymbols a {
+  color: black;
 }
-.titlebar {
-  background-color: #000000;
+#footer .footer .footerlist h3,
+#footer .footer .footerlist h4 {
+  /* correct the top alignment */
+
   margin-top: 0px;
-  margin-bottom: 20px;
-  min-height: 40px;
-  color: white;
-  padding-top: 8px;
-  padding-bottom: 8px;
 }
-.footer {
-  border-top: 2px solid black;
-  margin-top: 15px;
-  margin-bottom: 20px;
-  min-height: 40px;
-  padding-left: 8px;
-  padding-top: 8px;
-  padding-bottom: 8px;
+.footer-landscape-image {
+  position: absolute:
+  bottom: 0;
+  margin-bottom: 0;
+  background-image: url('https://www.docker.io/static/img/website-footer_clean.svg');
+  background-repeat: repeat-x;
+  height: 280px;
 }
-/* This is the default */
-.span6.with-padding {
-  background-color: #111188;
-  height: 200px;
-  color: white;
-  padding: 10px;
+.main-row {
+  margin-top: 40px;
 }
-#global {
-  min-height: 500px;
-}
-/* =======================
-   Row size
-======================= */
-.row1 {
-  background-color: #999999;
-  height: 100%;
-  position: relative;
+.main-content {
+  padding: 16px 18px inherit;
 }
 /* =======================
    Social footer
 ======================= */
+.social {
+  margin-left: 0px;
+  margin-top: 15px;
+}
 .social .twitter,
 .social .github,
 .social .googleplus {
-  background: url("../img/footer-links.png") no-repeat transparent;
+  background: url("https://www.docker.io/static/img/footer-links.png") no-repeat transparent;
   display: inline-block;
   height: 35px;
   overflow: hidden;
@@ -288,93 +213,160 @@ section.header {
 .social .github {
   background-position: -59px 2px;
 }
-#fork-us {
-  /*font-family: 'Maven Pro';*/
-
-  /*font-weight: bold;*/
-
+form table th {
+  vertical-align: top;
+  text-align: right;
+  white-space: nowrap;
+}
+form .labeldd label {
+  font-weight: bold;
+}
+form .helptext {
   font-size: 12px;
-  /*text-transform: uppercase;*/
-
-  display: block;
-  padding: 0px 1em;
-  height: 28px;
-  line-height: 28px;
-  background-color: #43484c;
-  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFF6E56', endColorstr='#FFED4F35');
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #747474), color-stop(100%, #43484c));
-  background-image: -webkit-linear-gradient(top, #747474 0%, #43484c 100%);
-  background-image: -moz-linear-gradient(top, #747474 0%, #43484c 100%);
-  background-image: -o-linear-gradient(top, #747474 0%, #43484c 100%);
-  background-image: linear-gradient(top, #747474 0%, #43484c 100%);
-  border: 1px solid #43484c;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  -ms-border-radius: 4px;
-  -o-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
-  -moz-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
-  box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
-  margin: 8px;
+  margin-top: -4px;
+  margin-bottom: 10px;
+}
+form .fielddd input {
+  width: 250px;
 }
-#fork-us a {
-  color: #faf2ee;
-  text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 0px;
+form .error {
+  color: #a30000;
 }
+div.alert.alert-block {
+  margin-bottom: 15px;
+}
+/* ======================= =======================
+  Documentation
+========================= ========================= */
 /* =======================
-   Media size overrides
-======================= */
-/* Large desktop */
-@media (min-width: 1200px) {
-  .span6.with-padding {
-    background-color: #dc143c;
-    width: 540px;
-    padding: 15px;
-  }
-}
-/* Normal desktop */
-@media (min-width: 980px) and (max-width: 1199px) {
-  .span6.with-padding {
-    background-color: #ee1111;
-    width: 440px;
-    padding: 10px;
-  }
-}
-/* Portrait tablet to landscape and desktop */
-@media (min-width: 768px) and (max-width: 979px) {
-  body {
-    padding-top: 0px;
-  }
-  .span6.with-padding {
-    background-color: #292e33;
-    width: 332px;
-    padding: 10px;
-  }
-}
-/* Landscape phone to portrait tablet */
-@media (max-width: 767px) {
-  body {
-    padding-top: 0px;
-  }
-  #global {
-    /* TODO: Fix this to be relative to the navigation size */
-  
-  }
-  #fork-us {
-    display: none;
-  }
-}
-/* Landscape phones and down */
-@media (max-width: 480px) {
-  #nav-gettingstarted {
-    display: none;
-  }
-}
-/* Misc fixes */
-table th {
-  text-align: left;
+  Styles for the sidebar
+========================= */
+.page-title {
+  background-color: white;
+  border: 1px solid transparent;
+  text-align: center;
+  width: 100%;
+}
+.page-title h4 {
+  font-size: 20px;
+}
+.bs-docs-sidebar {
+  padding-left: 5px;
+  max-width: 100%;
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  margin-top: 18px;
+}
+.bs-docs-sidebar ul {
+  list-style: none;
+  margin-left: 0px;
+}
+.bs-docs-sidebar .toctree-l2 > ul {
+  width: 100%;
+}
+.bs-docs-sidebar ul > li.toctree-l1.has-children {
+  background-image: url('../img/menu_arrow_right.gif');
+  background-repeat: no-repeat;
+  background-position: 13px 13px;
+  list-style-type: none;
+  padding: 0px 0px 0px 0px;
+  vertical-align: middle;
+}
+.bs-docs-sidebar ul > li.toctree-l1.has-children.open {
+  background-image: url('../img/menu_arrow_down.gif');
+}
+.bs-docs-sidebar ul > li > a {
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  width: 100%;
+  display: inline-block;
+  padding-top: 8px;
+  padding-bottom: 8px;
+  padding-left: 35px;
+  padding-right: 20px;
+  font-size: 14px;
+  border-bottom: 1.5px solid #595959;
+  line-height: 20px;
+}
+.bs-docs-sidebar ul > li:first-child.active > a {
+  border-top: 1.5px solid #595959;
+}
+.bs-docs-sidebar ul > li:last-child > a {
+  border-bottom: none;
+}
+.bs-docs-sidebar ul > li:last-child.active > a {
+  border-bottom: 1.5px solid #595959;
 }
+.bs-docs-sidebar ul > li.active > a {
+  border-right: 1.5px solid #595959;
+  border-left: 1.5px solid #595959;
+  color: #394d54;
+}
+.bs-docs-sidebar ul > li:hover {
+  background-color: #e8e8e8;
+}
+.bs-docs-sidebar.toctree-l3 ul {
+  display: inherit;
+  margin-left: 15px;
+  font-size: smaller;
+}
+.bs-docs-sidebar .toctree-l3 a {
+  border: none;
+  font-size: 12px;
+  line-height: 15px;
+}
+.bs-docs-sidebar ul > li > ul {
+  display: none;
+}
+.bs-docs-sidebar ul > li.current > ul {
+  display: inline-block;
+  padding-left: 0px;
+  width: 100%;
+}
+.toctree-l2.current > a {
+  font-weight: bold;
+}
+.toctree-l2.current {
+  border: 1.5px solid #595959;
+  color: #394d54;
+}
+/* =====================================
+  Styles for the floating version widget
+====================================== */
+.version-flyer {
+  position: fixed;
+  float: right;
+  right: 0;
+  bottom: 40px;
+  background-color: #E0E0E0;
+  border: 1px solid #88BABC;
+  padding: 5px;
+  font-size: larger;
+}
+.version-flyer .content {
+  padding-right: 45px;
+  margin-top: 7px;
+  margin-left: 7px;
+  background-image: url('../img/container3.png');
+  background-position: right center;
+  background-repeat: no-repeat;
+}
+.version-flyer .alternative {
+  visibility: hidden;
+  display: none;
+}
+.version-flyer .active-slug {
+  visibility: visible;
+  display: inline-block;
+}
+.version-flyer:hover .alternative {
+  animation-duration: 1s;
+  display: inline-block;
+  visibility: visible;
+}
+/* =====================================
+  Styles for 
+====================================== */
 h1:hover > a.headerlink,
 h2:hover > a.headerlink,
 h3:hover > a.headerlink,
@@ -391,21 +383,30 @@ dt:hover > a.headerlink {
   float: right;
   visibility: hidden;
 }
-
-/* Swiftype style */
-
-#st-search-input {
-  margin-right: 14px;
-  margin-left: 9px;
-  height: 19px;
-  width: 120px;
-
+/* =====================================
+  Miscellaneous information
+====================================== */
+.admonition.warning,
+.admonition.note,
+.admonition.seealso,
+.admonition.todo {
+  border: 3px solid black;
+  padding: 10px;
+  margin: 5px auto 10px;
+}
+.admonition .admonition-title {
+  font-size: larger;
+}
+.admonition.warning,
+.admonition.danger {
+  border-color: #ac0004;
+}
+.admonition.note {
+  border-color: #cbc200;
+}
+.admonition.todo {
+  border-color: orange;
+}
+.admonition.seealso {
+  border-color: #23cb1f;
 }
-#swiftype-img {
-    border: none;
-    width: 145px;
-    height: auto;
-    margin: 0px auto;
-    margin-left: 13px;
-    margin-top: -30px;
-}

+ 452 - 345
docs/theme/docker/static/css/main.less

@@ -1,376 +1,337 @@
+// Main CSS configuration file
+// by Thatcher Peskens, thatcher@dotcloud.com
+//
+// Please note variables.less is customized to include custom font, background-color, and link colors.
 
 
-/* ==========================================================================
-   Author's custom styles
-   ========================================================================== */
-
 @import "variables.less";
 
-@red: crimson;
-@lightblue: #118;
-@lightred: #e11;
-@darkblue: #292E33;
+// Variables for main.less
+// -----------------------
 
-@borderGray: #888;
+@box-top-margin: 			8px;
+@box-padding-size:			30px;
+@docker-background-color:   #71AFC0;
+@very-dark-sea-green:       #394D54;
 
+// Custom colors for Docker
+// --------------------------
+@gray-super-light:		#F2F2F2;
+@deep-red: 				#A30000;
+@deep-blue:				#1B2033;
+@deep-green: 			#007035;
+@link-blue:				#213B8F;
 
-.red {
-  background-color: red;
-}
-.blue {
-  background-color: blue;
-}
-.orange {
-  background-color: orange;
-}
-.gray {
-  background-color: grey;
+
+.debug {
+  border: 2px dotted red !important;
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
 }
 
 
-body {
-  padding-top: 58px;
-  font-family: Arial, Helvetica, sans-serif;
-}
+// Other custom colors for Docker
+// --------------------------
+
+// ** are defined in sources/less/variables  **
+//@import "bootstrap/variables.less";
+
+
+// Styles generic for each and every page
+// ----------------------------------- // -----------------------------------
 
 
-h1, h2, h3, h4 {
-  font-family: Arial, Helvetica, sans-serif;
-// font-weight: bold;
-  font-weight: 900;
+// moving body down to make place for fixed navigation
+body {
+  min-width: 940px;
+  font-family: @font-family-base;
+
 }
 
-/* ===================
-	Top navigation
-===================== */
 
-.navbar {
-  z-index: 999;
-  .nav {
-  // float: right;
+p a {
+	text-decoration: underline;
 
-    li a{
-      padding: 22px 15px 22px;
+    &.btn {
+      text-decoration: none;
     }
-  }
-  background-color: white;
-}
 
-.navbar-dotcloud .container {
-  border-bottom: 2px @black solid;
 }
 
-.inline-icon {
-  margin-bottom: 6px;
+.brand.logo a {
+  text-decoration: none;
 }
 
-/*
-* Responsive YouTube, Vimeo, Embed, and HTML5 Videos with CSS
-* http://www.jonsuh.com
-*
-* Copyright (c) 2012 Jonathan Suh
-* Free to use under the MIT license.
-* http://www.opensource.org/licenses/mit-license.php
-*/
-
-.js-video {
-  height: 0;
-  padding-top: 25px;
-  padding-bottom: 67.5%;
-  margin-bottom: 10px;
-  position: relative;
-  overflow: hidden;
+// Styles for top navigation
+// ----------------------------------
+.navbar .navbar-inner {
+	padding-left: 0px;
+	padding-right: 0px;
 }
-.js-video.vimeo {
-  padding-top: 0;
+
+.navbar .nav {
+  li a {
+  	padding: ((@navbar-height - @line-height-base) / 2) 17px ((@navbar-height - @line-height-base) / 2);
+    color: #777777;
+    text-decoration: none;
+    text-shadow: 0 1px 0 #f2f2f2;
+  }
 }
-.js-video.widescreen {
-  padding-bottom: 57.25%;
+
+
+.navbar .nav > li {
+  float: left;
 }
-.js-video embed, .js-video iframe, .js-video object, .js-video video {
-  top: 0;
-  left: 0;
-  width: 100%;
-  height: 100%;
-  position: absolute;
+
+.nav-underline {
+  height: 6px;
+  background-color: @docker-background-color;
 }
 
-/* Responsive */
-@media (max-width: 767px) {
-  .js-video {
-    padding-top: 0;
+.nav-login {
+  li {
+   	a {
+		color: white;
+		padding: 10px 15px 10px;
+	}
   }
 }
 
-/* button style from http://charliepark.org/bootstrap_buttons/ */
-.btn-custom {
-  background-color: hsl(0, 0%, 16%) !important;
+
+
+.navbar .brand {
+	margin-left: 0px;
+	float: left;
+	display: block;
+}
+
+.navbar-inner {
+  min-height: 70px;
+  padding-left: 20px;
+  padding-right: 20px;
+  background-color: #ededed;
+  background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
+  background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
+  background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
   background-repeat: repeat-x;
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#515151", endColorstr="#282828");
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#515151), to(#282828));
-  background-image: -moz-linear-gradient(top, #515151, #282828);
-  background-image: -ms-linear-gradient(top, #515151, #282828);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #515151), color-stop(100%, #282828));
-  background-image: -webkit-linear-gradient(top, #515151, #282828);
-  background-image: -o-linear-gradient(top, #515151, #282828);
-  background-image: linear-gradient(#515151, #282828);
-  border-color: #282828 #282828 hsl(0, 0%, 12%);
-  color: #fff !important;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.26);
-  -webkit-font-smoothing: antialiased;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+  border: 1px solid #c7c7c7;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
 }
 
+.brand.logo a {
+	color: white;
 
+}
 
-/* ===================
-	Page title bar
-===================== */
+.logo {
+//	background-color: #A30000;
+//	color: white;
+}
 
-h1.pageheader {
-  color: @white;
-  font-size: 20px;
-  font-family: "Arial Black", Tahoma, sans-serif;
-  margin: 8px;
-  margin-left: 22px;
+.inline-icon {
+  margin-bottom: 6px;
 }
 
-/* ===================
-	Hero unit
-===================== */
+// Bootstrap elements
+// ----------------------------------
 
-section.header {
-  margin-top:0;
+.row {
+  margin-top: 15px;
+  margin-bottom: 15px;
 }
 
-.hero-unit {
-  background-color: @darkblue;
+.container {
+	// background-color: green;
+}
 
-  h5 {
-    color: @white;
-  }
-  .subtitle {
+// Styles on blocks of content
+// ----------------------------------
 
-  }
+// everything which is a block should have box-sizing: border-box;
 
+div[class*='span']
+{
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
 }
 
-/* ===================
-	Main content layout
-===================== */
 
-.contentblock {
-  margin-top: 20px;
-  border-width: 3px;
-// border-color: #E00;
-//	border-style:solid;
-//	border-color: @borderGray;
-// box-sizing: border-box;
-  background-color: @grayLighter;
-  box-sizing: content-box;
-  padding: 20px;
+// Box for making white with a border, and some nice spacings
+.box {
+    padding: @box-padding-size;
+	background-color: white;
+	margin-top: @box-top-margin;
 }
 
-.section img {
-  margin: 15px 15px 15px 0;
-  border: 2px solid gray;
+.paper {
+  	background-color: white;
+    padding-top: 30px;
+    padding-bottom: 30px;
 }
 
-.admonition {
-  padding: 10px;
-  border: 1px solid grey;
-
-  margin-bottom: 10px;
-  margin-top: 10px;
+.copy-headline {
+  margin-top: 0px;
+//  border-bottom: 1.2px solid @veryDarkSeaGreen;
+}
 
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
+.box {
+	h1, h2, h3, h4 {
+		margin-top: -5px;
+	}
 }
 
-.admonition .admonition-title {
-  font-weight: bold;
+.nested {
+	padding: @box-padding-size;
 }
 
-.admonition.note {
-  background-color: rgb(241, 235, 186);
+.box.div {
+  padding: @box-padding-size;
 }
 
-.admonition.warning {
-  background-color: rgb(238, 217, 175);
+span.read-more {
+  margin-left: 15px;
+  white-space: nowrap;
 }
 
-.admonition.danger {
-  background-color: rgb(233, 188, 171);
+
+// set a top margin of @box-top-margin + 8 px to make it show a margin
+//instead of the div being flush against the side. Typically only
+// required for a stacked div in a column, w.o. using row.
+.forcetopalign {
+	margin-top: 15px !important;
+}
+.forcetopmargin {
+	margin-top: 23px !important;
+}
+.forceleftalign {
+	margin-left: 15px !important;
+}
+.forceleftmargin {
+	margin-left: 21px !important;
 }
 
-/* ===================
-	left navigation
-===================== */
 
-.dotcloudsidebar {
-// background-color: #ee3;
-// border: 1px red dotted;
-  float: left;
-  height: 100%;
-  top: 0px;
-  bottom: 0px;
-  position: relative;
-// margin: 0px;
-  min-height: 100%;
-  margin-top: 78px;
-  margin-bottom: 22px;
+// simple text aligns
+.textcenter {
+	text-align: center;
+}
 
+.textright {
+	text-align: right;
 }
 
-  .sidebar {
-  //  font-family: "Maven Pro";
-    font-weight: normal;
-  //  margin-top: 38px;
-    float: left;
-  //  width: 220px;
-  /*  min-height: 475px;*/
-  //  margin-bottom: 28px;
-  //  padding-bottom: 120px;
-    background: #ececec;
-  /*  border-left: 1px solid #bbbbbb;*/
-  /*  border-right: 1px solid #cccccc;*/
-    position: relative;
+.textsmaller {
+  font-size: @font-size-small;
+}
 
+.modal-backdrop {
+  opacity: 0.4;
+}
 
 
-  ul {
-    padding: 0px;
-    li {
-      font-size: 14px;
-    //      list-style: none;
-      list-style-type: none;
-      list-style-position: outside;
-      list-style-image: none;
-      margin-left: -25px;
-      padding: 0px;
-
-      a {
-        display: block;
-        color: #443331;
-        outline: 1px solid #dddddd;
-        padding: 12px 12px 10px 12px;
-        margin-top: 1px;
-        background-color: #d2d2d2;
-      }
-
-      .toctree-l1, .toctree-l2 {
-
-      }
-
-      .toctree-l1 {
-        font-size: larger;
-        a {
-          background-color: rgb(223, 223, 223);
-        }
-        .current {
-          font-weight: bold;
-        }
-      //          margin-left: -25px;
-      }
-      .toctree-l2 {
-        a {
-          padding-left: 18px;
-          background-color: rgb(255, 255, 255);
-        }
-        .current {
-          font-weight: bold;
-        }
+/* generic page copy styles */
 
-      }
-      .toctree-l3 {
-        font-size: smaller;
-        a {
-          padding-left: 36px;
-          background-color: rgb(255, 255, 255);
-        }
-        .current {
-          font-weight: bold;
-        }
+.copy-headline h1 {
+  font-size: 21px;
+}
 
-      }
 
+/* =======================
+   Sticky footer
+======================= */
 
-    }
-  }
+@sticky-footer-height: 280px;
+
+html,
+body {
+  height: 100%;
+  /* The html and body elements cannot have any padding or margin. */
 }
 
-.brand img {
-  height: 38px;
-  margin-left: -6px;
+/* Wrapper for page content to push down footer */
+#wrap {
+  min-height: 100%;
+  height: auto !important;
+  height: 100%;
+  /* Negative indent footer by it's height */
+  margin: 0 auto -@sticky-footer-height;
 }
 
-.border-box {
-  box-sizing: border-box;
-  padding: 20px;
-  background-color: @lightblue;
-  color: white;
+/* Set the fixed height of the footer here */
+#push-the-footer,
+#footer {
+  height: @sticky-footer-height;
 }
 
+#footer {
+//    margin-bottom: -60px;
+//  margin-top: 160px;
+}
 
-.titlebar {
-  background-color: @black;
-  margin-top: 0px;
-  margin-bottom: 20px;
-  min-height: 40px;
-  color: white;
-//	box-sizing: border-box;
-  padding-top: 8px;
-  padding-bottom: 8px;
+.main-row {
+  padding-top: @navbar-height; 
 }
 
 
-.footer {
-  border-top: 2px solid black;
+// Styles on the footer
+// ----------------------------------
 
-//  background-color: #d2d2d2;
-  margin-top: 15px;
-  margin-bottom: 20px;
+//
+#footer .footer {
+	margin-top: 160px;
+	.ligaturesymbols {
+		font-size: 30px;
+		color: black;
+		a {
+			color: black;
+		}
+	}
 
-  min-height: 40px;
+  .footerlist {
+    h3, h4 {
+      /* correct the top alignment */
+      margin-top: 0px;
+    }
+  }
 
-  padding-left: 8px;
-  padding-top: 8px;
-  padding-bottom: 8px;
 }
 
-
-
-/* This is the default */
-.span6.with-padding {
-  background-color: @lightblue;
-  height: 200px;
-  color: white;
-  padding: 10px;
+.footer-landscape-image {
+  position: absolute:
+  bottom: 0;
+  margin-bottom: 0;
+  background-image: url('https://www.docker.io/static/img/website-footer_clean.svg');
+  background-repeat: repeat-x;
+  height: @sticky-footer-height;
 }
 
-#global {
-  min-height: 500px;
+.main-row {
+  margin-top: 40px;
 }
 
-
-
-/* =======================
-   Row size
-======================= */
-
-.row1 {
-  background-color: @grayLight;
-  height: 100%;
-  position: relative;
+.main-content {
+  padding: 16px 18px inherit;
 }
 
-
 /* =======================
    Social footer
 ======================= */
 
+.social {
+  margin-left: 0px;
+  margin-top: 15px;
+}
+
 .social .twitter, .social .github, .social .googleplus {
-  background: url("../img/footer-links.png") no-repeat transparent;
+  background: url("https://www.docker.io/static/img/footer-links.png") no-repeat transparent;
   display: inline-block;
   height: 35px;
   overflow: hidden;
@@ -387,107 +348,219 @@ section.header {
   background-position: -59px 2px;
 }
 
+// Styles on the forms
+// ----------------------------------
 
-#fork-us {
-  /*font-family: 'Maven Pro';*/
-  /*font-weight: bold;*/
-  font-size: 12px;
-  /*text-transform: uppercase;*/
-  display: block;
-  padding: 0px 1em;
-  height: 28px;
-  line-height: 28px;
-  background-color: #43484c;
-  filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFF6E56', endColorstr='#FFED4F35');
-  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #747474), color-stop(100%, #43484c));
-  background-image: -webkit-linear-gradient(top, #747474 0%, #43484c 100%);
-  background-image: -moz-linear-gradient(top, #747474 0%, #43484c 100%);
-  background-image: -o-linear-gradient(top, #747474 0%, #43484c 100%);
-  background-image: linear-gradient(top, #747474 0%, #43484c 100%);
-  border: 1px solid #43484c;
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  -ms-border-radius: 4px;
-  -o-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
-  -moz-box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
-  box-shadow: inset rgba(255, 255, 255, 0.17) 0 1px 1px;
-  margin: 8px;
-
-  a {
-    color: #faf2ee;
-    text-shadow: rgba(0, 0, 0, 0.3) 0px 1px 0px;
+form table {
+  th {
+    vertical-align: top;
+    text-align: right;
+    white-space: nowrap;
   }
 }
-/* =======================
-   Media size overrides
-======================= */
 
-/* Large desktop */
-@media (min-width: 1200px) {
-  .span6.with-padding {
-    background-color: @red;
+form {
+  .labeldd label {
+    font-weight: bold;
+  }
 
-    width: (@gridColumnWidth1200 * 6) + (@gridGutterWidth1200 * 5) - @gridGutterWidth1200;
-    padding: @gridGutterWidth1200/2;
+  .helptext {
+    font-size: @font-size-small;
+    margin-top: -4px;
+    margin-bottom: 10px;
   }
-}
 
-/* Normal desktop */
-@media (min-width: 980px) and (max-width: 1199px) {
-  .span6.with-padding {
-    background-color: @lightred;
+  .fielddd input {
+    width: 250px;
+  }
 
-    width: (@gridColumnWidth * 6) + (@gridGutterWidth * 5) - @gridGutterWidth;
-    padding: @gridGutterWidth/2;
+  .error {
+    color: @deep-red;
   }
 
+  [type=submit] {
+//    margin-top: -8px;
+  }
 }
 
-/* Portrait tablet to landscape and desktop */
-@media (min-width: 768px) and (max-width: 979px) {
-  body {
-    padding-top: 0px;
-  }
+div.alert.alert-block {
+  margin-bottom: 15px;
+}
+
+/* ======================= =======================
+  Documentation
+========================= ========================= */
+
+
+/* =======================
+  Styles for the sidebar
+========================= */
 
 
-  .span6.with-padding {
-    background-color: @darkblue;
+@sidebar-navigation-border: 1.5px solid #595959;
+@sidebar-navigation-width: 225px;
 
-    width: (@gridColumnWidth768 * 6) + (@gridGutterWidth768 * 5) - @gridGutterWidth768;
-    padding: @gridGutterWidth768/2;
 
+.page-title {
+  // border-bottom: 1px solid #bbbbbb;
+  background-color: white;
+  border: 1px solid transparent;
+  text-align: center;
+  width: 100%;
+  h4 {
+    font-size: 20px;
   }
 }
 
-/* Landscape phone to portrait tablet */
-@media (max-width: 767px) {
-  body {
-    padding-top: 0px;
+.bs-docs-sidebar {
+  padding-left: 5px;
+  max-width: 100%;
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  margin-top: 18px;
+
+  ul {
+      list-style: none;
+      margin-left: 0px;
   }
-  #global {
-  /* TODO: Fix this to be relative to the navigation size */
-//    padding-top: 600px;
+
+  .toctree-l2 > ul {
+    width: 100%;
   }
-  #fork-us {
+
+  ul > li {
+    &.toctree-l1.has-children {
+        background-image: url('../img/menu_arrow_right.gif');
+        background-repeat: no-repeat;
+        background-position: 13px 13px;
+        list-style-type: none;
+        // margin-left: px;
+        padding: 0px 0px 0px 0px;
+        vertical-align: middle;
+
+        &.open {
+          background-image: url('../img/menu_arrow_down.gif');
+        }
+    }
+
+    & > a {
+      box-sizing: border-box;
+      -moz-box-sizing: border-box;
+      width: 100%;
+      display:inline-block;
+      padding-top: 8px;
+      padding-bottom: 8px;
+      padding-left: 35px;
+      padding-right: 20px;
+      font-size: @font-size-base;
+      border-bottom: @sidebar-navigation-border;
+      line-height: 20px;
+    }
+
+    &:first-child.active > a {
+      border-top: @sidebar-navigation-border;
+    }
+
+    &:last-child > a {
+      border-bottom: none;
+    }
+
+    &:last-child.active > a {
+      border-bottom: @sidebar-navigation-border;
+    }
+
+    &.active > a {
+      border-right: @sidebar-navigation-border;
+      border-left: @sidebar-navigation-border;
+      color: @very-dark-sea-green;
+    }
+
+    &:hover {
+      background-color: #e8e8e8;
+    }
+  }
+
+  &.toctree-l3 ul {
+    display: inherit; 
+    
+    margin-left: 15px; 
+    font-size: smaller;
+  }
+
+  .toctree-l3 a {
+    border: none;
+    font-size: 12px;
+    line-height: 15px;
+  }
+
+  ul > li > ul {
     display: none;
   }
+
+  ul > li.current > ul {
+    display: inline-block;
+    padding-left: 0px;
+    width: 100%;
+  }
+}
+
+.toctree-l2 {
+  &.current > a {
+    font-weight: bold;
+  }
+  &.current {
+    border: 1.5px solid #595959;
+    color: #394d54;
+  }
 }
 
 
-/* Landscape phones and down */
-@media (max-width: 480px) {
-  #nav-gettingstarted {
+/* =====================================
+  Styles for the floating version widget
+====================================== */
+
+.version-flyer {
+  position: fixed;
+  float: right;
+  right: 0;
+  bottom: 40px;
+  background-color: #E0E0E0;
+  border: 1px solid #88BABC;
+  padding: 5px;
+  font-size: larger;
+
+  .content {
+    padding-right: 45px;
+    margin-top: 7px;
+    margin-left: 7px;
+    // display: inline-block;
+    background-image: url('../img/container3.png');
+    background-position: right center; 
+    background-repeat: no-repeat;
+  }
+
+  .alternative {
+    visibility: hidden;
     display: none;
   }
-}
 
-/* Misc fixes */
-table th {
-  text-align: left;
+  .active-slug {
+    visibility: visible;
+    display: inline-block;
+  }
+
+  &:hover .alternative {
+    animation-duration: 1s;
+    display: inline-block;
+    visibility: visible;
+  }
+
 }
 
+/* =====================================
+  Styles for 
+====================================== */
+
 h1:hover > a.headerlink,
 h2:hover > a.headerlink,
 h3:hover > a.headerlink,
@@ -504,4 +577,38 @@ dt:hover > a.headerlink {
   font-weight: bold;
   float: right;
   visibility: hidden;
-}
+}
+
+/* =====================================
+  Miscellaneous information
+====================================== */
+
+.admonition {
+  &.warning, &.note, &.seealso, &.todo {
+    border: 3px solid black;
+    padding: 10px;
+    margin: 5px auto 10px;
+  }
+
+  .admonition-title {
+      font-size: larger;
+  }
+
+  &.warning, &.danger {
+    border-color: #ac0004;
+  }
+
+  &.note {
+    border-color: #cbc200;
+  }
+
+  &.todo {
+    border-color: orange;
+  }
+
+  &.seealso {
+    border-color: #23cb1f;
+  }
+
+}
+

+ 499 - 178
docs/theme/docker/static/css/variables.less

@@ -9,128 +9,175 @@
 
 // Grays
 // -------------------------
-@black:                 #000;
-@grayDarker:            #222;
-@grayDark:              #333;
-@gray:                  #555;
-@grayLight:             #999;
-@grayLighter:           #eee;
-@white:                 #fff;
 
+@gray-darker:            lighten(#000, 13.5%); // #222
+@gray-dark:              lighten(#000, 20%);   // #333
+@gray:                   lighten(#000, 33.5%); // #555
+@gray-light:             lighten(#000, 60%);   // #999
+@gray-lighter:           lighten(#000, 93.5%); // #eee
 
-// Accent colors
+// Brand colors
 // -------------------------
-@blue:                  #049cdb;
-@blueDark:              #0064cd;
-@green:                 #46a546;
-@red:                   #9d261d;
-@yellow:                #ffc40d;
-@orange:                #f89406;
-@pink:                  #c3325f;
-@purple:                #7a43b6;
 
+@brand-primary:         #428bca;
+@brand-success:         #5cb85c;
+@brand-warning:         #f0ad4e;
+@brand-danger:          #d9534f;
+@brand-info:            #5bc0de;
 
 // Scaffolding
 // -------------------------
-@bodyBackground:        @white;
-@textColor:             @grayDark;
 
+@body-bg:               #fff;
+@text-color:            @gray-dark;
 
 // Links
 // -------------------------
-@linkColor:             #08c;
-@linkColorHover:        darken(@linkColor, 15%);
 
+@link-color:            @brand-primary;
+@link-hover-color:      darken(@link-color, 15%);
 
 // Typography
 // -------------------------
-@sansFontFamily:        "Helvetica Neue", Helvetica, Arial, sans-serif;
-@serifFontFamily:       Georgia, "Times New Roman", Times, serif;
-@monoFontFamily:        Monaco, Menlo, Consolas, "Courier New", monospace;
 
-@baseFontSize:          14px;
-@baseFontFamily:        @sansFontFamily;
-@baseLineHeight:        20px;
-@altFontFamily:         @serifFontFamily;
+@font-family-sans-serif:  "Cabin", "Helvetica Neue", Helvetica, Arial, sans-serif;
+@font-family-serif:       Georgia, "Times New Roman", Times, serif;
+@font-family-monospace:   Monaco, Menlo, Consolas, "Courier New", monospace;
+@font-family-base:        @font-family-sans-serif;
 
-@headingsFontFamily:    inherit; // empty to use BS default, @baseFontFamily
-@headingsFontWeight:    bold;    // instead of browser default, bold
-@headingsColor:         inherit; // empty to use BS default, @textColor
+@font-size-base:          14px;
+@font-size-large:         ceil(@font-size-base * 1.25); // ~18px
+@font-size-small:         ceil(@font-size-base * 0.85); // ~12px
 
+@line-height-base:        1.428571429; // 20/14
+@line-height-computed:    floor(@font-size-base * @line-height-base); // ~20px
 
-// Component sizing
+@headings-font-family:    @font-family-base;
+@headings-font-weight:    500;
+@headings-line-height:    1.1;
+
+// Iconography
+// -------------------------
+
+@icon-font-path:          "../fonts/";
+@icon-font-name:          "glyphicons-halflings-regular";
+
+
+// Components
 // -------------------------
-// Based on 14px font-size and 20px line-height
+// Based on 14px font-size and 1.428 line-height (~20px to start)
+
+@padding-base-vertical:          6px;
+@padding-base-horizontal:        12px;
+
+@padding-large-vertical:         10px;
+@padding-large-horizontal:       16px;
+
+@padding-small-vertical:         5px;
+@padding-small-horizontal:       10px;
 
-@fontSizeLarge:         @baseFontSize * 1.25; // ~18px
-@fontSizeSmall:         @baseFontSize * 0.85; // ~12px
-@fontSizeMini:          @baseFontSize * 0.75; // ~11px
+@line-height-large:              1.33;
+@line-height-small:              1.5;
 
-@paddingLarge:          11px 19px; // 44px
-@paddingSmall:          2px 10px;  // 26px
-@paddingMini:           0 6px;   // 22px
+@border-radius-base:             4px;
+@border-radius-large:            6px;
+@border-radius-small:            3px;
 
-@baseBorderRadius:      4px;
-@borderRadiusLarge:     6px;
-@borderRadiusSmall:     3px;
+@component-active-bg:            @brand-primary;
 
+@caret-width-base:               4px;
+@caret-width-large:              5px;
 
 // Tables
 // -------------------------
-@tableBackground:                   transparent; // overall background-color
-@tableBackgroundAccent:             #f9f9f9; // for striping
-@tableBackgroundHover:              #f5f5f5; // for hover
-@tableBorder:                       #ddd; // table and cell border
+
+@table-cell-padding:                 8px;
+@table-condensed-cell-padding:       5px;
+
+@table-bg:                           transparent; // overall background-color
+@table-bg-accent:                    #f9f9f9; // for striping
+@table-bg-hover:                     #f5f5f5;
+@table-bg-active:                    @table-bg-hover;
+
+@table-border-color:                 #ddd; // table and cell border
+
 
 // Buttons
 // -------------------------
-@btnBackground:                     @white;
-@btnBackgroundHighlight:            darken(@white, 10%);
-@btnBorder:                         #ccc;
 
-@btnPrimaryBackground:              @linkColor;
-@btnPrimaryBackgroundHighlight:     spin(@btnPrimaryBackground, 20%);
+@btn-font-weight:                normal;
 
-@btnInfoBackground:                 #5bc0de;
-@btnInfoBackgroundHighlight:        #2f96b4;
+@btn-default-color:              #333;
+@btn-default-bg:                 #fff;
+@btn-default-border:             #ccc;
 
-@btnSuccessBackground:              #62c462;
-@btnSuccessBackgroundHighlight:     #51a351;
+@btn-primary-color:              #fff;
+@btn-primary-bg:                 @brand-primary;
+@btn-primary-border:             darken(@btn-primary-bg, 5%);
 
-@btnWarningBackground:              lighten(@orange, 15%);
-@btnWarningBackgroundHighlight:     @orange;
+@btn-success-color:              #fff;
+@btn-success-bg:                 @brand-success;
+@btn-success-border:             darken(@btn-success-bg, 5%);
 
-@btnDangerBackground:               #ee5f5b;
-@btnDangerBackgroundHighlight:      #bd362f;
+@btn-warning-color:              #fff;
+@btn-warning-bg:                 @brand-warning;
+@btn-warning-border:             darken(@btn-warning-bg, 5%);
 
-@btnInverseBackground:              #444;
-@btnInverseBackgroundHighlight:     @grayDarker;
+@btn-danger-color:               #fff;
+@btn-danger-bg:                  @brand-danger;
+@btn-danger-border:              darken(@btn-danger-bg, 5%);
+
+@btn-info-color:                 #fff;
+@btn-info-bg:                    @brand-info;
+@btn-info-border:                darken(@btn-info-bg, 5%);
+
+@btn-link-disabled-color:        @gray-light;
 
 
 // Forms
 // -------------------------
-@inputBackground:               @white;
-@inputBorder:                   #ccc;
-@inputBorderRadius:             @baseBorderRadius;
-@inputDisabledBackground:       @grayLighter;
-@formActionsBackground:         #f5f5f5;
-@inputHeight:                   @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
+
+@input-bg:                       #fff;
+@input-bg-disabled:              @gray-lighter;
+
+@input-color:                    @gray;
+@input-border:                   #ccc;
+@input-border-radius:            @border-radius-base;
+@input-border-focus:             #66afe9;
+
+@input-color-placeholder:        @gray-light;
+
+@input-height-base:              (@line-height-computed + (@padding-base-vertical * 2) + 2);
+@input-height-large:             (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
+@input-height-small:             (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
+
+@legend-color:                   @gray-dark;
+@legend-border-color:            #e5e5e5;
+
+@input-group-addon-bg:           @gray-lighter;
+@input-group-addon-border-color: @input-border;
 
 
 // Dropdowns
 // -------------------------
-@dropdownBackground:            @white;
-@dropdownBorder:                rgba(0,0,0,.2);
-@dropdownDividerTop:            #e5e5e5;
-@dropdownDividerBottom:         @white;
 
-@dropdownLinkColor:             @grayDark;
-@dropdownLinkColorHover:        @white;
-@dropdownLinkColorActive:       @white;
+@dropdown-bg:                    #fff;
+@dropdown-border:                rgba(0,0,0,.15);
+@dropdown-fallback-border:       #ccc;
+@dropdown-divider-bg:            #e5e5e5;
+
+@dropdown-link-active-color:     #fff;
+@dropdown-link-active-bg:        @component-active-bg;
+
+@dropdown-link-color:            @gray-dark;
+@dropdown-link-hover-color:      #fff;
+@dropdown-link-hover-bg:         @dropdown-link-active-bg;
+
+@dropdown-link-disabled-color:   @gray-light;
 
-@dropdownLinkBackgroundActive:  @linkColor;
-@dropdownLinkBackgroundHover:   @dropdownLinkBackgroundActive;
+@dropdown-header-color:          @gray-light;
 
+@dropdown-caret-color:           #000;
 
 
 // COMPONENT VARIABLES
@@ -141,161 +188,435 @@
 // -------------------------
 // Used for a bird's eye view of components dependent on the z-axis
 // Try to avoid customizing these :)
-@zindexDropdown:          1000;
-@zindexPopover:           1010;
-@zindexTooltip:           1030;
-@zindexFixedNavbar:       1030;
-@zindexModalBackdrop:     1040;
-@zindexModal:             1050;
 
+@zindex-navbar:            1000;
+@zindex-dropdown:          1000;
+@zindex-popover:           1010;
+@zindex-tooltip:           1030;
+@zindex-navbar-fixed:      1030;
+@zindex-modal-background:  1040;
+@zindex-modal:             1050;
+
+// Media queries breakpoints
+// --------------------------------------------------
+
+// Extra small screen / phone
+@screen-xs:                  480px;
+@screen-phone:               @screen-xs;
+
+// Small screen / tablet
+@screen-sm:                  768px;
+@screen-tablet:              @screen-sm;
+
+// Medium screen / desktop
+@screen-md:                  992px;
+@screen-desktop:             @screen-md;
+
+// Large screen / wide desktop
+@screen-lg:                  1600px;
+@screen-lg-desktop:          @screen-lg;
+
+// So media queries don't overlap when required, provide a maximum
+@screen-xs-max:              (@screen-sm - 1);
+@screen-sm-max:              (@screen-md - 1);
+@screen-md-max:              (@screen-lg - 1);
 
-// Sprite icons path
+
+// Grid system
+// --------------------------------------------------
+
+// Number of columns in the grid system
+@grid-columns:              12;
+// Padding, to be divided by two and applied to the left and right of all columns
+@grid-gutter-width:         30px;
+// Point at which the navbar stops collapsing
+@grid-float-breakpoint:     @screen-desktop;
+
+
+// Navbar
 // -------------------------
-@iconSpritePath:          "../img/glyphicons-halflings.png";
-@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";
 
 
-// Input placeholder text color
+// Basics of a navbar
+@navbar-height:                    50px;
+@navbar-margin-bottom:             @line-height-computed;
+@navbar-default-color:             #777;
+@navbar-default-bg:                #f8f8f8;
+@navbar-default-border:            darken(@navbar-default-bg, 6.5%);
+@navbar-border-radius:             @border-radius-base;
+@navbar-padding-horizontal:        floor(@grid-gutter-width / 2);
+@navbar-padding-vertical:          ((@navbar-height - @line-height-computed) / 2);
+
+// Navbar links
+@navbar-default-link-color:                #777;
+@navbar-default-link-hover-color:          #333;
+@navbar-default-link-hover-bg:             transparent;
+@navbar-default-link-active-color:         #555;
+@navbar-default-link-active-bg:            darken(@navbar-default-bg, 6.5%);
+@navbar-default-link-disabled-color:       #ccc;
+@navbar-default-link-disabled-bg:          transparent;
+
+// Navbar brand label
+@navbar-default-brand-color:               @navbar-default-link-color;
+@navbar-default-brand-hover-color:         darken(@navbar-default-link-color, 10%);
+@navbar-default-brand-hover-bg:            transparent;
+
+// Navbar toggle
+@navbar-default-toggle-hover-bg:           #ddd;
+@navbar-default-toggle-icon-bar-bg:        #ccc;
+@navbar-default-toggle-border-color:       #ddd;
+
+
+// Inverted navbar
+//
+// Reset inverted navbar basics
+@navbar-inverse-color:                      @gray-light;
+@navbar-inverse-bg:                         #222;
+@navbar-inverse-border:                     darken(@navbar-inverse-bg, 10%);
+
+// Inverted navbar links
+@navbar-inverse-link-color:                 @gray-light;
+@navbar-inverse-link-hover-color:           #fff;
+@navbar-inverse-link-hover-bg:              transparent;
+@navbar-inverse-link-active-color:          @navbar-inverse-link-hover-color;
+@navbar-inverse-link-active-bg:             darken(@navbar-inverse-bg, 10%);
+@navbar-inverse-link-disabled-color:        #444;
+@navbar-inverse-link-disabled-bg:           transparent;
+
+// Inverted navbar brand label
+@navbar-inverse-brand-color:                @navbar-inverse-link-color;
+@navbar-inverse-brand-hover-color:          #fff;
+@navbar-inverse-brand-hover-bg:             transparent;
+
+// Inverted navbar search
+// Normal navbar needs no special styles or vars
+@navbar-inverse-search-bg:                  lighten(@navbar-inverse-bg, 25%);
+@navbar-inverse-search-bg-focus:            #fff;
+@navbar-inverse-search-border:              @navbar-inverse-bg;
+@navbar-inverse-search-placeholder-color:   #ccc;
+
+// Inverted navbar toggle
+@navbar-inverse-toggle-hover-bg:            #333;
+@navbar-inverse-toggle-icon-bar-bg:         #fff;
+@navbar-inverse-toggle-border-color:        #333;
+
+
+// Navs
 // -------------------------
-@placeholderText:         @grayLight;
 
+@nav-link-padding:                          10px 15px;
+@nav-link-hover-bg:                         @gray-lighter;
 
-// Hr border color
+@nav-disabled-link-color:                   @gray-light;
+@nav-disabled-link-hover-color:             @gray-light;
+
+@nav-open-link-hover-color:                 #fff;
+@nav-open-caret-border-color:               #fff;
+
+// Tabs
+@nav-tabs-border-color:                     #ddd;
+
+@nav-tabs-link-hover-border-color:          @gray-lighter;
+
+@nav-tabs-active-link-hover-bg:             @body-bg;
+@nav-tabs-active-link-hover-color:          @gray;
+@nav-tabs-active-link-hover-border-color:   #ddd;
+
+@nav-tabs-justified-link-border-color:            #ddd;
+@nav-tabs-justified-active-link-border-color:     @body-bg;
+
+// Pills
+@nav-pills-active-link-hover-bg:            @component-active-bg;
+@nav-pills-active-link-hover-color:         #fff;
+
+
+// Pagination
 // -------------------------
-@hrBorder:                @grayLighter;
 
+@pagination-bg:                        #fff;
+@pagination-border:                    #ddd;
 
-// Horizontal forms & lists
+@pagination-hover-bg:                  @gray-lighter;
+
+@pagination-active-bg:                 @brand-primary;
+@pagination-active-color:              #fff;
+
+@pagination-disabled-color:            @gray-light;
+
+
+// Pager
 // -------------------------
-@horizontalComponentOffset:       180px;
 
+@pager-border-radius:                  15px;
+@pager-disabled-color:                 @gray-light;
 
-// Wells
+
+// Jumbotron
 // -------------------------
-@wellBackground:                  #f5f5f5;
 
+@jumbotron-padding:              30px;
+@jumbotron-color:                inherit;
+@jumbotron-bg:                   @gray-lighter;
 
-// Navbar
+@jumbotron-heading-color:        inherit;
+
+
+// Form states and alerts
 // -------------------------
-@navbarCollapseWidth:             979px;
-@navbarCollapseDesktopWidth:      @navbarCollapseWidth + 1;
 
-@navbarHeight:                    40px;
-@navbarBackgroundHighlight:       #ffffff;
-@navbarBackground:                darken(@navbarBackgroundHighlight, 5%);
-@navbarBorder:                    darken(@navbarBackground, 12%);
+@state-warning-text:             #c09853;
+@state-warning-bg:               #fcf8e3;
+@state-warning-border:           darken(spin(@state-warning-bg, -10), 3%);
 
-@navbarText:                      #777;
-@navbarLinkColor:                 #777;
-@navbarLinkColorHover:            @grayDark;
-@navbarLinkColorActive:           @gray;
-@navbarLinkBackgroundHover:       transparent;
-@navbarLinkBackgroundActive:      darken(@navbarBackground, 5%);
+@state-danger-text:              #b94a48;
+@state-danger-bg:                #f2dede;
+@state-danger-border:            darken(spin(@state-danger-bg, -10), 3%);
 
-@navbarBrandColor:                @navbarLinkColor;
+@state-success-text:             #468847;
+@state-success-bg:               #dff0d8;
+@state-success-border:           darken(spin(@state-success-bg, -10), 5%);
 
-// Inverted navbar
-@navbarInverseBackground:                #111111;
-@navbarInverseBackgroundHighlight:       #222222;
-@navbarInverseBorder:                    #252525;
+@state-info-text:                #3a87ad;
+@state-info-bg:                  #d9edf7;
+@state-info-border:              darken(spin(@state-info-bg, -10), 7%);
 
-@navbarInverseText:                      @grayLight;
-@navbarInverseLinkColor:                 @grayLight;
-@navbarInverseLinkColorHover:            @white;
-@navbarInverseLinkColorActive:           @navbarInverseLinkColorHover;
-@navbarInverseLinkBackgroundHover:       transparent;
-@navbarInverseLinkBackgroundActive:      @navbarInverseBackground;
 
-@navbarInverseSearchBackground:          lighten(@navbarInverseBackground, 25%);
-@navbarInverseSearchBackgroundFocus:     @white;
-@navbarInverseSearchBorder:              @navbarInverseBackground;
-@navbarInverseSearchPlaceholderColor:    #ccc;
+// Tooltips
+// -------------------------
+@tooltip-max-width:           200px;
+@tooltip-color:               #fff;
+@tooltip-bg:                  #000;
 
-@navbarInverseBrandColor:                @navbarInverseLinkColor;
+@tooltip-arrow-width:         5px;
+@tooltip-arrow-color:         @tooltip-bg;
 
 
-// Pagination
+// Popovers
 // -------------------------
-@paginationBackground:                #fff;
-@paginationBorder:                    #ddd;
-@paginationActiveBackground:          #f5f5f5;
+@popover-bg:                          #fff;
+@popover-max-width:                   276px;
+@popover-border-color:                rgba(0,0,0,.2);
+@popover-fallback-border-color:       #ccc;
+
+@popover-title-bg:                    darken(@popover-bg, 3%);
+
+@popover-arrow-width:                 10px;
+@popover-arrow-color:                 #fff;
+
+@popover-arrow-outer-width:           (@popover-arrow-width + 1);
+@popover-arrow-outer-color:           rgba(0,0,0,.25);
+@popover-arrow-outer-fallback-color:  #999;
 
 
-// Hero unit
+// Labels
 // -------------------------
-@heroUnitBackground:              @grayLighter;
-@heroUnitHeadingColor:            inherit;
-@heroUnitLeadColor:               inherit;
 
+@label-default-bg:            @gray-light;
+@label-primary-bg:            @brand-primary;
+@label-success-bg:            @brand-success;
+@label-info-bg:               @brand-info;
+@label-warning-bg:            @brand-warning;
+@label-danger-bg:             @brand-danger;
 
-// Form states and alerts
+@label-color:                 #fff;
+@label-link-hover-color:      #fff;
+
+
+// Modals
 // -------------------------
-@warningText:             #c09853;
-@warningBackground:       #fcf8e3;
-@warningBorder:           darken(spin(@warningBackground, -10), 3%);
+@modal-inner-padding:         20px;
 
-@errorText:               #b94a48;
-@errorBackground:         #f2dede;
-@errorBorder:             darken(spin(@errorBackground, -10), 3%);
+@modal-title-padding:         15px;
+@modal-title-line-height:     @line-height-base;
 
-@successText:             #468847;
-@successBackground:       #dff0d8;
-@successBorder:           darken(spin(@successBackground, -10), 5%);
+@modal-content-bg:                             #fff;
+@modal-content-border-color:                   rgba(0,0,0,.2);
+@modal-content-fallback-border-color:          #999;
 
-@infoText:                #3a87ad;
-@infoBackground:          #d9edf7;
-@infoBorder:              darken(spin(@infoBackground, -10), 7%);
+@modal-backdrop-bg:           #000;
+@modal-header-border-color:   #e5e5e5;
+@modal-footer-border-color:   @modal-header-border-color;
 
 
-// Tooltips and popovers
+// Alerts
 // -------------------------
-@tooltipColor:            #fff;
-@tooltipBackground:       #000;
-@tooltipArrowWidth:       5px;
-@tooltipArrowColor:       @tooltipBackground;
+@alert-padding:               15px;
+@alert-border-radius:         @border-radius-base;
+@alert-link-font-weight:      bold;
 
-@popoverBackground:       #fff;
-@popoverArrowWidth:       10px;
-@popoverArrowColor:       #fff;
-@popoverTitleBackground:  darken(@popoverBackground, 3%);
+@alert-success-bg:            @state-success-bg;
+@alert-success-text:          @state-success-text;
+@alert-success-border:        @state-success-border;
 
-// Special enhancement for popovers
-@popoverArrowOuterWidth:  @popoverArrowWidth + 1;
-@popoverArrowOuterColor:  rgba(0,0,0,.25);
+@alert-info-bg:               @state-info-bg;
+@alert-info-text:             @state-info-text;
+@alert-info-border:           @state-info-border;
 
+@alert-warning-bg:            @state-warning-bg;
+@alert-warning-text:          @state-warning-text;
+@alert-warning-border:        @state-warning-border;
 
+@alert-danger-bg:             @state-danger-bg;
+@alert-danger-text:           @state-danger-text;
+@alert-danger-border:         @state-danger-border;
 
-// GRID
-// --------------------------------------------------
+
+// Progress bars
+// -------------------------
+@progress-bg:                 #f5f5f5;
+@progress-bar-color:          #fff;
+
+@progress-bar-bg:             @brand-primary;
+@progress-bar-success-bg:     @brand-success;
+@progress-bar-warning-bg:     @brand-warning;
+@progress-bar-danger-bg:      @brand-danger;
+@progress-bar-info-bg:        @brand-info;
 
 
-// Default 940px grid
+// List group
 // -------------------------
-@gridColumns:             12;
-@gridColumnWidth:         60px;
-@gridGutterWidth:         20px;
-@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
+@list-group-bg:               #fff;
+@list-group-border:           #ddd;
+@list-group-border-radius:    @border-radius-base;
 
-// 1200px min
-@gridColumnWidth1200:     70px;
-@gridGutterWidth1200:     30px;
-@gridRowWidth1200:        (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
+@list-group-hover-bg:         #f5f5f5;
+@list-group-active-color:     #fff;
+@list-group-active-bg:        @component-active-bg;
+@list-group-active-border:    @list-group-active-bg;
 
-// 768px-979px
-@gridColumnWidth768:      42px;
-@gridGutterWidth768:      20px;
-@gridRowWidth768:         (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
+@list-group-link-color:          #555;
+@list-group-link-heading-color:  #333;
 
 
-// Fluid grid
+// Panels
 // -------------------------
-@fluidGridColumnWidth:    percentage(@gridColumnWidth/@gridRowWidth);
-@fluidGridGutterWidth:    percentage(@gridGutterWidth/@gridRowWidth);
+@panel-bg:                    #fff;
+@panel-inner-border:          #ddd;
+@panel-border-radius:         @border-radius-base;
+@panel-footer-bg:             #f5f5f5;
+
+@panel-default-text:          @gray-dark;
+@panel-default-border:        #ddd;
+@panel-default-heading-bg:    #f5f5f5;
+
+@panel-primary-text:          #fff;
+@panel-primary-border:        @brand-primary;
+@panel-primary-heading-bg:    @brand-primary;
+
+@panel-success-text:          @state-success-text;
+@panel-success-border:        @state-success-border;
+@panel-success-heading-bg:    @state-success-bg;
+
+@panel-warning-text:          @state-warning-text;
+@panel-warning-border:        @state-warning-border;
+@panel-warning-heading-bg:    @state-warning-bg;
+
+@panel-danger-text:           @state-danger-text;
+@panel-danger-border:         @state-danger-border;
+@panel-danger-heading-bg:     @state-danger-bg;
+
+@panel-info-text:             @state-info-text;
+@panel-info-border:           @state-info-border;
+@panel-info-heading-bg:       @state-info-bg;
+
+
+// Thumbnails
+// -------------------------
+@thumbnail-padding:           4px;
+@thumbnail-bg:                @body-bg;
+@thumbnail-border:            #ddd;
+@thumbnail-border-radius:     @border-radius-base;
+
+@thumbnail-caption-color:     @text-color;
+@thumbnail-caption-padding:   9px;
+
+
+// Wells
+// -------------------------
+@well-bg:                     #f5f5f5;
+
+
+// Badges
+// -------------------------
+@badge-color:                 #fff;
+@badge-link-hover-color:      #fff;
+@badge-bg:                    @gray-light;
+
+@badge-active-color:          @link-color;
+@badge-active-bg:             #fff;
+
+@badge-font-weight:           bold;
+@badge-line-height:           1;
+@badge-border-radius:         10px;
+
+
+// Breadcrumbs
+// -------------------------
+@breadcrumb-bg:               #f5f5f5;
+@breadcrumb-color:            #ccc;
+@breadcrumb-active-color:     @gray-light;
+
+
+// Carousel
+// ------------------------
+
+@carousel-text-shadow:                        0 1px 2px rgba(0,0,0,.6);
+
+@carousel-control-color:                      #fff;
+@carousel-control-width:                      15%;
+@carousel-control-opacity:                    .5;
+@carousel-control-font-size:                  20px;
+
+@carousel-indicator-active-bg:                #fff;
+@carousel-indicator-border-color:             #fff;
+
+@carousel-caption-color:                      #fff;
+
+
+// Close
+// ------------------------
+@close-color:                 #000;
+@close-font-weight:           bold;
+@close-text-shadow:           0 1px 0 #fff;
+
+
+// Code
+// ------------------------
+@code-color:                  #c7254e;
+@code-bg:                     #f9f2f4;
+
+@pre-bg:                      #f5f5f5;
+@pre-color:                   @gray-dark;
+@pre-border-color:            #ccc;
+@pre-scrollable-max-height:   340px;
+
+// Type
+// ------------------------
+@text-muted:                  @gray-light;
+@abbr-border-color:           @gray-light;
+@headings-small-color:        @gray-light;
+@blockquote-small-color:      @gray-light;
+@blockquote-border-color:     @gray-lighter;
+@page-header-border-color:    @gray-lighter;
+
+// Miscellaneous
+// -------------------------
+
+// Hr border color
+@hr-border:                   @gray-lighter;
+
+// Horizontal forms & lists
+@component-offset-horizontal: 180px;
+
+
+// Container sizes
+// --------------------------------------------------
+
+// Small screen / tablet
+@container-tablet:            ((720px + @grid-gutter-width));
 
-// 1200px min
-@fluidGridColumnWidth1200:     percentage(@gridColumnWidth1200/@gridRowWidth1200);
-@fluidGridGutterWidth1200:     percentage(@gridGutterWidth1200/@gridRowWidth1200);
+// Medium screen / desktop
+@container-desktop:           ((940px + @grid-gutter-width));
 
-// 768px-979px
-@fluidGridColumnWidth768:      percentage(@gridColumnWidth768/@gridRowWidth768);
-@fluidGridGutterWidth768:      percentage(@gridGutterWidth768/@gridRowWidth768);
+// Large screen / wide desktop
+@container-lg-desktop:        ((1140px + @grid-gutter-width));

BIN
docs/theme/docker/static/img/container3.png


+ 0 - 0
docs/sources/static_files/dockerlogo-h.png → docs/theme/docker/static/img/dockerlogo-h.png


BIN
docs/theme/docker/static/img/menu_arrow_down.gif


BIN
docs/theme/docker/static/img/menu_arrow_right.gif


+ 93 - 32
docs/theme/docker/static/js/docs.js

@@ -1,37 +1,98 @@
 
+// This script should be included at the END of the document. 
+// For the fastest loading it does not inlude $(document).ready()
+
+// This Document contains a few helper functions for the documentation to display the current version,
+// collapse and expand the menu etc.
+
+
+// Function to make the sticky header possible
+function shiftWindow() { 
+    scrollBy(0, -70);
+    console.log("window shifted")
+}
+
+window.addEventListener("hashchange", shiftWindow);
+
+function loadShift() {
+    if (window.location.hash) {
+        console.log("window has hash");
+        shiftWindow();
+    }
+}
+
+$(window).load(function() {
+    loadShift();
+});
+
 $(function(){
 
-    // init multi-vers stuff
-    $('.tabswitcher').each(function(i, multi_vers){
-        var tabs = $('<ul></ul>');
-        $(multi_vers).prepend(tabs);
-        $(multi_vers).children('.tab').each(function(j, vers_content){
-            vers = $(vers_content).children(':first').text();
-            var id = 'multi_vers_' + '_' + i + '_' + j;
-            $(vers_content).attr('id', id);
-            $(tabs).append('<li><a href="#' + id + '">' + vers + '</a></li>');
-        });
+    // sidebar accordian-ing
+    // don't apply on last object (it should be the FAQ) or the first (it should be introduction)
+
+    // define an array to which all opened items should be added
+    var openmenus = [];
+
+    var elements = $('.toctree-l2');
+    // for (var i = 0; i < elements.length; i += 1) { var current = $(elements[i]); current.children('ul').hide();}
+
+
+    // set initial collapsed state
+    var elements = $('.toctree-l1');
+    for (var i = 0; i < elements.length; i += 1) {
+        var current = $(elements[i]);
+        if (current.hasClass('current')) {
+            current.addClass('open');
+            currentlink = current.children('a')[0].href;
+            openmenus.push(currentlink);
+
+            // do nothing
+        } else {
+            // collapse children
+            current.children('ul').hide();
+        }
+    }
+
+    if (doc_version == "") {
+        $('.version-flyer ul').html('<li class="alternative active-slug"><a href="" title="Switch to local">Local</a></li>');
+    }
+
+    // mark the active documentation in the version widget
+    $(".version-flyer a:contains('" + doc_version + "')").parent().addClass('active-slug');
+
+
+    // attached handler on click
+    // Do not attach to first element or last (intro, faq) so that
+    // first and last link directly instead of accordian
+    $('.sidebar > ul > li > a').not(':last').not(':first').click(function(){
+
+        var index = $.inArray(this.href, openmenus)
+
+        if (index > -1) {
+            console.log(index);
+            openmenus.splice(index, 1);
+
+
+            $(this).parent().children('ul').slideUp(200, function() {
+                $(this).parent().removeClass('open'); // toggle after effect
+            });
+        }
+        else {
+            openmenus.push(this.href);
+
+            var current = $(this);
+
+            setTimeout(function() {
+                // $('.sidebar > ul > li').removeClass('current');
+                current.parent().addClass('current').addClass('open'); // toggle before effect
+                current.parent().children('ul').hide();
+                current.parent().children('ul').slideDown(200);
+            }, 100);
+        }
+        return false;
     });
-    $( ".tabswitcher" ).tabs();
-    
-    // sidebar acordian-ing
-    // don't apply on last object (it should be the FAQ)
-   $('nav > ul > li > a').not(':last').click(function(){
-	if ($(this).parent().hasClass('current')) {
-	    $(this).parent().children('ul').slideUp(200, function() {
-		$(this).parent().removeClass('current'); // toggle after effect
-	    });
-	} else {
-	    $('nav > ul > li > ul').slideUp(100);
-	    var current = $(this);
-	    setTimeout(function() {      
-		$('nav > ul > li').removeClass('current');
-		current.parent().addClass('current'); // toggle before effect
-		current.parent().children('ul').hide();
-		current.parent().children('ul').slideDown(200);
-	    }, 100);
-	}
-	return false;
-     });
-  
+
+    // add class to all those which have children
+    $('.sidebar > ul > li').not(':last').not(':first').addClass('has-children');
+
 });

File diff suppressed because it is too large
+ 0 - 8
docs/theme/docker/static/js/jquery.ba-bbq.min.js


+ 0 - 9
docs/theme/docker/static/js/jquery.ba-urlinternal.min.js

@@ -1,9 +0,0 @@
-/*
- * urlInternal - v1.0 - 10/7/2009
- * http://benalman.com/projects/jquery-urlinternal-plugin/
- * 
- * Copyright (c) 2009 "Cowboy" Ben Alman
- * Dual licensed under the MIT and GPL licenses.
- * http://benalman.com/about/license/
- */
-(function($){var g,i=!0,r=!1,m=window.location,h=Array.prototype.slice,b=m.href.match(/^((https?:\/\/.*?\/)?[^#]*)#?.*$/),u=b[1]+"#",t=b[2],e,l,f,q,c,j,x="elemUrlAttr",k="href",y="src",p="urlInternal",d="urlExternal",n="urlFragment",a,s={};function w(A){var z=h.call(arguments,1);return function(){return A.apply(this,z.concat(h.call(arguments)))}}$.isUrlInternal=q=function(z){if(!z||j(z)){return g}if(a.test(z)){return i}if(/^(?:https?:)?\/\//i.test(z)){return r}if(/^[a-z\d.-]+:/i.test(z)){return g}return i};$.isUrlExternal=c=function(z){var A=q(z);return typeof A==="boolean"?!A:A};$.isUrlFragment=j=function(z){var A=(z||"").match(/^([^#]?)([^#]*#).*$/);return !!A&&(A[2]==="#"||z.indexOf(u)===0||(A[1]==="/"?t+A[2]===u:!/^https?:\/\//i.test(z)&&$('<a href="'+z+'"/>')[0].href.indexOf(u)===0))};function v(A,z){return this.filter(":"+A+(z?"("+z+")":""))}$.fn[p]=w(v,p);$.fn[d]=w(v,d);$.fn[n]=w(v,n);function o(D,C,B,A){var z=A[3]||e()[(C.nodeName||"").toLowerCase()]||"";return z?!!D(C.getAttribute(z)):r}$.expr[":"][p]=w(o,q);$.expr[":"][d]=w(o,c);$.expr[":"][n]=w(o,j);$[x]||($[x]=function(z){return $.extend(s,z)})({a:k,base:k,iframe:y,img:y,input:y,form:"action",link:k,script:y});e=$[x];$.urlInternalHost=l=function(B){B=B?"(?:(?:"+Array.prototype.join.call(arguments,"|")+")\\.)?":"";var A=new RegExp("^"+B+"(.*)","i"),z="^(?:"+m.protocol+")?//"+m.hostname.replace(A,B+"$1").replace(/\\?\./g,"\\.")+(m.port?":"+m.port:"")+"/";return f(z)};$.urlInternalRegExp=f=function(z){if(z){a=typeof z==="string"?new RegExp(z,"i"):z}return a};l("www")})(jQuery);

+ 0 - 1
docs/theme/docker/static/js/main.js

@@ -1 +0,0 @@
-

+ 0 - 2268
docs/theme/docker/static/js/vendor/bootstrap.js

@@ -1,2268 +0,0 @@
-/* ===================================================
- * bootstrap-transition.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#transitions
- * ===================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
-  /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
-   * ======================================================= */
-
-  $(function () {
-
-    $.support.transition = (function () {
-
-      var transitionEnd = (function () {
-
-        var el = document.createElement('bootstrap')
-          , transEndEventNames = {
-               'WebkitTransition' : 'webkitTransitionEnd'
-            ,  'MozTransition'    : 'transitionend'
-            ,  'OTransition'      : 'oTransitionEnd otransitionend'
-            ,  'transition'       : 'transitionend'
-            }
-          , name
-
-        for (name in transEndEventNames){
-          if (el.style[name] !== undefined) {
-            return transEndEventNames[name]
-          }
-        }
-
-      }())
-
-      return transitionEnd && {
-        end: transitionEnd
-      }
-
-    })()
-
-  })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-alert.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#alerts
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* ALERT CLASS DEFINITION
-  * ====================== */
-
-  var dismiss = '[data-dismiss="alert"]'
-    , Alert = function (el) {
-        $(el).on('click', dismiss, this.close)
-      }
-
-  Alert.prototype.close = function (e) {
-    var $this = $(this)
-      , selector = $this.attr('data-target')
-      , $parent
-
-    if (!selector) {
-      selector = $this.attr('href')
-      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
-    }
-
-    $parent = $(selector)
-
-    e && e.preventDefault()
-
-    $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
-
-    $parent.trigger(e = $.Event('close'))
-
-    if (e.isDefaultPrevented()) return
-
-    $parent.removeClass('in')
-
-    function removeElement() {
-      $parent
-        .trigger('closed')
-        .remove()
-    }
-
-    $.support.transition && $parent.hasClass('fade') ?
-      $parent.on($.support.transition.end, removeElement) :
-      removeElement()
-  }
-
-
- /* ALERT PLUGIN DEFINITION
-  * ======================= */
-
-  var old = $.fn.alert
-
-  $.fn.alert = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('alert')
-      if (!data) $this.data('alert', (data = new Alert(this)))
-      if (typeof option == 'string') data[option].call($this)
-    })
-  }
-
-  $.fn.alert.Constructor = Alert
-
-
- /* ALERT NO CONFLICT
-  * ================= */
-
-  $.fn.alert.noConflict = function () {
-    $.fn.alert = old
-    return this
-  }
-
-
- /* ALERT DATA-API
-  * ============== */
-
-  $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
-
-}(window.jQuery);/* ============================================================
- * bootstrap-button.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#buttons
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* BUTTON PUBLIC CLASS DEFINITION
-  * ============================== */
-
-  var Button = function (element, options) {
-    this.$element = $(element)
-    this.options = $.extend({}, $.fn.button.defaults, options)
-  }
-
-  Button.prototype.setState = function (state) {
-    var d = 'disabled'
-      , $el = this.$element
-      , data = $el.data()
-      , val = $el.is('input') ? 'val' : 'html'
-
-    state = state + 'Text'
-    data.resetText || $el.data('resetText', $el[val]())
-
-    $el[val](data[state] || this.options[state])
-
-    // push to event loop to allow forms to submit
-    setTimeout(function () {
-      state == 'loadingText' ?
-        $el.addClass(d).attr(d, d) :
-        $el.removeClass(d).removeAttr(d)
-    }, 0)
-  }
-
-  Button.prototype.toggle = function () {
-    var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
-
-    $parent && $parent
-      .find('.active')
-      .removeClass('active')
-
-    this.$element.toggleClass('active')
-  }
-
-
- /* BUTTON PLUGIN DEFINITION
-  * ======================== */
-
-  var old = $.fn.button
-
-  $.fn.button = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('button')
-        , options = typeof option == 'object' && option
-      if (!data) $this.data('button', (data = new Button(this, options)))
-      if (option == 'toggle') data.toggle()
-      else if (option) data.setState(option)
-    })
-  }
-
-  $.fn.button.defaults = {
-    loadingText: 'loading...'
-  }
-
-  $.fn.button.Constructor = Button
-
-
- /* BUTTON NO CONFLICT
-  * ================== */
-
-  $.fn.button.noConflict = function () {
-    $.fn.button = old
-    return this
-  }
-
-
- /* BUTTON DATA-API
-  * =============== */
-
-  $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
-    var $btn = $(e.target)
-    if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
-    $btn.button('toggle')
-  })
-
-}(window.jQuery);/* ==========================================================
- * bootstrap-carousel.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#carousel
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* CAROUSEL CLASS DEFINITION
-  * ========================= */
-
-  var Carousel = function (element, options) {
-    this.$element = $(element)
-    this.$indicators = this.$element.find('.carousel-indicators')
-    this.options = options
-    this.options.pause == 'hover' && this.$element
-      .on('mouseenter', $.proxy(this.pause, this))
-      .on('mouseleave', $.proxy(this.cycle, this))
-  }
-
-  Carousel.prototype = {
-
-    cycle: function (e) {
-      if (!e) this.paused = false
-      if (this.interval) clearInterval(this.interval);
-      this.options.interval
-        && !this.paused
-        && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
-      return this
-    }
-
-  , getActiveIndex: function () {
-      this.$active = this.$element.find('.item.active')
-      this.$items = this.$active.parent().children()
-      return this.$items.index(this.$active)
-    }
-
-  , to: function (pos) {
-      var activeIndex = this.getActiveIndex()
-        , that = this
-
-      if (pos > (this.$items.length - 1) || pos < 0) return
-
-      if (this.sliding) {
-        return this.$element.one('slid', function () {
-          that.to(pos)
-        })
-      }
-
-      if (activeIndex == pos) {
-        return this.pause().cycle()
-      }
-
-      return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
-    }
-
-  , pause: function (e) {
-      if (!e) this.paused = true
-      if (this.$element.find('.next, .prev').length && $.support.transition.end) {
-        this.$element.trigger($.support.transition.end)
-        this.cycle()
-      }
-      clearInterval(this.interval)
-      this.interval = null
-      return this
-    }
-
-  , next: function () {
-      if (this.sliding) return
-      return this.slide('next')
-    }
-
-  , prev: function () {
-      if (this.sliding) return
-      return this.slide('prev')
-    }
-
-  , slide: function (type, next) {
-      var $active = this.$element.find('.item.active')
-        , $next = next || $active[type]()
-        , isCycling = this.interval
-        , direction = type == 'next' ? 'left' : 'right'
-        , fallback  = type == 'next' ? 'first' : 'last'
-        , that = this
-        , e
-
-      this.sliding = true
-
-      isCycling && this.pause()
-
-      $next = $next.length ? $next : this.$element.find('.item')[fallback]()
-
-      e = $.Event('slide', {
-        relatedTarget: $next[0]
-      , direction: direction
-      })
-
-      if ($next.hasClass('active')) return
-
-      if (this.$indicators.length) {
-        this.$indicators.find('.active').removeClass('active')
-        this.$element.one('slid', function () {
-          var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
-          $nextIndicator && $nextIndicator.addClass('active')
-        })
-      }
-
-      if ($.support.transition && this.$element.hasClass('slide')) {
-        this.$element.trigger(e)
-        if (e.isDefaultPrevented()) return
-        $next.addClass(type)
-        $next[0].offsetWidth // force reflow
-        $active.addClass(direction)
-        $next.addClass(direction)
-        this.$element.one($.support.transition.end, function () {
-          $next.removeClass([type, direction].join(' ')).addClass('active')
-          $active.removeClass(['active', direction].join(' '))
-          that.sliding = false
-          setTimeout(function () { that.$element.trigger('slid') }, 0)
-        })
-      } else {
-        this.$element.trigger(e)
-        if (e.isDefaultPrevented()) return
-        $active.removeClass('active')
-        $next.addClass('active')
-        this.sliding = false
-        this.$element.trigger('slid')
-      }
-
-      isCycling && this.cycle()
-
-      return this
-    }
-
-  }
-
-
- /* CAROUSEL PLUGIN DEFINITION
-  * ========================== */
-
-  var old = $.fn.carousel
-
-  $.fn.carousel = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('carousel')
-        , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
-        , action = typeof option == 'string' ? option : options.slide
-      if (!data) $this.data('carousel', (data = new Carousel(this, options)))
-      if (typeof option == 'number') data.to(option)
-      else if (action) data[action]()
-      else if (options.interval) data.pause().cycle()
-    })
-  }
-
-  $.fn.carousel.defaults = {
-    interval: 5000
-  , pause: 'hover'
-  }
-
-  $.fn.carousel.Constructor = Carousel
-
-
- /* CAROUSEL NO CONFLICT
-  * ==================== */
-
-  $.fn.carousel.noConflict = function () {
-    $.fn.carousel = old
-    return this
-  }
-
- /* CAROUSEL DATA-API
-  * ================= */
-
-  $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
-    var $this = $(this), href
-      , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
-      , options = $.extend({}, $target.data(), $this.data())
-      , slideIndex
-
-    $target.carousel(options)
-
-    if (slideIndex = $this.attr('data-slide-to')) {
-      $target.data('carousel').pause().to(slideIndex).cycle()
-    }
-
-    e.preventDefault()
-  })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-collapse.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#collapse
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* COLLAPSE PUBLIC CLASS DEFINITION
-  * ================================ */
-
-  var Collapse = function (element, options) {
-    this.$element = $(element)
-    this.options = $.extend({}, $.fn.collapse.defaults, options)
-
-    if (this.options.parent) {
-      this.$parent = $(this.options.parent)
-    }
-
-    this.options.toggle && this.toggle()
-  }
-
-  Collapse.prototype = {
-
-    constructor: Collapse
-
-  , dimension: function () {
-      var hasWidth = this.$element.hasClass('width')
-      return hasWidth ? 'width' : 'height'
-    }
-
-  , show: function () {
-      var dimension
-        , scroll
-        , actives
-        , hasData
-
-      if (this.transitioning || this.$element.hasClass('in')) return
-
-      dimension = this.dimension()
-      scroll = $.camelCase(['scroll', dimension].join('-'))
-      actives = this.$parent && this.$parent.find('> .accordion-group > .in')
-
-      if (actives && actives.length) {
-        hasData = actives.data('collapse')
-        if (hasData && hasData.transitioning) return
-        actives.collapse('hide')
-        hasData || actives.data('collapse', null)
-      }
-
-      this.$element[dimension](0)
-      this.transition('addClass', $.Event('show'), 'shown')
-      $.support.transition && this.$element[dimension](this.$element[0][scroll])
-    }
-
-  , hide: function () {
-      var dimension
-      if (this.transitioning || !this.$element.hasClass('in')) return
-      dimension = this.dimension()
-      this.reset(this.$element[dimension]())
-      this.transition('removeClass', $.Event('hide'), 'hidden')
-      this.$element[dimension](0)
-    }
-
-  , reset: function (size) {
-      var dimension = this.dimension()
-
-      this.$element
-        .removeClass('collapse')
-        [dimension](size || 'auto')
-        [0].offsetWidth
-
-      this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
-
-      return this
-    }
-
-  , transition: function (method, startEvent, completeEvent) {
-      var that = this
-        , complete = function () {
-            if (startEvent.type == 'show') that.reset()
-            that.transitioning = 0
-            that.$element.trigger(completeEvent)
-          }
-
-      this.$element.trigger(startEvent)
-
-      if (startEvent.isDefaultPrevented()) return
-
-      this.transitioning = 1
-
-      this.$element[method]('in')
-
-      $.support.transition && this.$element.hasClass('collapse') ?
-        this.$element.one($.support.transition.end, complete) :
-        complete()
-    }
-
-  , toggle: function () {
-      this[this.$element.hasClass('in') ? 'hide' : 'show']()
-    }
-
-  }
-
-
- /* COLLAPSE PLUGIN DEFINITION
-  * ========================== */
-
-  var old = $.fn.collapse
-
-  $.fn.collapse = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('collapse')
-        , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
-      if (!data) $this.data('collapse', (data = new Collapse(this, options)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.collapse.defaults = {
-    toggle: true
-  }
-
-  $.fn.collapse.Constructor = Collapse
-
-
- /* COLLAPSE NO CONFLICT
-  * ==================== */
-
-  $.fn.collapse.noConflict = function () {
-    $.fn.collapse = old
-    return this
-  }
-
-
- /* COLLAPSE DATA-API
-  * ================= */
-
-  $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
-    var $this = $(this), href
-      , target = $this.attr('data-target')
-        || e.preventDefault()
-        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
-      , option = $(target).data('collapse') ? 'toggle' : $this.data()
-    $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
-    $(target).collapse(option)
-  })
-
-}(window.jQuery);/* ============================================================
- * bootstrap-dropdown.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#dropdowns
- * ============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* DROPDOWN CLASS DEFINITION
-  * ========================= */
-
-  var toggle = '[data-toggle=dropdown]'
-    , Dropdown = function (element) {
-        var $el = $(element).on('click.dropdown.data-api', this.toggle)
-        $('html').on('click.dropdown.data-api', function () {
-          $el.parent().removeClass('open')
-        })
-      }
-
-  Dropdown.prototype = {
-
-    constructor: Dropdown
-
-  , toggle: function (e) {
-      var $this = $(this)
-        , $parent
-        , isActive
-
-      if ($this.is('.disabled, :disabled')) return
-
-      $parent = getParent($this)
-
-      isActive = $parent.hasClass('open')
-
-      clearMenus()
-
-      if (!isActive) {
-        $parent.toggleClass('open')
-      }
-
-      $this.focus()
-
-      return false
-    }
-
-  , keydown: function (e) {
-      var $this
-        , $items
-        , $active
-        , $parent
-        , isActive
-        , index
-
-      if (!/(38|40|27)/.test(e.keyCode)) return
-
-      $this = $(this)
-
-      e.preventDefault()
-      e.stopPropagation()
-
-      if ($this.is('.disabled, :disabled')) return
-
-      $parent = getParent($this)
-
-      isActive = $parent.hasClass('open')
-
-      if (!isActive || (isActive && e.keyCode == 27)) {
-        if (e.which == 27) $parent.find(toggle).focus()
-        return $this.click()
-      }
-
-      $items = $('[role=menu] li:not(.divider):visible a', $parent)
-
-      if (!$items.length) return
-
-      index = $items.index($items.filter(':focus'))
-
-      if (e.keyCode == 38 && index > 0) index--                                        // up
-      if (e.keyCode == 40 && index < $items.length - 1) index++                        // down
-      if (!~index) index = 0
-
-      $items
-        .eq(index)
-        .focus()
-    }
-
-  }
-
-  function clearMenus() {
-    $(toggle).each(function () {
-      getParent($(this)).removeClass('open')
-    })
-  }
-
-  function getParent($this) {
-    var selector = $this.attr('data-target')
-      , $parent
-
-    if (!selector) {
-      selector = $this.attr('href')
-      selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
-    }
-
-    $parent = selector && $(selector)
-
-    if (!$parent || !$parent.length) $parent = $this.parent()
-
-    return $parent
-  }
-
-
-  /* DROPDOWN PLUGIN DEFINITION
-   * ========================== */
-
-  var old = $.fn.dropdown
-
-  $.fn.dropdown = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('dropdown')
-      if (!data) $this.data('dropdown', (data = new Dropdown(this)))
-      if (typeof option == 'string') data[option].call($this)
-    })
-  }
-
-  $.fn.dropdown.Constructor = Dropdown
-
-
- /* DROPDOWN NO CONFLICT
-  * ==================== */
-
-  $.fn.dropdown.noConflict = function () {
-    $.fn.dropdown = old
-    return this
-  }
-
-
-  /* APPLY TO STANDARD DROPDOWN ELEMENTS
-   * =================================== */
-
-  $(document)
-    .on('click.dropdown.data-api', clearMenus)
-    .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
-    .on('.dropdown-menu', function (e) { e.stopPropagation() })
-    .on('click.dropdown.data-api'  , toggle, Dropdown.prototype.toggle)
-    .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
-
-}(window.jQuery);
-/* =========================================================
- * bootstrap-modal.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#modals
- * =========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================= */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* MODAL CLASS DEFINITION
-  * ====================== */
-
-  var Modal = function (element, options) {
-    this.options = options
-    this.$element = $(element)
-      .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
-    this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
-  }
-
-  Modal.prototype = {
-
-      constructor: Modal
-
-    , toggle: function () {
-        return this[!this.isShown ? 'show' : 'hide']()
-      }
-
-    , show: function () {
-        var that = this
-          , e = $.Event('show')
-
-        this.$element.trigger(e)
-
-        if (this.isShown || e.isDefaultPrevented()) return
-
-        this.isShown = true
-
-        this.escape()
-
-        this.backdrop(function () {
-          var transition = $.support.transition && that.$element.hasClass('fade')
-
-          if (!that.$element.parent().length) {
-            that.$element.appendTo(document.body) //don't move modals dom position
-          }
-
-          that.$element.show()
-
-          if (transition) {
-            that.$element[0].offsetWidth // force reflow
-          }
-
-          that.$element
-            .addClass('in')
-            .attr('aria-hidden', false)
-
-          that.enforceFocus()
-
-          transition ?
-            that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
-            that.$element.focus().trigger('shown')
-
-        })
-      }
-
-    , hide: function (e) {
-        e && e.preventDefault()
-
-        var that = this
-
-        e = $.Event('hide')
-
-        this.$element.trigger(e)
-
-        if (!this.isShown || e.isDefaultPrevented()) return
-
-        this.isShown = false
-
-        this.escape()
-
-        $(document).off('focusin.modal')
-
-        this.$element
-          .removeClass('in')
-          .attr('aria-hidden', true)
-
-        $.support.transition && this.$element.hasClass('fade') ?
-          this.hideWithTransition() :
-          this.hideModal()
-      }
-
-    , enforceFocus: function () {
-        var that = this
-        $(document).on('focusin.modal', function (e) {
-          if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
-            that.$element.focus()
-          }
-        })
-      }
-
-    , escape: function () {
-        var that = this
-        if (this.isShown && this.options.keyboard) {
-          this.$element.on('keyup.dismiss.modal', function ( e ) {
-            e.which == 27 && that.hide()
-          })
-        } else if (!this.isShown) {
-          this.$element.off('keyup.dismiss.modal')
-        }
-      }
-
-    , hideWithTransition: function () {
-        var that = this
-          , timeout = setTimeout(function () {
-              that.$element.off($.support.transition.end)
-              that.hideModal()
-            }, 500)
-
-        this.$element.one($.support.transition.end, function () {
-          clearTimeout(timeout)
-          that.hideModal()
-        })
-      }
-
-    , hideModal: function () {
-        var that = this
-        this.$element.hide()
-        this.backdrop(function () {
-          that.removeBackdrop()
-          that.$element.trigger('hidden')
-        })
-      }
-
-    , removeBackdrop: function () {
-        this.$backdrop.remove()
-        this.$backdrop = null
-      }
-
-    , backdrop: function (callback) {
-        var that = this
-          , animate = this.$element.hasClass('fade') ? 'fade' : ''
-
-        if (this.isShown && this.options.backdrop) {
-          var doAnimate = $.support.transition && animate
-
-          this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
-            .appendTo(document.body)
-
-          this.$backdrop.click(
-            this.options.backdrop == 'static' ?
-              $.proxy(this.$element[0].focus, this.$element[0])
-            : $.proxy(this.hide, this)
-          )
-
-          if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
-          this.$backdrop.addClass('in')
-
-          if (!callback) return
-
-          doAnimate ?
-            this.$backdrop.one($.support.transition.end, callback) :
-            callback()
-
-        } else if (!this.isShown && this.$backdrop) {
-          this.$backdrop.removeClass('in')
-
-          $.support.transition && this.$element.hasClass('fade')?
-            this.$backdrop.one($.support.transition.end, callback) :
-            callback()
-
-        } else if (callback) {
-          callback()
-        }
-      }
-  }
-
-
- /* MODAL PLUGIN DEFINITION
-  * ======================= */
-
-  var old = $.fn.modal
-
-  $.fn.modal = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('modal')
-        , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
-      if (!data) $this.data('modal', (data = new Modal(this, options)))
-      if (typeof option == 'string') data[option]()
-      else if (options.show) data.show()
-    })
-  }
-
-  $.fn.modal.defaults = {
-      backdrop: true
-    , keyboard: true
-    , show: true
-  }
-
-  $.fn.modal.Constructor = Modal
-
-
- /* MODAL NO CONFLICT
-  * ================= */
-
-  $.fn.modal.noConflict = function () {
-    $.fn.modal = old
-    return this
-  }
-
-
- /* MODAL DATA-API
-  * ============== */
-
-  $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
-    var $this = $(this)
-      , href = $this.attr('href')
-      , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
-      , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
-
-    e.preventDefault()
-
-    $target
-      .modal(option)
-      .one('hide', function () {
-        $this.focus()
-      })
-  })
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-tooltip.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#tooltips
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* TOOLTIP PUBLIC CLASS DEFINITION
-  * =============================== */
-
-  var Tooltip = function (element, options) {
-    this.init('tooltip', element, options)
-  }
-
-  Tooltip.prototype = {
-
-    constructor: Tooltip
-
-  , init: function (type, element, options) {
-      var eventIn
-        , eventOut
-        , triggers
-        , trigger
-        , i
-
-      this.type = type
-      this.$element = $(element)
-      this.options = this.getOptions(options)
-      this.enabled = true
-
-      triggers = this.options.trigger.split(' ')
-
-      for (i = triggers.length; i--;) {
-        trigger = triggers[i]
-        if (trigger == 'click') {
-          this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
-        } else if (trigger != 'manual') {
-          eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
-          eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
-          this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
-          this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
-        }
-      }
-
-      this.options.selector ?
-        (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
-        this.fixTitle()
-    }
-
-  , getOptions: function (options) {
-      options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
-
-      if (options.delay && typeof options.delay == 'number') {
-        options.delay = {
-          show: options.delay
-        , hide: options.delay
-        }
-      }
-
-      return options
-    }
-
-  , enter: function (e) {
-      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
-      if (!self.options.delay || !self.options.delay.show) return self.show()
-
-      clearTimeout(this.timeout)
-      self.hoverState = 'in'
-      this.timeout = setTimeout(function() {
-        if (self.hoverState == 'in') self.show()
-      }, self.options.delay.show)
-    }
-
-  , leave: function (e) {
-      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-
-      if (this.timeout) clearTimeout(this.timeout)
-      if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
-      self.hoverState = 'out'
-      this.timeout = setTimeout(function() {
-        if (self.hoverState == 'out') self.hide()
-      }, self.options.delay.hide)
-    }
-
-  , show: function () {
-      var $tip
-        , pos
-        , actualWidth
-        , actualHeight
-        , placement
-        , tp
-        , e = $.Event('show')
-
-      if (this.hasContent() && this.enabled) {
-        this.$element.trigger(e)
-        if (e.isDefaultPrevented()) return
-        $tip = this.tip()
-        this.setContent()
-
-        if (this.options.animation) {
-          $tip.addClass('fade')
-        }
-
-        placement = typeof this.options.placement == 'function' ?
-          this.options.placement.call(this, $tip[0], this.$element[0]) :
-          this.options.placement
-
-        $tip
-          .detach()
-          .css({ top: 0, left: 0, display: 'block' })
-
-        this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
-
-        pos = this.getPosition()
-
-        actualWidth = $tip[0].offsetWidth
-        actualHeight = $tip[0].offsetHeight
-
-        switch (placement) {
-          case 'bottom':
-            tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
-            break
-          case 'top':
-            tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
-            break
-          case 'left':
-            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
-            break
-          case 'right':
-            tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
-            break
-        }
-
-        this.applyPlacement(tp, placement)
-        this.$element.trigger('shown')
-      }
-    }
-
-  , applyPlacement: function(offset, placement){
-      var $tip = this.tip()
-        , width = $tip[0].offsetWidth
-        , height = $tip[0].offsetHeight
-        , actualWidth
-        , actualHeight
-        , delta
-        , replace
-
-      $tip
-        .offset(offset)
-        .addClass(placement)
-        .addClass('in')
-
-      actualWidth = $tip[0].offsetWidth
-      actualHeight = $tip[0].offsetHeight
-
-      if (placement == 'top' && actualHeight != height) {
-        offset.top = offset.top + height - actualHeight
-        replace = true
-      }
-
-      if (placement == 'bottom' || placement == 'top') {
-        delta = 0
-
-        if (offset.left < 0){
-          delta = offset.left * -2
-          offset.left = 0
-          $tip.offset(offset)
-          actualWidth = $tip[0].offsetWidth
-          actualHeight = $tip[0].offsetHeight
-        }
-
-        this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
-      } else {
-        this.replaceArrow(actualHeight - height, actualHeight, 'top')
-      }
-
-      if (replace) $tip.offset(offset)
-    }
-
-  , replaceArrow: function(delta, dimension, position){
-      this
-        .arrow()
-        .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
-    }
-
-  , setContent: function () {
-      var $tip = this.tip()
-        , title = this.getTitle()
-
-      $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
-      $tip.removeClass('fade in top bottom left right')
-    }
-
-  , hide: function () {
-      var that = this
-        , $tip = this.tip()
-        , e = $.Event('hide')
-
-      this.$element.trigger(e)
-      if (e.isDefaultPrevented()) return
-
-      $tip.removeClass('in')
-
-      function removeWithAnimation() {
-        var timeout = setTimeout(function () {
-          $tip.off($.support.transition.end).detach()
-        }, 500)
-
-        $tip.one($.support.transition.end, function () {
-          clearTimeout(timeout)
-          $tip.detach()
-        })
-      }
-
-      $.support.transition && this.$tip.hasClass('fade') ?
-        removeWithAnimation() :
-        $tip.detach()
-
-      this.$element.trigger('hidden')
-
-      return this
-    }
-
-  , fixTitle: function () {
-      var $e = this.$element
-      if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
-        $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
-      }
-    }
-
-  , hasContent: function () {
-      return this.getTitle()
-    }
-
-  , getPosition: function () {
-      var el = this.$element[0]
-      return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
-        width: el.offsetWidth
-      , height: el.offsetHeight
-      }, this.$element.offset())
-    }
-
-  , getTitle: function () {
-      var title
-        , $e = this.$element
-        , o = this.options
-
-      title = $e.attr('data-original-title')
-        || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
-
-      return title
-    }
-
-  , tip: function () {
-      return this.$tip = this.$tip || $(this.options.template)
-    }
-
-  , arrow: function(){
-      return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
-    }
-
-  , validate: function () {
-      if (!this.$element[0].parentNode) {
-        this.hide()
-        this.$element = null
-        this.options = null
-      }
-    }
-
-  , enable: function () {
-      this.enabled = true
-    }
-
-  , disable: function () {
-      this.enabled = false
-    }
-
-  , toggleEnabled: function () {
-      this.enabled = !this.enabled
-    }
-
-  , toggle: function (e) {
-      var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
-      self.tip().hasClass('in') ? self.hide() : self.show()
-    }
-
-  , destroy: function () {
-      this.hide().$element.off('.' + this.type).removeData(this.type)
-    }
-
-  }
-
-
- /* TOOLTIP PLUGIN DEFINITION
-  * ========================= */
-
-  var old = $.fn.tooltip
-
-  $.fn.tooltip = function ( option ) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('tooltip')
-        , options = typeof option == 'object' && option
-      if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.tooltip.Constructor = Tooltip
-
-  $.fn.tooltip.defaults = {
-    animation: true
-  , placement: 'top'
-  , selector: false
-  , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
-  , trigger: 'hover focus'
-  , title: ''
-  , delay: 0
-  , html: false
-  , container: false
-  }
-
-
- /* TOOLTIP NO CONFLICT
-  * =================== */
-
-  $.fn.tooltip.noConflict = function () {
-    $.fn.tooltip = old
-    return this
-  }
-
-}(window.jQuery);
-/* ===========================================================
- * bootstrap-popover.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#popovers
- * ===========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * =========================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* POPOVER PUBLIC CLASS DEFINITION
-  * =============================== */
-
-  var Popover = function (element, options) {
-    this.init('popover', element, options)
-  }
-
-
-  /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
-     ========================================== */
-
-  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
-
-    constructor: Popover
-
-  , setContent: function () {
-      var $tip = this.tip()
-        , title = this.getTitle()
-        , content = this.getContent()
-
-      $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
-      $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
-
-      $tip.removeClass('fade top bottom left right in')
-    }
-
-  , hasContent: function () {
-      return this.getTitle() || this.getContent()
-    }
-
-  , getContent: function () {
-      var content
-        , $e = this.$element
-        , o = this.options
-
-      content = (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
-        || $e.attr('data-content')
-
-      return content
-    }
-
-  , tip: function () {
-      if (!this.$tip) {
-        this.$tip = $(this.options.template)
-      }
-      return this.$tip
-    }
-
-  , destroy: function () {
-      this.hide().$element.off('.' + this.type).removeData(this.type)
-    }
-
-  })
-
-
- /* POPOVER PLUGIN DEFINITION
-  * ======================= */
-
-  var old = $.fn.popover
-
-  $.fn.popover = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('popover')
-        , options = typeof option == 'object' && option
-      if (!data) $this.data('popover', (data = new Popover(this, options)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.popover.Constructor = Popover
-
-  $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
-    placement: 'right'
-  , trigger: 'click'
-  , content: ''
-  , template: '<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
-  })
-
-
- /* POPOVER NO CONFLICT
-  * =================== */
-
-  $.fn.popover.noConflict = function () {
-    $.fn.popover = old
-    return this
-  }
-
-}(window.jQuery);
-/* =============================================================
- * bootstrap-scrollspy.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#scrollspy
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* SCROLLSPY CLASS DEFINITION
-  * ========================== */
-
-  function ScrollSpy(element, options) {
-    var process = $.proxy(this.process, this)
-      , $element = $(element).is('body') ? $(window) : $(element)
-      , href
-    this.options = $.extend({}, $.fn.scrollspy.defaults, options)
-    this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
-    this.selector = (this.options.target
-      || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
-      || '') + ' .nav li > a'
-    this.$body = $('body')
-    this.refresh()
-    this.process()
-  }
-
-  ScrollSpy.prototype = {
-
-      constructor: ScrollSpy
-
-    , refresh: function () {
-        var self = this
-          , $targets
-
-        this.offsets = $([])
-        this.targets = $([])
-
-        $targets = this.$body
-          .find(this.selector)
-          .map(function () {
-            var $el = $(this)
-              , href = $el.data('target') || $el.attr('href')
-              , $href = /^#\w/.test(href) && $(href)
-            return ( $href
-              && $href.length
-              && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
-          })
-          .sort(function (a, b) { return a[0] - b[0] })
-          .each(function () {
-            self.offsets.push(this[0])
-            self.targets.push(this[1])
-          })
-      }
-
-    , process: function () {
-        var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
-          , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
-          , maxScroll = scrollHeight - this.$scrollElement.height()
-          , offsets = this.offsets
-          , targets = this.targets
-          , activeTarget = this.activeTarget
-          , i
-
-        if (scrollTop >= maxScroll) {
-          return activeTarget != (i = targets.last()[0])
-            && this.activate ( i )
-        }
-
-        for (i = offsets.length; i--;) {
-          activeTarget != targets[i]
-            && scrollTop >= offsets[i]
-            && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
-            && this.activate( targets[i] )
-        }
-      }
-
-    , activate: function (target) {
-        var active
-          , selector
-
-        this.activeTarget = target
-
-        $(this.selector)
-          .parent('.active')
-          .removeClass('active')
-
-        selector = this.selector
-          + '[data-target="' + target + '"],'
-          + this.selector + '[href="' + target + '"]'
-
-        active = $(selector)
-          .parent('li')
-          .addClass('active')
-
-        if (active.parent('.dropdown-menu').length)  {
-          active = active.closest('li.dropdown').addClass('active')
-        }
-
-        active.trigger('activate')
-      }
-
-  }
-
-
- /* SCROLLSPY PLUGIN DEFINITION
-  * =========================== */
-
-  var old = $.fn.scrollspy
-
-  $.fn.scrollspy = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('scrollspy')
-        , options = typeof option == 'object' && option
-      if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.scrollspy.Constructor = ScrollSpy
-
-  $.fn.scrollspy.defaults = {
-    offset: 10
-  }
-
-
- /* SCROLLSPY NO CONFLICT
-  * ===================== */
-
-  $.fn.scrollspy.noConflict = function () {
-    $.fn.scrollspy = old
-    return this
-  }
-
-
- /* SCROLLSPY DATA-API
-  * ================== */
-
-  $(window).on('load', function () {
-    $('[data-spy="scroll"]').each(function () {
-      var $spy = $(this)
-      $spy.scrollspy($spy.data())
-    })
-  })
-
-}(window.jQuery);/* ========================================================
- * bootstrap-tab.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#tabs
- * ========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ======================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* TAB CLASS DEFINITION
-  * ==================== */
-
-  var Tab = function (element) {
-    this.element = $(element)
-  }
-
-  Tab.prototype = {
-
-    constructor: Tab
-
-  , show: function () {
-      var $this = this.element
-        , $ul = $this.closest('ul:not(.dropdown-menu)')
-        , selector = $this.attr('data-target')
-        , previous
-        , $target
-        , e
-
-      if (!selector) {
-        selector = $this.attr('href')
-        selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
-      }
-
-      if ( $this.parent('li').hasClass('active') ) return
-
-      previous = $ul.find('.active:last a')[0]
-
-      e = $.Event('show', {
-        relatedTarget: previous
-      })
-
-      $this.trigger(e)
-
-      if (e.isDefaultPrevented()) return
-
-      $target = $(selector)
-
-      this.activate($this.parent('li'), $ul)
-      this.activate($target, $target.parent(), function () {
-        $this.trigger({
-          type: 'shown'
-        , relatedTarget: previous
-        })
-      })
-    }
-
-  , activate: function ( element, container, callback) {
-      var $active = container.find('> .active')
-        , transition = callback
-            && $.support.transition
-            && $active.hasClass('fade')
-
-      function next() {
-        $active
-          .removeClass('active')
-          .find('> .dropdown-menu > .active')
-          .removeClass('active')
-
-        element.addClass('active')
-
-        if (transition) {
-          element[0].offsetWidth // reflow for transition
-          element.addClass('in')
-        } else {
-          element.removeClass('fade')
-        }
-
-        if ( element.parent('.dropdown-menu') ) {
-          element.closest('li.dropdown').addClass('active')
-        }
-
-        callback && callback()
-      }
-
-      transition ?
-        $active.one($.support.transition.end, next) :
-        next()
-
-      $active.removeClass('in')
-    }
-  }
-
-
- /* TAB PLUGIN DEFINITION
-  * ===================== */
-
-  var old = $.fn.tab
-
-  $.fn.tab = function ( option ) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('tab')
-      if (!data) $this.data('tab', (data = new Tab(this)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.tab.Constructor = Tab
-
-
- /* TAB NO CONFLICT
-  * =============== */
-
-  $.fn.tab.noConflict = function () {
-    $.fn.tab = old
-    return this
-  }
-
-
- /* TAB DATA-API
-  * ============ */
-
-  $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
-    e.preventDefault()
-    $(this).tab('show')
-  })
-
-}(window.jQuery);/* =============================================================
- * bootstrap-typeahead.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
- * =============================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-
-!function($){
-
-  "use strict"; // jshint ;_;
-
-
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
-  * ================================= */
-
-  var Typeahead = function (element, options) {
-    this.$element = $(element)
-    this.options = $.extend({}, $.fn.typeahead.defaults, options)
-    this.matcher = this.options.matcher || this.matcher
-    this.sorter = this.options.sorter || this.sorter
-    this.highlighter = this.options.highlighter || this.highlighter
-    this.updater = this.options.updater || this.updater
-    this.source = this.options.source
-    this.$menu = $(this.options.menu)
-    this.shown = false
-    this.listen()
-  }
-
-  Typeahead.prototype = {
-
-    constructor: Typeahead
-
-  , select: function () {
-      var val = this.$menu.find('.active').attr('data-value')
-      this.$element
-        .val(this.updater(val))
-        .change()
-      return this.hide()
-    }
-
-  , updater: function (item) {
-      return item
-    }
-
-  , show: function () {
-      var pos = $.extend({}, this.$element.position(), {
-        height: this.$element[0].offsetHeight
-      })
-
-      this.$menu
-        .insertAfter(this.$element)
-        .css({
-          top: pos.top + pos.height
-        , left: pos.left
-        })
-        .show()
-
-      this.shown = true
-      return this
-    }
-
-  , hide: function () {
-      this.$menu.hide()
-      this.shown = false
-      return this
-    }
-
-  , lookup: function (event) {
-      var items
-
-      this.query = this.$element.val()
-
-      if (!this.query || this.query.length < this.options.minLength) {
-        return this.shown ? this.hide() : this
-      }
-
-      items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
-
-      return items ? this.process(items) : this
-    }
-
-  , process: function (items) {
-      var that = this
-
-      items = $.grep(items, function (item) {
-        return that.matcher(item)
-      })
-
-      items = this.sorter(items)
-
-      if (!items.length) {
-        return this.shown ? this.hide() : this
-      }
-
-      return this.render(items.slice(0, this.options.items)).show()
-    }
-
-  , matcher: function (item) {
-      return ~item.toLowerCase().indexOf(this.query.toLowerCase())
-    }
-
-  , sorter: function (items) {
-      var beginswith = []
-        , caseSensitive = []
-        , caseInsensitive = []
-        , item
-
-      while (item = items.shift()) {
-        if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
-        else if (~item.indexOf(this.query)) caseSensitive.push(item)
-        else caseInsensitive.push(item)
-      }
-
-      return beginswith.concat(caseSensitive, caseInsensitive)
-    }
-
-  , highlighter: function (item) {
-      var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
-      return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
-        return '<strong>' + match + '</strong>'
-      })
-    }
-
-  , render: function (items) {
-      var that = this
-
-      items = $(items).map(function (i, item) {
-        i = $(that.options.item).attr('data-value', item)
-        i.find('a').html(that.highlighter(item))
-        return i[0]
-      })
-
-      items.first().addClass('active')
-      this.$menu.html(items)
-      return this
-    }
-
-  , next: function (event) {
-      var active = this.$menu.find('.active').removeClass('active')
-        , next = active.next()
-
-      if (!next.length) {
-        next = $(this.$menu.find('li')[0])
-      }
-
-      next.addClass('active')
-    }
-
-  , prev: function (event) {
-      var active = this.$menu.find('.active').removeClass('active')
-        , prev = active.prev()
-
-      if (!prev.length) {
-        prev = this.$menu.find('li').last()
-      }
-
-      prev.addClass('active')
-    }
-
-  , listen: function () {
-      this.$element
-        .on('focus',    $.proxy(this.focus, this))
-        .on('blur',     $.proxy(this.blur, this))
-        .on('keypress', $.proxy(this.keypress, this))
-        .on('keyup',    $.proxy(this.keyup, this))
-
-      if (this.eventSupported('keydown')) {
-        this.$element.on('keydown', $.proxy(this.keydown, this))
-      }
-
-      this.$menu
-        .on('click', $.proxy(this.click, this))
-        .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
-        .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
-    }
-
-  , eventSupported: function(eventName) {
-      var isSupported = eventName in this.$element
-      if (!isSupported) {
-        this.$element.setAttribute(eventName, 'return;')
-        isSupported = typeof this.$element[eventName] === 'function'
-      }
-      return isSupported
-    }
-
-  , move: function (e) {
-      if (!this.shown) return
-
-      switch(e.keyCode) {
-        case 9: // tab
-        case 13: // enter
-        case 27: // escape
-          e.preventDefault()
-          break
-
-        case 38: // up arrow
-          e.preventDefault()
-          this.prev()
-          break
-
-        case 40: // down arrow
-          e.preventDefault()
-          this.next()
-          break
-      }
-
-      e.stopPropagation()
-    }
-
-  , keydown: function (e) {
-      this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
-      this.move(e)
-    }
-
-  , keypress: function (e) {
-      if (this.suppressKeyPressRepeat) return
-      this.move(e)
-    }
-
-  , keyup: function (e) {
-      switch(e.keyCode) {
-        case 40: // down arrow
-        case 38: // up arrow
-        case 16: // shift
-        case 17: // ctrl
-        case 18: // alt
-          break
-
-        case 9: // tab
-        case 13: // enter
-          if (!this.shown) return
-          this.select()
-          break
-
-        case 27: // escape
-          if (!this.shown) return
-          this.hide()
-          break
-
-        default:
-          this.lookup()
-      }
-
-      e.stopPropagation()
-      e.preventDefault()
-  }
-
-  , focus: function (e) {
-      this.focused = true
-    }
-
-  , blur: function (e) {
-      this.focused = false
-      if (!this.mousedover && this.shown) this.hide()
-    }
-
-  , click: function (e) {
-      e.stopPropagation()
-      e.preventDefault()
-      this.select()
-      this.$element.focus()
-    }
-
-  , mouseenter: function (e) {
-      this.mousedover = true
-      this.$menu.find('.active').removeClass('active')
-      $(e.currentTarget).addClass('active')
-    }
-
-  , mouseleave: function (e) {
-      this.mousedover = false
-      if (!this.focused && this.shown) this.hide()
-    }
-
-  }
-
-
-  /* TYPEAHEAD PLUGIN DEFINITION
-   * =========================== */
-
-  var old = $.fn.typeahead
-
-  $.fn.typeahead = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('typeahead')
-        , options = typeof option == 'object' && option
-      if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.typeahead.defaults = {
-    source: []
-  , items: 8
-  , menu: '<ul class="typeahead dropdown-menu"></ul>'
-  , item: '<li><a href="#"></a></li>'
-  , minLength: 1
-  }
-
-  $.fn.typeahead.Constructor = Typeahead
-
-
- /* TYPEAHEAD NO CONFLICT
-  * =================== */
-
-  $.fn.typeahead.noConflict = function () {
-    $.fn.typeahead = old
-    return this
-  }
-
-
- /* TYPEAHEAD DATA-API
-  * ================== */
-
-  $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
-    var $this = $(this)
-    if ($this.data('typeahead')) return
-    $this.typeahead($this.data())
-  })
-
-}(window.jQuery);
-/* ==========================================================
- * bootstrap-affix.js v2.3.0
- * http://twitter.github.com/bootstrap/javascript.html#affix
- * ==========================================================
- * Copyright 2012 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ========================================================== */
-
-
-!function ($) {
-
-  "use strict"; // jshint ;_;
-
-
- /* AFFIX CLASS DEFINITION
-  * ====================== */
-
-  var Affix = function (element, options) {
-    this.options = $.extend({}, $.fn.affix.defaults, options)
-    this.$window = $(window)
-      .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
-      .on('click.affix.data-api',  $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
-    this.$element = $(element)
-    this.checkPosition()
-  }
-
-  Affix.prototype.checkPosition = function () {
-    if (!this.$element.is(':visible')) return
-
-    var scrollHeight = $(document).height()
-      , scrollTop = this.$window.scrollTop()
-      , position = this.$element.offset()
-      , offset = this.options.offset
-      , offsetBottom = offset.bottom
-      , offsetTop = offset.top
-      , reset = 'affix affix-top affix-bottom'
-      , affix
-
-    if (typeof offset != 'object') offsetBottom = offsetTop = offset
-    if (typeof offsetTop == 'function') offsetTop = offset.top()
-    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
-
-    affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
-      false    : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
-      'bottom' : offsetTop != null && scrollTop <= offsetTop ?
-      'top'    : false
-
-    if (this.affixed === affix) return
-
-    this.affixed = affix
-    this.unpin = affix == 'bottom' ? position.top - scrollTop : null
-
-    this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
-  }
-
-
- /* AFFIX PLUGIN DEFINITION
-  * ======================= */
-
-  var old = $.fn.affix
-
-  $.fn.affix = function (option) {
-    return this.each(function () {
-      var $this = $(this)
-        , data = $this.data('affix')
-        , options = typeof option == 'object' && option
-      if (!data) $this.data('affix', (data = new Affix(this, options)))
-      if (typeof option == 'string') data[option]()
-    })
-  }
-
-  $.fn.affix.Constructor = Affix
-
-  $.fn.affix.defaults = {
-    offset: 0
-  }
-
-
- /* AFFIX NO CONFLICT
-  * ================= */
-
-  $.fn.affix.noConflict = function () {
-    $.fn.affix = old
-    return this
-  }
-
-
- /* AFFIX DATA-API
-  * ============== */
-
-  $(window).on('load', function () {
-    $('[data-spy="affix"]').each(function () {
-      var $spy = $(this)
-        , data = $spy.data()
-
-      data.offset = data.offset || {}
-
-      data.offsetBottom && (data.offset.bottom = data.offsetBottom)
-      data.offsetTop && (data.offset.top = data.offsetTop)
-
-      $spy.affix(data)
-    })
-  })
-
-
-}(window.jQuery);

File diff suppressed because it is too large
+ 0 - 5
docs/theme/docker/static/js/vendor/bootstrap.min.js


File diff suppressed because it is too large
+ 0 - 2
docs/theme/docker/static/js/vendor/jquery-1.9.1.min.js


File diff suppressed because it is too large
+ 0 - 3
docs/theme/docker/static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js


+ 1 - 0
hack/CONTRIBUTORS.md

@@ -0,0 +1 @@
+../CONTRIBUTING.md

+ 1 - 0
hack/MAINTAINERS

@@ -1 +1,2 @@
 Solomon Hykes <solomon@dotcloud.com> (@shykes)
+Tianon Gravi <admwiggin@gmail.com> (@tianon)

+ 78 - 0
hack/MAINTAINERS.md

@@ -0,0 +1,78 @@
+# The Docker maintainer manual
+
+## Introduction
+
+Dear maintainer. Thank you for investing the time and energy to help make Docker as
+useful as possible. Maintaining a project is difficult, sometimes unrewarding work.
+Sure, you will get to contribute cool features to the project. But most of your time
+will be spent reviewing, cleaning up, documenting, andswering questions, justifying
+design decisions - while everyone has all the fun! But remember - the quality of the
+maintainers work is what distinguishes the good projects from the great.
+So please be proud of your work, even the unglamourous parts, and encourage a culture
+of appreciation and respect for *every* aspect of improving the project - not just the
+hot new features.
+
+This document is a manual for maintainers old and new. It explains what is expected of
+maintainers, how they should work, and what tools are available to them.
+
+This is a living document - if you see something out of date or missing, speak up!
+
+
+## What are a maintainer's responsibility?
+
+It is every maintainer's responsibility to:
+
+* 1) Expose a clear roadmap for improving their component.
+* 2) Deliver prompt feedback and decisions on pull requests.
+* 3) Be available to anyone with questions, bug reports, criticism etc. on their component. This includes irc, github requests and the mailing list.
+* 4) Make sure their component respects the philosophy, design and roadmap of the project.
+
+
+## How are decisions made?
+
+Short answer: with pull requests to the docker repository.
+
+Docker is an open-source project with an open design philosophy. This means that the repository is the source of truth for EVERY aspect of the project,
+including its philosophy, design, roadmap and APIs. *If it's part of the project, it's in the repo. It's in the repo, it's part of the project.*
+
+As a result, all decisions can be expressed as changes to the repository. An implementation change is a change to the source code. An API change is a change to
+the API specification. A philosophy change is a change to the philosophy manifesto. And so on.
+
+All decisions affecting docker, big and small, follow the same 3 steps:
+
+* Step 1: Open a pull request. Anyone can do this.
+
+* Step 2: Discuss the pull request. Anyone can do this.
+
+* Step 3: Accept or refuse a pull request. The relevant maintainer does this (see below "Who decides what?")
+
+
+## Who decides what?
+
+So all decisions are pull requests, and the relevant maintainer makes the decision by accepting or refusing the pull request.
+But how do we identify the relevant maintainer for a given pull request?
+
+Docker follows the timeless, highly efficient and totally unfair system known as [Benevolent dictator for life](http://en.wikipedia.org/wiki/Benevolent_Dictator_for_Life),
+with yours truly, Solomon Hykes, in the role of BDFL.
+This means that all decisions are made by default by me. Since making every decision myself would be highly unscalable, in practice decisions are spread across multiple maintainers.
+
+The relevant maintainer for a pull request is assigned in 3 steps:
+
+* Step 1: Determine the subdirectory affected by the pull request. This might be src/registry, docs/source/api, or any other part of the repo.
+
+* Step 2: Find the MAINTAINERS file which affects this directory. If the directory itself does not have a MAINTAINERS file, work your way up the the repo hierarchy until you find one.
+
+* Step 3: The first maintainer listed is the primary maintainer. The pull request is assigned to him. He may assign it to other listed maintainers, at his discretion.
+
+
+### I'm a maintainer, should I make pull requests too?
+
+Yes. Nobody should ever push to master directly. All changes should be made through a pull request.
+
+### Who assigns maintainers?
+
+Solomon.
+
+### How is this process changed?
+
+Just like everything else: by making a pull request :)

+ 1 - 0
hack/PACKAGERS.md

@@ -116,6 +116,7 @@ To run properly, docker needs the following software to be installed at runtime:
 * iptables version 1.4 or later
 * The lxc utility scripts (http://lxc.sourceforge.net) version 0.8 or later.
 * Git version 1.7 or later 
+* XZ Utils 4.9 or later
 
 ## Kernel dependencies
 

+ 24 - 0
hack/README.md

@@ -0,0 +1,24 @@
+# Hacking on Docker
+
+The hack/ directory holds information and tools for everyone involved in the process of creating and
+distributing Docker, specifically:
+
+## Guides
+
+If you're a *contributor* or aspiring contributor, you should read CONTRIBUTORS.md.
+
+If you're a *maintainer* or aspiring maintainer, you should read MAINTAINERS.md.
+
+If you're a *packager* or aspiring packager, you should read PACKAGERS.md.
+
+If you're a maintainer in charge of a *release*, you should read RELEASE-CHECKLIST.md.
+
+## Roadmap
+
+A high-level roadmap is available at ROADMAP.md.
+
+
+## Build tools
+
+make.sh is the primary build tool for docker. It is used for compiling the official binary,
+running the test suite, and pushing releases.

+ 0 - 28
hack/README.rst

@@ -1,28 +0,0 @@
-This directory contains material helpful for hacking on docker.
-
-make hack
-=========
-
-Set up an Ubuntu 12.04 virtual machine for developers including kernel 3.8
-go1.1 and buildbot. The environment is setup in a way that can be used through
-the usual go workflow and/or the root Makefile. You can either edit on
-your host, or inside the VM (using make ssh-dev) and run and test docker
-inside the VM.
-
-dependencies: vagrant, virtualbox packages and python package requests
-
-
-Buildbot
-~~~~~~~~
-
-Buildbot is a continuous integration system designed to automate the
-build/test cycle. By automatically rebuilding and testing the tree each time
-something has changed, build problems are pinpointed quickly, before other
-developers are inconvenienced by the failure.
-
-When running 'make hack' at the docker root directory, it spawns a virtual
-machine in the background running a buildbot instance and adds a git
-post-commit hook that automatically run docker tests for you each time you
-commit in your local docker repository.
-
-You can check your buildbot instance at http://192.168.33.21:8010/waterfall

+ 22 - 11
hack/RELEASE-CHECKLIST.md

@@ -55,11 +55,15 @@ EXAMPLES:
 
 ### 4. Run all tests
 
-```bash
-go test
-```
+FIXME
+
+### 5. Test the docs
 
-### 5. Commit and create a pull request
+Make sure that your tree includes documentation for any modified or
+new features, syntax or semantic changes. Instructions for building
+the docs are in ``docs/README.md``
+
+### 6. Commit and create a pull request to the "release" branch
 
 ```bash
 git add CHANGELOG.md
@@ -67,12 +71,12 @@ git commit -m "Bump version to $VERSION"
 git push origin bump_$VERSION
 ```
 
-### 6. Get 2 other maintainers to validate the pull request
+### 7. Get 2 other maintainers to validate the pull request
 
-### 7. Merge the pull request and apply tags
+### 8. Merge the pull request and apply tags
 
 ```bash
-git checkout master
+git checkout release
 git merge bump_$VERSION
 git tag -a v$VERSION # Don't forget the v!
 git tag -f -a latest
@@ -80,20 +84,27 @@ git push
 git push --tags
 ```
 
-### 8. Publish binaries
+Merging the pull request to the release branch will automatically
+update the documentation on the "latest" revision of the docs. You
+should see the updated docs 5-10 minutes after the merge. The docs
+will appear on http://docs.docker.io/. For more information about
+documentation releases, see ``docs/README.md``
+
+### 9. Publish binaries
 
 To run this you will need access to the release credentials.
 Get them from [the infrastructure maintainers](
 https://github.com/dotcloud/docker/blob/master/hack/infrastructure/MAINTAINERS).
 
 ```bash
-docker build -t releasedocker .
+docker build -t docker .
 docker run  \
 	-e AWS_S3_BUCKET=get-nightly.docker.io \
 	-e AWS_ACCESS_KEY=$(cat ~/.aws/access_key) \
 	-e AWS_SECRET_KEY=$(cat ~/.aws/secret_key) \
 	-e GPG_PASSPHRASE=supersecretsesame \
-	releasedocker
+	docker
+	hack/release.sh
 ```
 
 It will build and upload the binaries on the specified bucket (you should
@@ -101,6 +112,6 @@ use get-nightly.docker.io for general testing, and once everything is fine,
 switch to get.docker.io).
 
 
-### 9. Rejoice!
+### 10. Rejoice!
 
 Congratulations! You're done.

+ 0 - 36
hack/Vagrantfile

@@ -1,36 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-BOX_NAME = "ubuntu-dev"
-BOX_URI = "http://files.vagrantup.com/precise64.box"
-VM_IP = "192.168.33.21"
-USER = "vagrant"
-GOPATH = "/data/docker"
-DOCKER_PATH = "#{GOPATH}/src/github.com/dotcloud/docker"
-CFG_PATH = "#{DOCKER_PATH}/hack/environment"
-BUILDBOT_PATH = "/data/buildbot"
-
-Vagrant::Config.run do |config|
-  # Setup virtual machine box
-  config.vm.box = BOX_NAME
-  config.vm.box_url = BOX_URI
-  config.vm.share_folder "v-data", DOCKER_PATH, "#{File.dirname(__FILE__)}/.."
-  config.vm.network :hostonly, VM_IP
-  # Stop if deployment has been done
-  config.vm.provision :shell, :inline => "[ ! -f /usr/bin/git ]"
-  # Touch for makefile
-  pkg_cmd = "touch #{DOCKER_PATH}; "
-  # Install docker dependencies
-  pkg_cmd << "apt-get update -qq; apt-get install -y python-software-properties; " \
-    "add-apt-repository -y ppa:dotcloud/docker-golang/ubuntu; apt-get update -qq; " \
-    "apt-get install -y linux-image-generic-lts-raring lxc git aufs-tools golang-stable make; " \
-    "chown -R #{USER}.#{USER} #{GOPATH}; " \
-    "install -m 0664 #{CFG_PATH}/bash_profile /home/#{USER}/.bash_profile"
-  config.vm.provision :shell, :inline => pkg_cmd
-  # Deploy buildbot CI
-  pkg_cmd = "apt-get install -q -y python-dev python-pip supervisor; " \
-    "pip install -q -r #{CFG_PATH}/requirements.txt; " \
-    "chown #{USER}.#{USER} /data; cd /data; " \
-    "#{CFG_PATH}/setup.sh #{USER} #{GOPATH} #{DOCKER_PATH} #{CFG_PATH} #{BUILDBOT_PATH}"
-  config.vm.provision :shell, :inline => pkg_cmd
-end

+ 0 - 1
hack/environment/README.rst

@@ -1 +0,0 @@
-Files used to setup the developer virtual machine

+ 0 - 19
hack/environment/bash_profile

@@ -1,19 +0,0 @@
-# ~/.bash_profile : executed by the command interpreter for login shells.
-
-# if running bash
-if [ -n "$BASH_VERSION" ]; then
-    # include .bashrc if it exists
-    if [ -f "$HOME/.bashrc" ]; then
-        . "$HOME/.bashrc"
-    fi
-fi
-
-# set PATH so it includes user's private bin if it exists
-[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH"
-
-docker=/data/docker/src/github.com/dotcloud/docker
-[ -d $docker ] && cd $docker
-
-export GOPATH=/data/docker
-export PATH=$PATH:$GOPATH/bin
-

+ 0 - 18
hack/environment/buildbot.conf

@@ -1,18 +0,0 @@
-[program:buildmaster]
-command=su vagrant -c "buildbot start master"
-directory=/data/buildbot
-chown= root:root
-redirect_stderr=true
-stdout_logfile=/var/log/supervisor/buildbot-master.log
-stderr_logfile=/var/log/supervisor/buildbot-master.log
-
-[program:buildworker]
-command=buildslave start slave
-directory=/data/buildbot
-chown= root:root
-redirect_stderr=true
-stdout_logfile=/var/log/supervisor/buildbot-slave.log
-stderr_logfile=/var/log/supervisor/buildbot-slave.log
-
-[group:buildbot]
-programs=buildmaster,buildworker

+ 0 - 43
hack/environment/master.cfg

@@ -1,43 +0,0 @@
-import os
-from buildbot.buildslave import BuildSlave
-from buildbot.schedulers.forcesched import ForceScheduler
-from buildbot.config import BuilderConfig
-from buildbot.process.factory import BuildFactory
-from buildbot.steps.shell import ShellCommand
-from buildbot.status import html
-from buildbot.status.web import authz, auth
-
-PORT_WEB = 8010         # Buildbot webserver port
-PORT_MASTER = 9989      # Port where buildbot master listen buildworkers
-TEST_USER = 'buildbot'  # Credential to authenticate build triggers
-TEST_PWD = 'docker'     # Credential to authenticate build triggers
-BUILDER_NAME = 'docker'
-BUILDPASSWORD = 'pass-docker'  # Credential to authenticate buildworkers
-GOPATH = '/data/docker'
-DOCKER_PATH = '{0}/src/github.com/dotcloud/docker'.format(GOPATH)
-
-c = BuildmasterConfig = {}
-
-c['title'] = "Docker"
-c['titleURL'] = "waterfall"
-c['buildbotURL'] = "http://localhost:{0}/".format(PORT_WEB)
-c['db'] = {'db_url':"sqlite:///state.sqlite"}
-c['slaves'] = [BuildSlave('buildworker', BUILDPASSWORD)]
-c['slavePortnum'] = PORT_MASTER
-
-c['schedulers'] = [ForceScheduler(name='trigger',builderNames=[BUILDER_NAME])]
-
-# Docker test command
-test_cmd = "GOPATH={0} make -C {1} test".format(GOPATH,DOCKER_PATH)
-
-# Builder
-factory = BuildFactory()
-factory.addStep(ShellCommand(description='Docker',logEnviron=False,
-    usePTY=True,command=test_cmd))
-c['builders'] = [BuilderConfig(name=BUILDER_NAME,slavenames=['buildworker'],
-    factory=factory)]
-
-# Status
-authz_cfg=authz.Authz(auth=auth.BasicAuth([(TEST_USER,TEST_PWD)]),
-    forceBuild='auth')
-c['status'] = [html.WebStatus(http_port=PORT_WEB, authz=authz_cfg)]

+ 0 - 21
hack/environment/post-commit

@@ -1,21 +0,0 @@
-#!/usr/bin/env python
-
-'''Trigger buildbot docker test build
-
-   post-commit git hook designed to automatically trigger buildbot on
-   the provided vagrant docker VM.'''
-
-import requests
-
-USERNAME = 'buildbot'
-PASSWORD = 'docker'
-BASE_URL = 'http://localhost:8010'
-path = lambda s: BASE_URL + '/' + s
-
-try:
-    session = requests.session()
-    session.post(path('login'),data={'username':USERNAME,'passwd':PASSWORD})
-    session.post(path('builders/docker/force'),
-        data={'forcescheduler':'trigger','reason':'Test commit'})
-except:
-    pass

+ 0 - 6
hack/environment/requirements.txt

@@ -1,6 +0,0 @@
-sqlalchemy<=0.7.9
-sqlalchemy-migrate>=0.7.2
-buildbot==0.8.7p1
-buildbot_slave==0.8.7p1
-nose==1.2.1
-requests==1.1.0

+ 0 - 45
hack/environment/setup.sh

@@ -1,45 +0,0 @@
-#!/bin/bash
-
-# Setup of buildbot configuration. Package installation is being done by
-# Vagrantfile
-# Dependencies: buildbot, buildbot-slave, supervisor
-
-USER=$1
-GOPATH=$2
-DOCKER_PATH=$3
-CFG_PATH=$4
-BUILDBOT_PATH=$5
-SLAVE_NAME="buildworker"
-SLAVE_SOCKET="localhost:9989"
-BUILDBOT_PWD="pass-docker"
-IP=$(sed -nE 's/VM_IP = "(.+)"/\1/p' ${DOCKER_PATH}/hack/Vagrantfile)
-export PATH="/bin:sbin:/usr/bin:/usr/sbin:/usr/local/bin"
-
-function run { su $USER -c "$1"; }
-
-# Exit if buildbot has already been installed
-[ -d "$BUILDBOT_PATH" ] && exit 0
-
-# Setup buildbot
-run "mkdir -p $BUILDBOT_PATH"
-cd $BUILDBOT_PATH
-run "buildbot create-master master"
-run "cp $CFG_PATH/master.cfg master"
-run "sed -i 's/localhost/$IP/' master/master.cfg"
-run "sed -i -E 's#(GOPATH = ).+#\1\"$GOPATH\"#' master/master.cfg"
-run "sed -i -E 's#(DOCKER_PATH = ).+#\1\"$DOCKER_PATH\"#' master/master.cfg"
-run "buildslave create-slave slave $SLAVE_SOCKET $SLAVE_NAME $BUILDBOT_PWD"
-
-# Allow buildbot subprocesses (docker tests) to properly run in containers,
-# in particular with docker -u
-run "sed -i 's/^umask = None/umask = 000/' slave/buildbot.tac"
-
-# Setup supervisor
-cp $CFG_PATH/buildbot.conf /etc/supervisor/conf.d/buildbot.conf
-sed -i -E "s/^chmod=0700.+/chmod=0770\nchown=root:$USER/" /etc/supervisor/supervisord.conf
-kill -HUP $(pgrep -f "/usr/bin/python /usr/bin/supervisord")
-
-# Add git hook
-cp $CFG_PATH/post-commit $DOCKER_PATH/.git/hooks
-sed -i "s/localhost/$IP/" $DOCKER_PATH/.git/hooks/post-commit
-

+ 80 - 2
hack/infrastructure/README.md

@@ -1,5 +1,83 @@
 # Docker project infrastructure
 
-This directory holds all information about the technical infrastructure of the docker project; servers, dns, email, and all the corresponding tools and configuration.
+This is an overview of the Docker infrastructure.
 
-Obviously credentials should not be stored in this repo, but how to obtain and use them should be documented here.
+**Note: obviously, credentials should not be stored in this repository.**
+However, when there are credentials, we should list how to obtain them
+(e.g. who has them).
+
+
+## Providers
+
+This should be the list of all the entities providing some kind of
+infrastructure service to the Docker project (either for free,
+or paid by dotCloud).
+
+
+Provider      | Service
+--------------|-------------------------------------------------
+AWS           | packages (S3 bucket), dotCloud PAAS, dev-env, ci
+CloudFlare    | cdn
+Digital Ocean | ci
+dotCloud PAAS | website, index, registry, ssl, blog
+DynECT        | dns (docker.io)            
+GitHub        | repository
+Linode        | stackbrew
+Mailgun       | outgoing e-mail            
+ReadTheDocs   | docs
+
+*Ordered-by: lexicographic*
+
+
+## URLs
+
+This should be the list of all the infrastructure-related URLs
+and which service is handling them.
+
+URL                                          | Service
+---------------------------------------------|---------------------------------
+ http://blog.docker.io/                      | blog
+*http://cdn-registry-1.docker.io/            | registry (pull)
+ http://debug.docker.io/                     | debug tool
+ http://docs.docker.io/                      | docsproxy (proxy to readthedocs)
+ http://docker-ci.dotcloud.com/              | ci
+ http://docker.io/                           | redirect to www.docker.io (dynect)
+ http://docker.readthedocs.org/              | docs
+*http://get.docker.io/                       | packages
+ https://github.com/dotcloud/docker          | repository
+*https://index.docker.io/                    | index
+ http://registry-1.docker.io/                | registry (push)
+ http://staging-docker-ci.dotcloud.com/      | ci
+*http://test.docker.io/                      | packages
+*http://www.docker.io/                       | website
+ http://? (internal URL, not for public use) | stackbrew
+
+*Ordered-by: lexicographic*
+
+**Note:** an asterisk in front of the URL means that it is cached by CloudFlare.
+
+
+## Services
+
+This should be the list of all services referenced above.
+
+Service             | Maintainer(s)      | How to update    | Source
+--------------------|--------------------|------------------|-------
+blog                | @jbarbier          | dotcloud push    | https://github.com/dotcloud/blog.docker.io
+cdn                 | @jpetazzo @samalba | cloudflare panel | N/A
+ci                  | @mzdaniel          | See [docker-ci]  | See [docker-ci]
+docs                | @metalivedev       | github webhook   | docker repo
+docsproxy           | @dhrp              | dotcloud push    | https://github.com/dotcloud/docker-docs-dotcloud-proxy
+index               | @kencochrane       | dotcloud push    | private
+packages            | @jpetazzo          | hack/release     | docker repo
+registry            | @samalba           | dotcloud push    | https://github.com/dotcloud/docker-registry
+repository (github) | N/A                | N/A              | N/A
+ssl (dotcloud)      | @jpetazzo          | dotcloud ops     | N/A
+ssl (cloudflare)    | @jpetazzo          | cloudflare panel | N/A
+stackbrew           | @shin-             | manual           | https://github.com/dotcloud/stackbrew/stackbrew
+website             | @dhrp              | dotcloud push    | https://github.com/dotcloud/www.docker.io
+
+*Ordered-by: lexicographic*
+
+
+[docker-ci]: docker-ci.rst

+ 43 - 2
hack/infrastructure/docker-ci.rst

@@ -1,5 +1,38 @@
-docker-ci github pull request
-=============================
+docker-ci
+=========
+
+docker-ci is our buildbot continuous integration server,
+building and testing docker, hosted on EC2 and reachable at
+http://docker-ci.dotcloud.com
+
+
+Deployment
+==========
+
+# Load AWS credentials
+export AWS_ACCESS_KEY_ID=''
+export AWS_SECRET_ACCESS_KEY=''
+export AWS_KEYPAIR_NAME=''
+export AWS_SSH_PRIVKEY=''
+
+# Load buildbot credentials and config
+export BUILDBOT_PWD=''
+export IRC_PWD=''
+export IRC_CHANNEL='docker-dev'
+export SMTP_USER=''
+export SMTP_PWD=''
+export EMAIL_RCP=''
+
+# Load registry test credentials
+export REGISTRY_USER=''
+export REGISTRY_PWD=''
+
+cd docker/testing
+vagrant up --provider=aws
+
+
+github pull request
+===================
 
 The entire docker pull request test workflow is event driven by github. Its
 usage is fully automatic and the results are logged in docker-ci.dotcloud.com
@@ -13,3 +46,11 @@ buildbot (0.8.7p1) was patched using ./testing/buildbot/github.py, so it
 can understand the PR data github sends to it. Originally PR #1603 (ee64e099e0)
 implemented this capability. Also we added a new scheduler to exclusively filter
 PRs. and the 'pullrequest' builder to rebase the PR on top of master and test it.
+
+
+nighthly release
+================
+
+The nightly release process is done by buildbot, running a DinD container that downloads
+the docker repository and builds the release container. The resulting docker
+binary is then tested, and if everything is fine, the release is done.

+ 43 - 0
hack/infrastructure/docker-ci/Dockerfile

@@ -0,0 +1,43 @@
+# VERSION:        0.22
+# DOCKER-VERSION  0.6.3
+# AUTHOR:         Daniel Mizyrycki <daniel@dotcloud.com>
+# DESCRIPTION:    Deploy docker-ci on Amazon EC2
+# COMMENTS:
+#     CONFIG_JSON is an environment variable json string loaded as:
+#
+# export CONFIG_JSON='
+#     { "AWS_TAG":             "EC2_instance_name",
+#       "AWS_ACCESS_KEY":      "EC2_access_key",
+#       "AWS_SECRET_KEY":      "EC2_secret_key",
+#       "DOCKER_CI_PUB":       "$(cat docker-ci_ssh_public_key.pub)",
+#       "DOCKER_CI_KEY":       "$(cat docker-ci_ssh_private_key.key)",
+#       "BUILDBOT_PWD":        "Buildbot_server_password",
+#       "IRC_PWD":             "Buildbot_IRC_password",
+#       "SMTP_USER":           "SMTP_server_user",
+#       "SMTP_PWD":            "SMTP_server_password",
+#       "PKG_ACCESS_KEY":      "Docker_release_S3_bucket_access_key",
+#       "PKG_SECRET_KEY":      "Docker_release_S3_bucket_secret_key",
+#       "PKG_GPG_PASSPHRASE":  "Docker_release_gpg_passphrase",
+#       "INDEX_AUTH":          "Index_encripted_user_password",
+#       "REGISTRY_USER":       "Registry_test_user",
+#       "REGISTRY_PWD":        "Registry_test_password",
+#       "REGISTRY_BUCKET":     "Registry_S3_bucket_name",
+#       "REGISTRY_ACCESS_KEY": "Registry_S3_bucket_access_key",
+#       "REGISTRY_SECRET_KEY": "Registry_S3_bucket_secret_key",
+#       "IRC_CHANNEL":         "Buildbot_IRC_channel",
+#       "EMAIL_RCP":           "Buildbot_mailing_receipient" }'
+#
+#
+# TO_BUILD:   docker build -t docker-ci .
+# TO_DEPLOY:  docker run -e CONFIG_JSON="${CONFIG_JSON}" docker-ci
+
+from ubuntu:12.04
+
+run echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
+run apt-get update; apt-get install -y python2.7 python-dev python-pip ssh rsync less vim
+run pip install boto fabric
+
+# Add deployment code and set default container command
+add . /docker-ci
+cmd "/docker-ci/deployment.py"
+

+ 0 - 0
packaging/MAINTAINERS → hack/infrastructure/docker-ci/MAINTAINERS


+ 26 - 0
hack/infrastructure/docker-ci/README.rst

@@ -0,0 +1,26 @@
+=======
+testing
+=======
+
+This directory contains docker-ci testing related files.
+
+
+Buildbot
+========
+
+Buildbot is a continuous integration system designed to automate the
+build/test cycle. By automatically rebuilding and testing the tree each time
+something has changed, build problems are pinpointed quickly, before other
+developers are inconvenienced by the failure.
+
+We are running buildbot in Amazon's EC2 to verify docker passes all
+tests when commits get pushed to the master branch and building
+nightly releases using Docker in Docker awesome implementation made
+by Jerome Petazzoni.
+
+https://github.com/jpetazzo/dind
+
+Docker's buildbot instance is at http://docker-ci.dotcloud.com/waterfall
+
+For deployment instructions, please take a look at
+hack/infrastructure/docker-ci/Dockerfile

Some files were not shown because too many files changed in this diff