Tabs-based organization (#1420)

* First pass of tabs-based organization

* Improvements

* Second pass at tabs org

* Move tab highlighting to Liquid instead of JS

* Adding forwarding links for in-product TOCs

* Move to pre-rendered left-navs instead of post-load JS for TOC sync

* Optimizations and nosync-ing the Reference section

* Optimizations, fix Cloud YAML

* Make a "Sample applications" node

* Tabs CSS fixes and 12-factor reposition

* Fix auto-complete left-padding

* Fix auto-complete right-padding (for symmetry)

* Fix for no left-nav on Compose file

* Fix weird wrapping on smaller screens for tabs

* reorganized d4mac, d4win per tabs structure, split out install guides

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* Update reference urls to latest DDC version

* Reintroduces changes ebe778b..9abc9e to TOC

* Update allpagelinks.md

* hid the on-page TOC's for d4mac d4win topics as needed

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* Add a Hopscotch tour of the new navigation
This commit is contained in:
John Mulhausen 2017-02-15 17:23:45 -08:00 committed by GitHub
parent 639269927b
commit b513ecde18
33 changed files with 3462 additions and 1525 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1 @@
{% for item in tree %}{% if item.heading %}{% else %}{% if item.sectiontitle %}<li class="leaf menu-closed"><a href="javascript:void(0)" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>{{ item.sectiontitle }}</a>
<ul class="nav-sub">
{% assign tree = item.section %}{% include tree.html %}
</ul>
{% else %}
<li class="leaf"><a href="{{ item.path }}" class="{% if item.path == page.url %}active currentPage{% endif %}">{{ item.title }}</a></li>{% endif %}{% endif %}{% endfor %}
{% assign foundBranch="false" %}{% for item in tree %}{% if item.sectiontitle %}{% if foundBranch=="false" %}{% capture treeString %}{{ item.section | downcase }}{% endcapture %}{% capture pageURLString %}"{{ page.url }}"{% endcapture %}{% else %}{% assign treeString="" %}{% endif %}<li class="leaf {% if treeString contains pageURLString %}{% assign foundBranch="true"%}menu-open{% else %}menu-closed{% endif %}"><a href="javascript:void(0)" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>{{ item.sectiontitle }}</a><ul class="nav-sub">{% assign tree = item.section %}{% include tree.html %}</ul>{% else %}<li class="leaf"><a href="{{ item.path }}" class="{% if item.path == page.url and item.nosync != true %}active currentPage{% endif %}">{{ item.title }}</a></li>{% endif %}{% endfor %}

View File

@ -0,0 +1,14 @@
{% assign topicFound="false" %}
{% for section in site.data.toc.horizontalnav %}
{% assign activeCSS = "" %}
{% if topicFound=="false" %}
{% assign tree = site.data.toc[section.node] %}
{% capture thisSection %}{% include tree.html %}{% endcapture %}
{% if section.path == page.url or thisSection contains "active currentPage" %}
{% capture leftnav %}{{ thisSection }}{% endcapture %}
{% capture activeCSS %} class="active"{% endcapture %}
{% assign topicFound="true" %}
{% endif %}
{% endif %}
<li id="{{ section.node }}"{{ activeCSS }}><a href="{{ section.path }}">{{ section.title }}</a></li>
{% endfor %}

View File

@ -75,6 +75,7 @@ ng\:form {
<link rel="stylesheet" href="/css/p2p.css">
<link rel="stylesheet" href="/css/mobile_responsive.css">
<link rel="stylesheet" href="/css/temporary.css">
<link rel="stylesheet" href="/css/hopscotch.css">
<link rel="stylesheet" href="/css/documentation.css">
<script async="" src="/js/modernizr.min.js"></script>
<meta class="foundation-data-attribute-namespace">
@ -192,22 +193,27 @@ ng\:form {
</aside>
<div class="dockercon16">
<section class="title_section darkblue"> </section>
<div class="">
<div id="top-nav-container" class="col-xs-12" style="background-color: #254356">
<!-- tabs -->
<ul id="top-nav" class="tabs col-xs-12 col-sm-10 col-md-10">
{% include treebuilder.html %}
</ul>
<div id="start-tour-container" class="hidden-xs col-sm-2 col-md-2"><div id="start-tour">Tour our new<br />navigation!</div></div>
</div>
<div class="" ng-non-bindable>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-2 col-xl-2 docsidebarnav_section">
<div class="region region-hero-sub">
{% if page.tree == false %}
<ul class="nav-sub"><li class="leaf"><a href="/">Back to the index</a></li></ul>
{% else %}
<ul class="nav-sub">
{% assign tree = site.data.toc.toc %}
{% include tree.html %}
</ul>
{% endif %}
<div class="region region-hero-sub"><ul id="left-nav" class="nav-sub">
{% if page.tree == false %}
<li class="leaf"><a href="/">Back to the index</a></li>
{% else %}
{{ leftnav }}
{% endif %}
</ul>
</div>
</div>
<div class="col-xs-12 col-sm-9 col-md-8 col-xl-9">
<div id="main-content" class="col-xs-12 col-sm-9 col-md-8 col-xl-9">
<section class="section" id="DocumentationText">
{% if page.title %}<h1>{{ page.title }}</h1>{% endif %}
{% if page.advisory %}<blockquote style="border-left: 6px solid #FFD601; background: -webkit-gradient(linear, left top, left bottom, from(#FBFCFC), to(#EBEDEF));">{{ site.data.advisories.texts[page.advisory] | markdownify }}</blockquote>{% endif %}
@ -409,6 +415,8 @@ background-image: linear-gradient(to bottom, #75ae4c, #99c47c);
<script async="" src="/js/menu.js"></script>
<script async="" src="/js/app.js"></script>
<script async="" src="/js/anchorlinks.js"></script>
<script src="/js/hopscotch.js"></script>
<script src="/js/my_first_tour.js"></script>
</div>
<div id="mktoStyleLoaded" style="display: none; border-top-color: rgb(18, 52, 86);"></div>
<form class="ng-pristine ng-valid mktoForm mktoHasWidth mktoLayoutLeft" novalidate style="font-family: Helvetica, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); visibility: hidden; position: absolute; top: -500px; left: -1000px; width: 1602px;">

View File

@ -1,5 +1,4 @@
---
title: All Page Links
hide_from_sitemap: true
layout: null
---

View File

@ -1,6 +1,62 @@
/* FIXUP allcss.css */
/* @media screen and (max-width: 1199px) */
/*
*
* Tabs ***********************************************************************
*
*/
.tabs {
border-bottom: 0;
padding: 0px;
}
.tabs>li {
float: left;
list-style: none;
padding: 10px 0px 0px 0px;
}
.tabs>li>a {
color: #fff;
border-bottom: 4px solid #254356;
line-height: 3;
border-radius: 0;
padding: 0 20px 0px 20px;
float: left;
opacity: .8;
}
.tabs>li.active>a {
color: #fff;
border-bottom: 4px solid #fff;
opacity: 1;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
transition: all 0.2s ease;
font-weight: 500;
}
.tabs>li>a:hover {
border-bottom: 4px solid #fff;
opacity: 1;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.tabs>li:hover {
color: #fff;
background-color: gray;
opacity: 1;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.logo {
margin-top: 1px !important;
width: auto !important;
@ -14,7 +70,7 @@
{
list-style-type: none;
width: 400px;
padding:0px;
padding: 0px 10px 0px 10px;
margin-bottom: 0px;
}
.autoCompleteResult {
@ -462,3 +518,31 @@ img.with-border {
color: #999;
font-style: italic;
}
#top-nav {
float: left;
}
#start-tour-container {
padding-top: 10px;
padding-bottom: 0;
padding-right: 0;
float: right;
vertical-align: middle;
text-align: center;
}
#start-tour {
cursor: pointer;
color: #fff;
font-family: 'Geomanist', san-serif;
font-size: 1em;
line-height: 1.3;
text-align: center;
vertical-align: middle;
width: 110px;
float: right;
}
#start-tour:hover {
opacity: .8;
}

430
css/hopscotch.css Normal file
View File

@ -0,0 +1,430 @@
/**! hopscotch - v0.2.6
*
* Copyright 2016 LinkedIn Corp. All rights reserved.
*
* 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.
*/
.animated {
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-ms-animation-fill-mode: both;
-o-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-duration: 1s;
-moz-animation-duration: 1s;
-ms-animation-duration: 1s;
-o-animation-duration: 1s;
animation-duration: 1s;
}
@-webkit-keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(20px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}@-moz-keyframes fadeInUp {
0% {
opacity: 0;
-moz-transform: translateY(20px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}@-o-keyframes fadeInUp {
0% {
opacity: 0;
-o-transform: translateY(20px);
}
100% {
opacity: 1;
-o-transform: translateY(0);
}
}@keyframes fadeInUp {
0% {
opacity: 0;
transform: translateY(20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}.fade-in-up {
-webkit-animation-name: fadeInUp;
-moz-animation-name: fadeInUp;
-o-animation-name: fadeInUp;
animation-name: fadeInUp;
}
@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-20px);
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-20px);
}
100% {
opacity: 1;
-moz-transform: translateY(0);
}
}@-o-keyframes fadeInDown {
0% {
opacity: 0;
-ms-transform: translateY(-20px);
}
100% {
opacity: 1;
-ms-transform: translateY(0);
}
}@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}.fade-in-down {
-webkit-animation-name: fadeInDown;
-moz-animation-name: fadeInDown;
-o-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@-webkit-keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translateX(-20px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}@-moz-keyframes fadeInRight {
0% {
opacity: 0;
-moz-transform: translateX(-20px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}@-o-keyframes fadeInRight {
0% {
opacity: 0;
-o-transform: translateX(-20px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}@keyframes fadeInRight {
0% {
opacity: 0;
transform: translateX(-20px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}.fade-in-right {
-webkit-animation-name: fadeInRight;
-moz-animation-name: fadeInRight;
-o-animation-name: fadeInRight;
animation-name: fadeInRight;
}
@-webkit-keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(20px);
}
100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}@-moz-keyframes fadeInLeft {
0% {
opacity: 0;
-moz-transform: translateX(20px);
}
100% {
opacity: 1;
-moz-transform: translateX(0);
}
}@-o-keyframes fadeInLeft {
0% {
opacity: 0;
-o-transform: translateX(20px);
}
100% {
opacity: 1;
-o-transform: translateX(0);
}
}@keyframes fadeInLeft {
0% {
opacity: 0;
transform: translateX(20px);
}
100% {
opacity: 1;
transform: translateX(0);
}
}.fade-in-left {
-webkit-animation-name: fadeInLeft;
-moz-animation-name: fadeInLeft;
-o-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
div.hopscotch-bubble .hopscotch-nav-button {
font-weight: 900;
cursor: pointer;
margin: 0;
overflow: visible;
text-decoration: none!important;
width: auto;
padding: 0 10px;
height: 26px;
line-height: 24px;
font-size: 12px;
display: -moz-inline-stack;
display: inline-block;
*vertical-align: auto;
vertical-align: middle;
}
div.hopscotch-bubble .hopscotch-nav-button.next,
div.hopscotch-bubble .hopscotch-nav-button.prev {
background-color: #fff;
margin: 0 0 0 10px;
}
div.hopscotch-bubble .hopscotch-nav-button.next:hover,
div.hopscotch-bubble .hopscotch-nav-button.prev:hover {
opacity: .8;
}
div.hopscotch-bubble .hopscotch-nav-button.next {
color: #0087c9;
border: 2px solid #0087c9;
}
div.hopscotch-bubble .hopscotch-nav-button.prev {
color: #999;
border: 2px solid #999;
}
div.hopscotch-bubble {
background-color: #fff;
border: 5px solid #000;
border: 5px solid rgba(0, 0, 0, .5);
color: #333;
font-family: Helvetica, Arial;
font-size: 13px;
position: absolute;
z-index: 999999;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-moz-background-clip: padding;
-webkit-background-clip: padding;
background-clip: padding-box;
}
div.hopscotch-bubble * {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
div.hopscotch-bubble.animate {
-moz-transition-property: top, left;
-moz-transition-duration: 1s;
-moz-transition-timing-function: ease-in-out;
-ms-transition-property: top, left;
-ms-transition-duration: 1s;
-ms-transition-timing-function: ease-in-out;
-o-transition-property: top, left;
-o-transition-duration: 1s;
-o-transition-timing-function: ease-in-out;
-webkit-transition-property: top, left;
-webkit-transition-duration: 1s;
-webkit-transition-timing-function: ease-in-out;
transition-property: top, left;
transition-duration: 1s;
transition-timing-function: ease-in-out;
}
div.hopscotch-bubble.invisible {
opacity: 0;
}
div.hopscotch-bubble.hide, div.hopscotch-bubble .hide, div.hopscotch-bubble .hide-all {
display: none;
}
div.hopscotch-bubble h3 {
color: #000;
font-family: Helvetica, Arial;
font-size: 16px;
font-weight: 700;
line-height: 19px;
margin: -1px 15px 0 0;
padding: 0;
}
div.hopscotch-bubble .hopscotch-bubble-container {
padding: 15px;
position: relative;
text-align: left;
-webkit-font-smoothing: antialiased;
}
div.hopscotch-bubble .hopscotch-content {
font-family: Helvetica, Arial;
font-size: 16px;
font-weight: 400;
line-height: 17px;
margin: -5px 0 11px;
padding-top: 8px;
}
div.hopscotch-bubble .hopscotch-bubble-content {
margin: 0 0 0 40px;
padding: 5px;
}
div.hopscotch-bubble.no-number .hopscotch-bubble-content {
margin: 0;
}
div.hopscotch-bubble .hopscotch-bubble-close {
border: 0;
background-color: #fff;
display: block;
padding: 8px;
padding-top: 0;
position: absolute;
text-decoration: none;
width: 8px;
height: 8px;
top: 0;
right: 0;
color: #333;
font-weight: bold;
}
div.hopscotch-bubble .hopscotch-bubble-close:hover {
opacity: .8;
}
div.hopscotch-bubble .hopscotch-bubble-close.hide, div.hopscotch-bubble .hopscotch-bubble-close.hide-all {
display: none;
}
div.hopscotch-bubble .hopscotch-bubble-number {
border-radius: 50%;
behavior: url(PIE.htc);
width: 30px;
height: 30px;
padding: 2px;
border: 2px solid #0087c9;
color: #0a486b;
text-align: center;
float: left;
font-size: 1.3rem;
margin-right: 7px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container {
position: absolute;
width: 34px;
height: 34px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container .hopscotch-bubble-arrow, div.hopscotch-bubble .hopscotch-bubble-arrow-container .hopscotch-bubble-arrow-border {
width: 0;
height: 0;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.up {
top: -22px;
left: 10px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.up .hopscotch-bubble-arrow {
border-bottom: 17px solid #fff;
border-left: 17px solid transparent;
border-right: 17px solid transparent;
position: relative;
top: -10px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.up .hopscotch-bubble-arrow-border {
border-bottom: 17px solid #000;
border-bottom: 17px solid rgba(0, 0, 0, .5);
border-left: 17px solid transparent;
border-right: 17px solid transparent;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.down {
bottom: -39px;
left: 10px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.down .hopscotch-bubble-arrow {
border-top: 17px solid #fff;
border-left: 17px solid transparent;
border-right: 17px solid transparent;
position: relative;
top: -24px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.down .hopscotch-bubble-arrow-border {
border-top: 17px solid #000;
border-top: 17px solid rgba(0, 0, 0, .5);
border-left: 17px solid transparent;
border-right: 17px solid transparent;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.left {
top: 10px;
left: -22px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.left .hopscotch-bubble-arrow {
border-bottom: 17px solid transparent;
border-right: 17px solid #fff;
border-top: 17px solid transparent;
position: relative;
left: 7px;
top: -34px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.left .hopscotch-bubble-arrow-border {
border-right: 17px solid #000;
border-right: 17px solid rgba(0, 0, 0, .5);
border-bottom: 17px solid transparent;
border-top: 17px solid transparent;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.right {
top: 10px;
right: -39px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.right .hopscotch-bubble-arrow {
border-bottom: 17px solid transparent;
border-left: 17px solid #fff;
border-top: 17px solid transparent;
position: relative;
left: -7px;
top: -34px;
}
div.hopscotch-bubble .hopscotch-bubble-arrow-container.right .hopscotch-bubble-arrow-border {
border-left: 17px solid #000;
border-left: 17px solid rgba(0, 0, 0, .5);
border-bottom: 17px solid transparent;
border-top: 17px solid transparent;
}
div.hopscotch-bubble .hopscotch-actions {
margin: 10px 0 0;
text-align: right;
}

View File

@ -1,17 +0,0 @@
---
description: Docker for Mac and Docker for Windows Tutorials
keywords: mac, windows, examples, Compose
title: Example applications
---
Upcoming releases will include example applications especially tailored for Docker for Mac and Docker for Windows.
Examples will highlight develop, build, and run workflows in several languages, including Node.js, Python, Ruby, and Java.
For now, if you want get started experimenting with the Beta apps and Docker Compose (which is installed automatically with Docker Desktop Editions), have a look at these example applications in the Compose documentation. You should be able to run these with Docker for Mac and Docker for Windows.
- [Quickstart: Compose and Django](/compose/django/)
- [Quickstart: Compose and Rails](/compose/rails/)
- [Quickstart: Compose and WordPress](/compose/wordpress/)
See also [learn by example](/engine/tutorials/index.md) tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.

View File

@ -15,7 +15,7 @@ FAQs, technical support for various subscription levels, and more.
**Q: How do I get the stable or beta version of Docker for Mac?**
A: Use the download links for the channels given in the topic
[Download Docker for Mac](index.md#download-docker-for-mac).
[Download Docker for Mac](install.md#download-docker-for-mac).
This topic also has more information about the two channels.
@ -218,7 +218,8 @@ on Docker for Mac GitHub issues.
Note that you need a Mac that supports hardware virtualization and can run at
least macOS `10.10.3+` or `10.11` (macOS Yosemite or macOS El Capitan). See also
"What to know before you install" in [Getting Started](index.md).
[What to know before you install](install.md#what-to-know-before-you-install) in
the install guide.
### Do I need to uninstall Docker Toolbox to use Docker for Mac?

View File

@ -17,172 +17,29 @@ Welcome to Docker for Mac!
Docker is a full development platform for creating containerized apps, and
Docker for Mac is the best way to get started with Docker on a Mac.
> **Already have Docker for Mac?** If you already have Docker for Mac installed,
> and are ready to get started, skip down to
[Step 2. Check versions of Docker Engine, Compose, and Machine](#step-2-check-versions-of-docker-engine-compose-and-machine)
> to work through the rest of the Docker for Mac tour, or jump over to getting
> started tutorials at [Learn Docker](/learn.md).
> **Got Docker for Mac?** If you have not yet installed Docker for Mac, please see [Install Docker for Mac](install.md) for an explanation of stable and beta channels, download and install information.
## Download Docker for Mac
If you have not already done so, please install Docker for Mac. You can download
installers from the stable or beta channel. For more about stable and beta
channels, see the [FAQs](/docker-for-mac/faqs.md#stable-and-beta-channels).
<table style="width:100%">
<tr>
<th style="font-size: x-large; font-family: arial">Stable channel</th>
<th style="font-size: x-large; font-family: arial">Beta channel</th>
</tr>
<tr valign="top">
<td width="50%">This installer is fully baked and tested, and comes
with the latest GA version of Docker Engine along with <a
href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled by
default and configurable on <a href="#daemon-experimental-mode">Docker Daemon preferences for experimental mode</a>. <br><br>This is the
best channel to use if you want a reliable platform to work with.
(Be sure to disable experimental features for apps in production.) <br><br>These releases follow a version schedule with a longer lead
time than the betas, synched with Docker Engine releases and
hotfixes.<br><br>On the stable channel, you can select whether to send usage
statistics and other data.
</td>
<td width="50%">This installer provides the latest Beta release of
Docker for Mac, offers cutting edge features along with
<a href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled by
default and configurable on <a href="#daemon-experimental-mode">Docker Daemon preferences for experimental mode</a>. <br><br>This is the
best channel to use if you want to experiment with features under development, and can weather some instability and bugs. This channel
is a continuation of the beta program, where you can provide feedback
as the apps evolve. Releases are typically more frequent than for
stable, often one or more per month. <br><br>We collect all usage
data on betas across the board.</td>
</tr>
<tr valign="top">
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/mac/stable/Docker.dmg">Get Docker for Mac (stable)</a><br><br>
<a href="https://download.docker.com/mac/stable/Docker.dmg.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: Docker.dmg SHA256</font></a>
</td>
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/mac/beta/Docker.dmg">Get Docker for Mac (beta)</a><br><br>
<a href="https://download.docker.com/mac/beta/Docker.dmg.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: Docker.dmg SHA256</font></a>
</td>
</tr>
</table>
>**Important Notes**:
>
> - Docker for Mac requires OS X El Capitan 10.11 or newer macOS release running on a 2010 or
> newer Mac, with Intel's hardware support for MMU virtualization. The app will run on 10.10.3 Yosemite, but with limited support. Please see
> [What to know before you install](index.md#what-to-know-before-you-install)
> for a full explanation and list of prerequisites.
>
> - You can switch between beta and stable versions, but you must have only one
> app installed at a time. Also, you will need to save images and export
> containers you want to keep before uninstalling the current version before
> installing another. For more about this, see the
> [FAQs about beta and stable channels](faqs.md#stable-and-beta-channels).
## What to know before you install
* **README FIRST for Docker Toolbox and Docker Machine users**: If you are
already running Docker on your machine, first read
[Docker for Mac vs. Docker Toolbox](docker-toolbox.md) to understand the
impact of this installation on your existing setup, how to set your environment
for Docker for Mac, and how the two products can coexist.
<p />
* **Relationship to Docker Machine**: Installing Docker for Mac does not affect
machines you created with Docker Machine. You'll get the option to copy
containers and images from your local `default` machine (if one exists) to the
new Docker for Mac [HyperKit](https://github.com/docker/HyperKit/)" VM. When
you are running Docker for Mac, you do not need Docker Machine nodes running
at all locally (or anywhere else). With Docker for Mac, you have a new, native
virtualization system running (HyperKit) which takes the place of the
VirtualBox system. To learn more, see
[Docker for Mac vs. Docker Toolbox](docker-toolbox.md).
<p />
* **System Requirements**: Docker for Mac will launch only if all of these
requirements are met.
<p />
- Mac must be a 2010 or newer model, with Intel's hardware support for memory
management unit (MMU) virtualization; i.e., Extended Page Tables (EPT) and
Unrestricted Mode.
<p />
- OS X El Capitan 10.11 and newer macOS releases are supported. At a minimum,
Docker for Mac requires macOS Yosemite 10.10.3 or newer, with the caveat
that going forward 10.10.x is a use-at-your-own risk proposition.
<p />
- Starting with Docker for Mac stable release 1.13 (upcoming), and concurrent
Beta releases, we will no longer address issues specific to OS X Yosemite
10.10. In future releases, Docker for Mac could stop working on OS X Yosemite
10.10 due to the deprecated status of this OS X version. We recommend
upgrading to the latest version of macOS.
<p />
- At least 4GB of RAM
<p />
- VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible
with Docker for Mac)
> **Note**: If your system does not satisfy these requirements, you can
> install [Docker Toolbox](/toolbox/overview.md), which uses Oracle VirtualBox
> instead of HyperKit.
* **What the install includes**: The installation provides
[Docker Engine](/engine/userguide/intro/), Docker CLI client,
[Docker Compose](/compose/overview/), and [Docker Machine](/machine/overview/).
## Step 1. Install and Run Docker for Mac
1. Double-click `Docker.dmg` to open the installer, then drag Moby the whale to
the Applications folder.
![Install Docker app](/docker-for-mac/images/docker-app-drag.png)
You will be asked to authorize `Docker.app` with your system password during
the install process. Privileged access is needed to install networking
components and links to the Docker apps.
2. Double-click `Docker.app` to start Docker.
![Docker app in Hockeyapp](/docker-for-mac/images/docker-app-in-apps.png)
The whale in the top status bar indicates that Docker is running, and
accessible from a terminal.
![Whale in menu bar](/docker-for-mac/images/whale-in-menu-bar.png)
If you just installed the app, you also get a success message with suggested
next steps and a link to this documentation. Click the whale ![whale](/docker-for-mac/images/whale-x.png))
in the status bar to dismiss this popup.
![Docker success](images/mac-install-success-docker-ps.png)
3. Click the whale (![whale-x](images/whale-x.png)) to get Preferences and
other options.
![Docker context menu](images/menu.png)
4. Select **About Docker** to verify that you have the latest version.
Congratulations! You are up and running with Docker for Mac.
## Step 2. Check versions of Docker Engine, Compose, and Machine
## Check versions of Docker Engine, Compose, and Machine
Run these commands to test if your versions of `docker`, `docker-compose`, and
`docker-machine` are up-to-date and compatible with `Docker.app`.
```shell
$ docker --version
Docker version 1.13.0-rc3, build 4d92237
Docker version 1.13.0, build 49bf474
$ docker-compose --version
docker-compose version 1.9.0, build 2585387
docker-compose version 1.10.0, build 4bd6f1a
$ docker-machine --version
docker-machine version 0.9.0-rc2, build 7b19591
docker-machine version 0.9.0, build 15fd4c7
```
> **Note**: The above is an example. Your output will differ if you are running
> different (e.g., newer) versions.
## Step 3. Explore the application and run examples
## Explore the application and run examples
1. Open a command-line terminal, and run some Docker commands to verify that
Docker is working as expected.
@ -231,9 +88,7 @@ docker-machine version 0.9.0-rc2, build 7b19591
want to keep some images around so that you don't have to pull them again
from Docker Hub. To remove an image you no longer need, use `docker rmi` followed by an image ID or image name. For example, `docker rmi nginx`.
**Want more example applications?** - For more example walkthroughs that include
setting up services and databases in Docker Compose, see
[Example Applications](/docker-for-mac/examples.md).
**Want more example applications?** [Learn Docker](/learn.md) is a great place to start.
## Preferences

168
docker-for-mac/install.md Normal file
View File

@ -0,0 +1,168 @@
---
description: How to install Docker for Mac
keywords: mac, beta, alpha, install, download
title: Install Docker for Mac
---
The Docker for Mac install package includes everything you need to run Docker on
a Mac. This topic describes pre-install considerations, and how to download and
install Docker for Mac.
> **Already have Docker for Mac?** If you already have Docker for Mac installed, and are ready to get started, skip to [Getting started](index.md) to
work through the rest of the Docker for Mac tour and information, or jump over
to the tutorials at [Learn Docker](/learn.md).
## Download Docker for Mac
If you have not already done so, please install Docker for Mac. You can download
installers from the stable or beta channel. For more about stable and beta
channels, see the [FAQs](/docker-for-mac/faqs.md#stable-and-beta-channels).
<table style="width:100%">
<tr>
<th style="font-size: x-large; font-family: arial">Stable channel</th>
<th style="font-size: x-large; font-family: arial">Beta channel</th>
</tr>
<tr valign="top">
<td width="50%">This installer is fully baked and tested, and comes
with the latest GA version of Docker Engine along with <a
href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled by
default and configurable on <a href="index#daemon-experimental-mode">Docker Daemon preferences for experimental mode</a>. <br><br>This is the
best channel to use if you want a reliable platform to work with.
(Be sure to disable experimental features for apps in production.) <br><br>These releases follow a version schedule with a longer lead
time than the betas, synched with Docker Engine releases and
hotfixes.<br><br>On the stable channel, you can select whether to send usage
statistics and other data.
</td>
<td width="50%">This installer provides the latest Beta release of
Docker for Mac, offers cutting edge features along with
<a href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled by
default and configurable on <a href="index#daemon-experimental-mode">Docker Daemon preferences for experimental mode</a>. <br><br>This is the
best channel to use if you want to experiment with features under development, and can weather some instability and bugs. This channel
is a continuation of the beta program, where you can provide feedback
as the apps evolve. Releases are typically more frequent than for
stable, often one or more per month. <br><br>We collect all usage
data on betas across the board.</td>
</tr>
<tr valign="top">
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/mac/stable/Docker.dmg">Get Docker for Mac (stable)</a><br><br>
<a href="https://download.docker.com/mac/stable/Docker.dmg.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: Docker.dmg SHA256</font></a>
</td>
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/mac/beta/Docker.dmg">Get Docker for Mac (beta)</a><br><br>
<a href="https://download.docker.com/mac/beta/Docker.dmg.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: Docker.dmg SHA256</font></a>
</td>
</tr>
</table>
>**Important Notes**:
>
> - Docker for Mac requires OS X El Capitan 10.11 or newer macOS release running on a 2010 or
> newer Mac, with Intel's hardware support for MMU virtualization. The app will run on 10.10.3 Yosemite, but with limited support. Please see
> [What to know before you install](index.md#what-to-know-before-you-install)
> for a full explanation and list of prerequisites.
>
> - You can switch between beta and stable versions, but you must have only one
> app installed at a time. Also, you will need to save images and export
> containers you want to keep before uninstalling the current version before
> installing another. For more about this, see the
> [FAQs about beta and stable channels](faqs.md#stable-and-beta-channels).
## What to know before you install
* **README FIRST for Docker Toolbox and Docker Machine users**: If you are
already running Docker on your machine, first read
[Docker for Mac vs. Docker Toolbox](docker-toolbox.md) to understand the
impact of this installation on your existing setup, how to set your environment
for Docker for Mac, and how the two products can coexist.
<p />
* **Relationship to Docker Machine**: Installing Docker for Mac does not affect
machines you created with Docker Machine. You'll get the option to copy
containers and images from your local `default` machine (if one exists) to the
new Docker for Mac [HyperKit](https://github.com/docker/HyperKit/)" VM. When
you are running Docker for Mac, you do not need Docker Machine nodes running
at all locally (or anywhere else). With Docker for Mac, you have a new, native
virtualization system running (HyperKit) which takes the place of the
VirtualBox system. To learn more, see
[Docker for Mac vs. Docker Toolbox](docker-toolbox.md).
<p />
* **System Requirements**: Docker for Mac will launch only if all of these
requirements are met.
<p />
- Mac must be a 2010 or newer model, with Intel's hardware support for memory
management unit (MMU) virtualization; i.e., Extended Page Tables (EPT) and
Unrestricted Mode.
<p />
- OS X El Capitan 10.11 and newer macOS releases are supported. At a minimum,
Docker for Mac requires macOS Yosemite 10.10.3 or newer, with the caveat
that going forward 10.10.x is a use-at-your-own risk proposition.
<p />
- Starting with Docker for Mac stable release 1.13 (upcoming), and concurrent
Beta releases, we will no longer address issues specific to OS X Yosemite
10.10. In future releases, Docker for Mac could stop working on OS X Yosemite
10.10 due to the deprecated status of this OS X version. We recommend
upgrading to the latest version of macOS.
<p />
- At least 4GB of RAM
<p />
- VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible
with Docker for Mac)
> **Note**: If your system does not satisfy these requirements, you can
> install [Docker Toolbox](/toolbox/overview.md), which uses Oracle VirtualBox
> instead of HyperKit.
* **What the install includes**: The installation provides
[Docker Engine](/engine/userguide/intro/), Docker CLI client,
[Docker Compose](/compose/overview/), and [Docker Machine](/machine/overview/).
## Install and Run Docker for Mac
1. Double-click `Docker.dmg` to open the installer, then drag Moby the whale to
the Applications folder.
![Install Docker app](/docker-for-mac/images/docker-app-drag.png)
You will be asked to authorize `Docker.app` with your system password during
the install process. Privileged access is needed to install networking
components and links to the Docker apps.
2. Double-click `Docker.app` to start Docker.
![Docker app in Hockeyapp](/docker-for-mac/images/docker-app-in-apps.png)
The whale in the top status bar indicates that Docker is running, and
accessible from a terminal.
![Whale in menu bar](/docker-for-mac/images/whale-in-menu-bar.png)
If you just installed the app, you also get a success message with suggested
next steps and a link to this documentation. Click the whale ![whale](/docker-for-mac/images/whale-x.png))
in the status bar to dismiss this popup.
![Docker success](images/mac-install-success-docker-ps.png)
3. Click the whale (![whale-x](images/whale-x.png)) to get Preferences and
other options.
![Docker context menu](images/menu.png)
4. Select **About Docker** to verify that you have the latest version.
Congratulations! You are up and running with Docker for Mac.
## Where to go next
* [Getting started](index.md) provides an overview of Docker for Mac,
basic Docker command examples, how to get help or give feedback, and
links to all topics in the Docker for Mac guide.
* [Troubleshooting](troubleshoot.md) describes common problems,
workarounds, how to run and submit diagnostics, and submit issues.
* [FAQs](faqs.md) provides answers to frequently asked questions.
* [Release Notes](release-notes.md) lists component updates, new features, and improvements associated with Stable and Beta releases.
* [Learn Docker](/learn.md) provides general Docker tutorials.

View File

@ -4,6 +4,7 @@ keywords: mac, Multi-CPU architecture support
redirect_from:
- /mackit/multi-arch/
title: Leveraging multi-CPU architecture support
notoc: true
---
Docker for Mac provides `binfmt_misc` multi architecture support, so you can run
@ -34,5 +35,5 @@ these to do builds `FROM`, so you can build new Multi-CPU architecture packages.
Alternatively, you can bind mount in the `qemu` static binaries to any
cross-architecture package, such as the semi-official ones using a script like
this one https://github.com/justincormack/cross-docker. (See the README at the
given link for details on how to use the script.)
this one [https://github.com/justincormack/cross-docker](https://github.com/justincormack/cross-docker). (See the README at the
given link for details on how to use the script.)

View File

@ -94,7 +94,7 @@ container. Note that this is what you have to do even on Linux if the container
is on an overlay network, not a bridge network, as these are not routed.
The command to run the `nginx` webserver shown in [Getting
Started](index.md#explore) is an example of this.
Started](index.md#explore-the-application-and-run-examples) is an example of this.
```shell
docker run -d -p 80:80 --name webserver nginx
@ -122,4 +122,4 @@ problems. In particular, there is a bug in macOS that is only fixed in 10.12 and
is not being backported as far as we can tell, which means that we could not
support this in all supported macOS versions. In addition, this network setup
would require root access which we are trying to avoid entirely in Docker for
Mac (we currently have a very small root helper that we are trying to remove).
Mac (we currently have a very small root helper that we are trying to remove).

View File

@ -2,6 +2,7 @@
description: Docker's use of Open Source
keywords: docker, opensource
title: Open source components and licensing
notoc: true
---
Docker Desktop Editions are built using open source software. For
@ -17,4 +18,4 @@ The sources for `qemu-img` can be obtained
[here](http://wiki.qemu-project.org/download/qemu-2.4.1.tar.bz2). The sources
for the `gettext` and `glib` libraries that `qemu-img` requires were obtained
from [Homebrew](https://brew.sh) and may be retrieved using `brew install
--build-from-source gettext glib`.
--build-from-source gettext glib`.

View File

@ -9,12 +9,12 @@ title: Docker for Mac release notes
Here are the main improvements and issues per release, starting with the current
release. The documentation is always updated for each release.
For system requirements, please see the Getting Started topic on [What to know
before you install](index.md#what-to-know-before-you-install).
For system requirements, please see
[What to know before you install](install.md#what-to-know-before-you-install).
Release notes for _stable_ and _beta_ releases are listed below. You can learn
about both kinds of releases, and download stable and beta product installers at
[Download Docker for Mac](index.md#download-docker-for-mac).
[Download Docker for Mac](install.md#download-docker-for-mac).
## Stable Release Notes

View File

@ -212,7 +212,7 @@ If not, the command will print `kern.hv_support: 0`.
See also, [Hypervisor Framework
Reference](https://developer.apple.com/library/mac/documentation/DriversKernelHardware/Reference/Hypervisor/)
in the Apple documentation, and Docker for Mac system requirements in [What to
know before you install](index.md#what-to-know-before-you-install).
know before you install](install.md#what-to-know-before-you-install).
### Workarounds for common problems

View File

@ -1,23 +0,0 @@
---
description: Docker for Mac and Docker for Windows Tutorials
keywords: mac, windows, examples, Compose
title: Example applications
---
Upcoming releases will include example applications especially tailored for
Docker for Mac and Docker for Windows.
Examples will highlight develop, build, and run workflows in several languages,
including Node.js, Python, Ruby, and Java.
For now, if you want get started experimenting with the Beta apps and Docker
Compose (which is installed automatically with Docker Desktop Editions), have a
look at these example applications in the Compose documentation. You should be
able to run these with Docker for Mac and Docker for Windows.
- [Quickstart: Compose and Django](/compose/django/)
- [Quickstart: Compose and Rails](/compose/rails/)
- [Quickstart: Compose and WordPress](/compose/wordpress/)
See also [learn by example](/engine/tutorials/) tutorials on building images,
running containers, networking, managing data, and storing images on Docker Hub.

View File

@ -13,7 +13,7 @@ technical support for various subscription levels, and more.
**Q: How do I get the stable or beta version of Docker for Windows?**
A: Use the download links for the channels given in the topic
[Download Docker for Windows](/docker-for-windows/index.md#download-docker-for-windows).
[Download Docker for Windows](/docker-for-windows/install.md#download-docker-for-windows).
This topic also has more information about the two channels.
@ -168,10 +168,9 @@ For more about sharing local drives with containers using Docker for Windows,
see [Shared Drives](/docker-for-windows/index.md#shared-drives) in the Getting
Started topic.
To learn more about using Docker for Windows and Docker Machine, see [What to
know before you install](index.md#what-to-know-before-you-install) in the
Getting Started topic. For more about Docker Machine itself, see [What is Docker
Machine?](/machine/overview.md#what-is-docker-machine)
To learn more about using Docker for Windows and Docker Machine, see
[What to know before you install](install.md#what-to-know-before-you-install) in the Getting Started topic. For more about Docker Machine itself, see
[What is Docker Machine?](/machine/overview.md#what-is-docker-machine)
### How do I run Windows containers on Docker on Windows Server 2016?

View File

@ -17,148 +17,9 @@ Docker is a full development platform for creating containerized apps, and
Docker for Windows is the best way to get started with Docker on Windows
systems.
>**Already have Docker for Windows?** If you already have Docker for Windows installed, and are ready to get started, skip down to [Step 3. Check versions of
Docker Engine, Compose, and
Machine](#step-3-check-versions-of-docker-engine-compose-and-machine) to work
through the rest of the Docker for Windows tour, or jump over to getting started tutorials at [Learn Docker](/learn.md).
> **Got Docker for Windows?** If you have not yet installed Docker for Windows, please see [Install Docker for Windows](install.md) for an explanation of stable and beta channels, download and install information.
## Download Docker for Windows
If you have not already done so, please install Docker for Windows. You can
download installers from the stable or beta channel. For more about stable and
beta channels, see the
[FAQs](/docker-for-windows/faqs.md#questions-about-stable-and-beta-channels).
<table style="width:100%">
<tr>
<th style="font-size: x-large; font-family: arial">Stable channel</th>
<th style="font-size: x-large; font-family: arial">Beta channel</th>
</tr>
<tr valign="top">
<td width="50%">This installer is fully baked and tested, and comes
with the latest GA version of Docker Engine along with
<a href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled
by default and configurable on
<a href="#daemon-experimental-mode">Docker Daemon settings for
experimental mode</a>. <br><br>This is the best channel to use if
you want a reliable platform to work with. (Be sure to disable
experimental features for apps in production.) <br><br>These releases follow a version schedule with a longer lead time than the betas,
synched with Docker Engine releases and hotfixes.<br><br>On the
stable channel, you can select whether to send usage statistics
and other data.
</td>
<td width="50%">This installer provides the latest Beta release of
Docker for Windows, offers cutting edge features along with <a href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled
by default and configurable on <a href="#daemon-experimental-mode">
Docker Daemon settings for experimental mode</a>. <br><br>This is
the best channel to use if you want to experiment with features
under development, and can weather some instability and bugs. This
channel is a continuation of the beta program, where you can
provide feedback as the apps evolve. Releases are typically more
frequent than for stable, often one or more per month. <br><br>
We collect all usage data on betas across the board.</td>
</tr>
<tr valign="top">
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/win/stable/InstallDocker.msi">Get Docker for Windows (stable)</a><br><br>
<a href="https://download.docker.com/win/stable/InstallDocker.msi.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: InstallDocker.msi SHA256</font></a>
</td>
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/win/beta/InstallDocker.msi">Get Docker for Windows (beta)</a><br><br>
<a href="https://download.docker.com/win/beta/InstallDocker.msi.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: InstallDocker.msi SHA256</font></a>
</td>
</tr>
</table>
>**Important Notes:**
>
> - Docker for Windows requires 64bit Windows 10 Pro, Enterprise and Education
> (1511 November update, Build 10586 or later) and Microsoft Hyper-V. Please
> see
> [What to know before you install](/docker-for-windows/index.md#what-to-know-before-you-install)
> for a full list of prerequisites.
>
> - You can switch between beta and stable versions, but you must have only one
> app installed at a time. Also, you will need to save images and export
> containers you want to keep before uninstalling the current version before
> installing another. For more about this, see the
> [FAQs about beta and stable channels](/docker-for-windows/faqs.md#questions-about-stable-and-beta-channels).
## What to know before you install
* **README FIRST for Docker Toolbox and Docker Machine users**: Docker for Windows requires Microsoft Hyper-V to run. After Hyper-V is enabled,
VirtualBox will no longer work, but any VirtualBox VM images will remain.
VirtualBox VMs created with `docker-machine` (including the `default` one
typically created during Toolbox install) will no longer start. These VMs cannot
be used side-by-side with Docker for Windows. However, you can still use
`docker-machine` to manage remote VMs.
<p />
* The current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later). In the future we will support more versions of Windows 10.
<p />
* Containers and images created with Docker for Windows are shared between all user accounts on machines where it is installed. This is because all
Windows accounts will use the same VM to build and run containers. In the
future, Docker for Windows will better isolate user content.
<p />
* The Hyper-V package must be enabled for Docker for Windows to work. The Docker for Windows installer will enable it for you, if needed. (This requires a
reboot). If your system does not satisfy these requirements, you can install
[Docker Toolbox](/toolbox/overview.md), which uses Oracle Virtual Box instead of
Hyper-V.
<p />
* Virtualization must be enabled. Typically, virtualization is enabled by default. (Note that this is different from having Hyper-V enabled.) For more
detail see [Virtualization must be
enabled](troubleshoot.md#virtualization-must-be-enabled) in Troubleshooting.
<p />
* Nested virtualization scenarios, such as running Docker for Windows
on a VMWare or Parallels instance, might work, but come with no
guarantees (i.e., not officially supported). For more information, see
[Running Docker for Windows in nested virtualization scenarios](troubleshoot.md#running-docker-for-windows-in-nested-virtualization-scenarios)
<p />
* **What the Docker for Windows install includes**: The installation provides [Docker Engine](/engine/userguide/intro.md), Docker CLI client, [Docker Compose](/compose/overview.md), and [Docker Machine](/machine/overview.md).
### About Windows containers and Windows Server 2016
Looking for information on using Windows containers?
* [Switch between Windows and Linux containers](#switch-between-windows-and-linux-containers) describes the Linux / Windows containers toggle in Docker for Windows and points you to the tutorial mentioned above.
<p />
* [Getting Started with Windows Containers (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/README.md)
provides a tutorial on how to set up and run Windows containers on Windows 10 or
with Windows Server 2016. It shows you how to use a MusicStore application with
Windows containers.
<p />
* [Setup - Windows Server 2016 (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/Setup-Server2016.md) specifically describes environment setup.
<p />
* Docker Container Platform for Windows Server 2016 [articles and blog posts](https://www.docker.com/microsoft/) on the Docker website
## Step 1. Install Docker for Windows
1. Double-click `InstallDocker.msi` to run the installer.
If you haven't already downloaded the installer (`InstallDocker.msi`), you can get it [**here**](https://download.docker.com/win/stable/InstallDocker.msi). It typically downloads to your `Downloads folder`, or you can run it from the recent downloads bar at the bottom of your web browser.
2. Follow the install wizard to accept the license, authorize the installer, and proceed with the install.
You will be asked to authorize `Docker.app` with your system password during the install process. Privileged access is needed to install networking components, links to the Docker apps, and manage the Hyper-V VMs.
3. Click **Finish** on the setup complete dialog to launch Docker.
![Install complete>](/docker-for-windows/images/installer-finishes.png)
## Step 2. Start Docker for Windows
When the installation finishes, Docker starts automatically.
The whale in the status bar indicates that Docker is running, and accessible from a terminal.
If you just installed the app, you also get a popup success message with suggested next steps, and a link to this documentation.
![Install success](/docker-for-windows/images/win-install-success-popup.png)
When initialization is complete, select **About Docker** from the notification area icon to verify that you have the latest version.
Congratulations! You are up and running with Docker for Windows.
## Step 3. Check versions of Docker Engine, Compose, and Machine
## Check versions of Docker Engine, Compose, and Machine
Start your favorite shell (`cmd.exe`, PowerShell, or other) to check your versions of `docker` and `docker-compose`, and verify the installation.
@ -171,7 +32,7 @@ Start your favorite shell (`cmd.exe`, PowerShell, or other) to check your versio
PS C:\Users\jdoe> docker-machine --version
docker-machine version 0.8.0, build b85aac1
## Step 4. Explore the application and run examples
## Explore the application and run examples
The next few steps take you through some examples. These are just suggestions for ways to experiment with Docker on your system, check version information, and make sure `docker` commands are working properly.
@ -358,9 +219,7 @@ The next few steps take you through some examples. These are just suggestions fo
want to keep some images around so that you don't have to pull them again
from Docker Hub. To remove an image you no longer need, use `docker rmi` followed by an image ID or image name. For example, `docker rmi nginx`.
**Want more example applications?** - For more example walkthroughs that include
setting up services and databases with Docker Compose, see
[Example Applications](/docker-for-windows/examples.md).
**Want more example applications?** [Learn Docker](/learn.md) is a great place to start.
## Set up tab completion in PowerShell

View File

@ -0,0 +1,164 @@
---
description: How to install Docker for Windows
keywords: windows, beta, alpha, install, download
title: Install Docker for Windows
---
The Docker for Windows install package includes everything you need to run
Docker on a Windows system. This topic describes pre-install considerations, and
how to download and install Docker for Windows.
> **Already have Docker for Windows?** If you already have Docker for Windows installed, and are ready to get started, skip to [Getting started](index.md) to
work through the rest of the Docker for Windows tour and information, or jump
over to the tutorials at [Learn Docker](/learn.md).
## Download Docker for Windows
If you have not already done so, please install Docker for Windows. You can
download installers from the stable or beta channel. For more about stable and
beta channels, see the
[FAQs](/docker-for-windows/faqs.md#questions-about-stable-and-beta-channels).
<table style="width:100%">
<tr>
<th style="font-size: x-large; font-family: arial">Stable channel</th>
<th style="font-size: x-large; font-family: arial">Beta channel</th>
</tr>
<tr valign="top">
<td width="50%">This installer is fully baked and tested, and comes
with the latest GA version of Docker Engine along with
<a href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled
by default and configurable on
<a href="index#daemon-experimental-mode">Docker Daemon settings for
experimental mode</a>. <br><br>This is the best channel to use if
you want a reliable platform to work with. (Be sure to disable
experimental features for apps in production.) <br><br>These releases follow a version schedule with a longer lead time than the betas,
synched with Docker Engine releases and hotfixes.<br><br>On the
stable channel, you can select whether to send usage statistics
and other data.
</td>
<td width="50%">This installer provides the latest Beta release of
Docker for Windows, offers cutting edge features along with <a href="https://github.com/docker/docker/blob/master/experimental/README.md"> experimental features in Docker Engine</a>, which are enabled
by default and configurable on <a href="index#daemon-experimental-mode">
Docker Daemon settings for experimental mode</a>. <br><br>This is
the best channel to use if you want to experiment with features
under development, and can weather some instability and bugs. This
channel is a continuation of the beta program, where you can
provide feedback as the apps evolve. Releases are typically more
frequent than for stable, often one or more per month. <br><br>
We collect all usage data on betas across the board.</td>
</tr>
<tr valign="top">
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/win/stable/InstallDocker.msi">Get Docker for Windows (stable)</a><br><br>
<a href="https://download.docker.com/win/stable/InstallDocker.msi.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: InstallDocker.msi SHA256</font></a>
</td>
<td width="50%">
<a class="button darkblue-btn" href="https://download.docker.com/win/beta/InstallDocker.msi">Get Docker for Windows (beta)</a><br><br>
<a href="https://download.docker.com/win/beta/InstallDocker.msi.sha256sum"><font color="#BDBDBD" size="-1">Download checksum: InstallDocker.msi SHA256</font></a>
</td>
</tr>
</table>
>**Important Notes:**
>
> - Docker for Windows requires 64bit Windows 10 Pro, Enterprise and Education
> (1511 November update, Build 10586 or later) and Microsoft Hyper-V. Please
> see
> [What to know before you install](/docker-for-windows/index.md#what-to-know-before-you-install)
> for a full list of prerequisites.
>
> - You can switch between beta and stable versions, but you must have only one
> app installed at a time. Also, you will need to save images and export
> containers you want to keep before uninstalling the current version before
> installing another. For more about this, see the
> [FAQs about beta and stable channels](/docker-for-windows/faqs.md#questions-about-stable-and-beta-channels).
## What to know before you install
* **README FIRST for Docker Toolbox and Docker Machine users**: Docker for Windows requires Microsoft Hyper-V to run. After Hyper-V is enabled,
VirtualBox will no longer work, but any VirtualBox VM images will remain.
VirtualBox VMs created with `docker-machine` (including the `default` one
typically created during Toolbox install) will no longer start. These VMs cannot
be used side-by-side with Docker for Windows. However, you can still use
`docker-machine` to manage remote VMs.
<p />
* The current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later). In the future we will support more versions of Windows 10.
<p />
* Containers and images created with Docker for Windows are shared between all user accounts on machines where it is installed. This is because all
Windows accounts will use the same VM to build and run containers. In the
future, Docker for Windows will better isolate user content.
<p />
* The Hyper-V package must be enabled for Docker for Windows to work. The Docker for Windows installer will enable it for you, if needed. (This requires a
reboot). If your system does not satisfy these requirements, you can install
[Docker Toolbox](/toolbox/overview.md), which uses Oracle Virtual Box instead of
Hyper-V.
<p />
* Virtualization must be enabled. Typically, virtualization is enabled by default. (Note that this is different from having Hyper-V enabled.) For more
detail see [Virtualization must be
enabled](troubleshoot.md#virtualization-must-be-enabled) in Troubleshooting.
<p />
* Nested virtualization scenarios, such as running Docker for Windows
on a VMWare or Parallels instance, might work, but come with no
guarantees (i.e., not officially supported). For more information, see
[Running Docker for Windows in nested virtualization scenarios](troubleshoot.md#running-docker-for-windows-in-nested-virtualization-scenarios)
<p />
* **What the Docker for Windows install includes**: The installation provides [Docker Engine](/engine/userguide/intro.md), Docker CLI client, [Docker Compose](/compose/overview.md), and [Docker Machine](/machine/overview.md).
### About Windows containers and Windows Server 2016
Looking for information on using Windows containers?
* [Switch between Windows and Linux containers](#switch-between-windows-and-linux-containers) describes the Linux / Windows containers toggle in Docker for Windows and points you to the tutorial mentioned above.
<p />
* [Getting Started with Windows Containers (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/README.md)
provides a tutorial on how to set up and run Windows containers on Windows 10 or
with Windows Server 2016. It shows you how to use a MusicStore application with
Windows containers.
<p />
* [Setup - Windows Server 2016 (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/Setup-Server2016.md) specifically describes environment setup.
<p />
* Docker Container Platform for Windows Server 2016 [articles and blog posts](https://www.docker.com/microsoft/) on the Docker website
## Install Docker for Windows
1. Double-click `InstallDocker.msi` to run the installer.
If you haven't already downloaded the installer (`InstallDocker.msi`), you can get it [**here**](https://download.docker.com/win/stable/InstallDocker.msi). It typically downloads to your `Downloads folder`, or you can run it from the recent downloads bar at the bottom of your web browser.
2. Follow the install wizard to accept the license, authorize the installer, and proceed with the install.
You will be asked to authorize `Docker.app` with your system password during the install process. Privileged access is needed to install networking components, links to the Docker apps, and manage the Hyper-V VMs.
3. Click **Finish** on the setup complete dialog to launch Docker.
![Install complete>](/docker-for-windows/images/installer-finishes.png)
## Start Docker for Windows
When the installation finishes, Docker starts automatically.
The whale in the status bar indicates that Docker is running, and accessible from a terminal.
If you just installed the app, you also get a popup success message with suggested next steps, and a link to this documentation.
![Install success](/docker-for-windows/images/win-install-success-popup.png)
When initialization is complete, select **About Docker** from the notification area icon to verify that you have the latest version.
Congratulations! You are up and running with Docker for Windows.
## Where to go next
* [Getting started](index.md) provides an overview of Docker for Windows,
basic Docker command examples, how to get help or give feedback, and
links to all topics in the Docker for Windows guide.
* [Troubleshooting](troubleshoot.md) describes common problems,
workarounds, how to run and submit diagnostics, and submit issues.
* [FAQs](faqs.md) provides answers to frequently asked questions.
* [Release Notes](release-notes.md) lists component updates, new features, and improvements associated with Stable and Beta releases.
* [Learn Docker](/learn.md) provides general Docker tutorials.

View File

@ -2,6 +2,7 @@
description: Docker's use of Open Source
keywords: docker, opensource
title: Open source components and licensing
notoc: true
---
Docker Desktop Editions are built using open source software. For

View File

@ -9,12 +9,12 @@ title: Docker for Windows Release notes
Here are the main improvements and issues per release, starting with the current
release. The documentation is always updated for each release.
For system requirements, please see the Getting Started topic on [What to know
before you install](index.md#what-to-know-before-you-install).
For system requirements, please see
[What to know before you install](install.md#what-to-know-before-you-install).
Release notes for _stable_ and _beta_ releases are listed below. You can learn
about both kinds of releases, and download stable and beta product installers at
[Download Docker for Windows](index.md#download-docker-for-windows).
[Download Docker for Windows](install.md#download-docker-for-windows).
## Stable Release Notes

View File

@ -492,7 +492,7 @@ will unset existing `DOCKER` environment variables you have set. For other shell
### Make sure Docker is running for webserver examples
For the `hello-world-nginx` example and others, Docker for Windows must be running in order to get to the webserver on `http://localhost/`. Make sure that the Docker whale is showing in the menu bar, and that you run the Docker commands in a shell that is connected to the Docker for Windows Engine (not Engine from Toolbox). Otherwise, you might start the webserver container but get a "web page not available" error when you go to `docker`. For more on distinguishing between the two environments, see "Running Docker for Windows and Docker Toolbox" in [Getting Started](index.md).
For the `hello-world-nginx` example and others, Docker for Windows must be running in order to get to the webserver on `http://localhost/`. Make sure that the Docker whale is showing in the menu bar, and that you run the Docker commands in a shell that is connected to the Docker for Windows Engine (not Engine from Toolbox). Otherwise, you might start the webserver container but get a "web page not available" error when you go to `docker`.
### How to solve `port already allocated` errors

340
glossary.md Normal file
View File

@ -0,0 +1,340 @@
---
title: "Docker Glossary"
description: "Glossary of terms used around Docker"
keywords: "glossary, docker, terms, definitions"
skip-right-nav: true
---
## aufs
aufs (advanced multi layered unification filesystem) is a Linux [filesystem](#filesystem) that
Docker supports as a storage backend. It implements the
[union mount](http://en.wikipedia.org/wiki/Union_mount) for Linux file systems.
## base image
An image that has no parent is a **base image**.
## boot2docker
[boot2docker](http://boot2docker.io/) is a lightweight Linux distribution made
specifically to run Docker containers. The boot2docker management tool for Mac and Windows was deprecated and replaced by [`docker-machine`](#machine) which you can install with the Docker Toolbox.
## btrfs
btrfs (B-tree file system) is a Linux [filesystem](#filesystem) that Docker
supports as a storage backend. It is a [copy-on-write](http://en.wikipedia.org/wiki/Copy-on-write)
filesystem.
## build
build is the process of building Docker images using a [Dockerfile](#dockerfile).
The build uses a Dockerfile and a "context". The context is the set of files in the
directory in which the image is built.
## cgroups
cgroups is a Linux kernel feature that limits, accounts for, and isolates
the resource usage (CPU, memory, disk I/O, network, etc.) of a collection
of processes. Docker relies on cgroups to control and isolate resource limits.
*Also known as : control groups*
## Compose
[Compose](https://github.com/docker/compose) is a tool for defining and
running complex applications with Docker. With compose, you define a
multi-container application in a single file, then spin your
application up in a single command which does everything that needs to
be done to get it running.
*Also known as : docker-compose, fig*
## copy-on-write
Docker uses a
[copy-on-write](https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/#/the-copy-on-write-strategy)
technique and a [union file system](#union-file-system) for both images and
containers to optimize resources and speed performance. Multiple copies of an
entity share the same instance and each one makes only specific changes to its
unique layer.
Multiple containers can share access to the same image, and make
container-specific changes on a writable layer which is deleted when
the container is removed. This speeds up container start times and performance.
Images are essentially layers of filesystems typically predicated on a base
image under a writable layer, and built up with layers of differences from the
base image. This minimizes the footprint of the image and enables shared
development.
For more about copy-on-write in the context of Docker, see [Understand images,
containers, and storage
drivers](https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/).
## container
A container is a runtime instance of a [docker image](#image).
A Docker container consists of
- A Docker image
- Execution environment
- A standard set of instructions
The concept is borrowed from Shipping Containers, which define a standard to ship
goods globally. Docker defines a standard to ship software.
## data volume
A data volume is a specially-designated directory within one or more containers
that bypasses the Union File System. Data volumes are designed to persist data,
independent of the container's life cycle. Docker therefore never automatically
delete volumes when you remove a container, nor will it "garbage collect"
volumes that are no longer referenced by a container.
## Docker
The term Docker can refer to
- The Docker project as a whole, which is a platform for developers and sysadmins to
develop, ship, and run applications
- The docker daemon process running on the host which manages images and containers
## Docker for Mac
[Docker for Mac](https://docs.docker.com/docker-for-mac/) is an easy-to-install,
lightweight Docker development environment designed specifically for the Mac. A
native Mac application, Docker for Mac uses the macOS Hypervisor framework,
networking, and filesystem. It's the best solution if you want to build, debug,
test, package, and ship Dockerized applications on a Mac. Docker for Mac
supersedes [Docker Toolbox](#toolbox) as state-of-the-art Docker on macOS.
## Docker for Windows
[Docker for Windows](https://docs.docker.com/docker-for-windows/) is an
easy-to-install, lightweight Docker development environment designed
specifically for Windows 10 systems that support Microsoft Hyper-V
(Professional, Enterprise and Education). Docker for Windows uses Hyper-V for
virtualization, and runs as a native Windows app. It works with Windows Server
2016, and gives you the ability to set up and run Windows containers as well as
the standard Linux containers, with an option to switch between the two. Docker
for Windows is the best solution if you want to build, debug, test, package, and
ship Dockerized applications from Windows machines. Docker for Windows
supersedes [Docker Toolbox](#toolbox) as state-of-the-art Docker on Windows.
## Docker Hub
The [Docker Hub](https://hub.docker.com/) is a centralized resource for working with
Docker and its components. It provides the following services:
- Docker image hosting
- User authentication
- Automated image builds and work-flow tools such as build triggers and web hooks
- Integration with GitHub and Bitbucket
## Dockerfile
A Dockerfile is a text document that contains all the commands you would
normally execute manually in order to build a Docker image. Docker can
build images automatically by reading the instructions from a Dockerfile.
## filesystem
A file system is the method an operating system uses to name files
and assign them locations for efficient storage and retrieval.
Examples :
- Linux : ext4, aufs, btrfs, zfs
- Windows : NTFS
- macOS : HFS+
## image
Docker images are the basis of [containers](#container). An Image is an
ordered collection of root filesystem changes and the corresponding
execution parameters for use within a container runtime. An image typically
contains a union of layered filesystems stacked on top of each other. An image
does not have state and it never changes.
## libcontainer
libcontainer provides a native Go implementation for creating containers with
namespaces, cgroups, capabilities, and filesystem access controls. It allows
you to manage the lifecycle of the container performing additional operations
after the container is created.
## libnetwork
libnetwork provides a native Go implementation for creating and managing container
network namespaces and other network resources. It manage the networking lifecycle
of the container performing additional operations after the container is created.
## link
links provide a legacy interface to connect Docker containers running on the
same host to each other without exposing the hosts' network ports. Use the
Docker networks feature instead.
## Machine
[Machine](https://github.com/docker/machine) is a Docker tool which
makes it really easy to create Docker hosts on your computer, on
cloud providers and inside your own data center. It creates servers,
installs Docker on them, then configures the Docker client to talk to them.
*Also known as : docker-machine*
## node
A [node](https://docs.docker.com/engine/swarm/how-swarm-mode-works/nodes/) is a physical or virtual
machine running an instance of the Docker Engine in swarm mode.
**Manager nodes** perform swarm management and orchestration duties. By default
manager nodes are also worker nodes.
**Worker nodes** execute tasks.
## overlay network driver
Overlay network driver provides out of the box multi-host network connectivity
for docker containers in a cluster.
## overlay storage driver
OverlayFS is a [filesystem](#filesystem) service for Linux which implements a
[union mount](http://en.wikipedia.org/wiki/Union_mount) for other file systems.
It is supported by the Docker daemon as a storage driver.
## registry
A Registry is a hosted service containing [repositories](#repository) of [images](#image)
which responds to the Registry API.
The default registry can be accessed using a browser at [Docker Hub](#docker-hub)
or using the `docker search` command.
## repository
A repository is a set of Docker images. A repository can be shared by pushing it
to a [registry](#registry) server. The different images in the repository can be
labeled using [tags](#tag).
Here is an example of the shared [nginx repository](https://hub.docker.com/_/nginx/)
and its [tags](https://hub.docker.com/r/library/nginx/tags/)
## service
A [service](https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/) is the definition of how
you want to run your application containers in a swarm. At the most basic level
a service defines which container image to run in the swarm and which commands
to run in the container. For orchestration purposes, the service defines the
"desired state", meaning how many containers to run as tasks and constraints for
deploying the containers.
Frequently a service is a microservice within the context of some larger
application. Examples of services might include an HTTP server, a database, or
any other type of executable program that you wish to run in a distributed
environment.
## service discovery
Swarm mode [service discovery](https://docs.docker.com/engine/swarm/networking/#use-swarm-mode-service-discovery) is a DNS component
internal to the swarm that automatically assigns each service on an overlay
network in the swarm a VIP and DNS entry. Containers on the network share DNS
mappings for the service via gossip so any container on the network can access
the service via its service name.
You dont need to expose service-specific ports to make the service available to
other services on the same overlay network. The swarms internal load balancer
automatically distributes requests to the service VIP among the active tasks.
## swarm
A [swarm](https://docs.docker.com/engine/swarm/) is a cluster of one or more Docker Engines running in [swarm mode](#swarm-mode).
## Docker Swarm
Do not confuse [Docker Swarm](https://github.com/docker/swarm) with the [swarm mode](#swarm-mode) features in Docker Engine.
Docker Swarm is the name of a standalone native clustering tool for Docker.
Docker Swarm pools together several Docker hosts and exposes them as a single
virtual Docker host. It serves the standard Docker API, so any tool that already
works with Docker can now transparently scale up to multiple hosts.
*Also known as : docker-swarm*
## swarm mode
[Swarm mode](https://docs.docker.com/engine/swarm/) refers to cluster management and orchestration
features embedded in Docker Engine. When you initialize a new swarm (cluster) or
join nodes to a swarm, the Docker Engine runs in swarm mode.
## tag
A tag is a label applied to a Docker image in a [repository](#repository).
tags are how various images in a repository are distinguished from each other.
*Note : This label is not related to the key=value labels set for docker daemon*
## task
A [task](https://docs.docker.com/engine/swarm/how-swarm-mode-works/services/#/tasks-and-scheduling) is the
atomic unit of scheduling within a swarm. A task carries a Docker container and
the commands to run inside the container. Manager nodes assign tasks to worker
nodes according to the number of replicas set in the service scale.
The diagram below illustrates the relationship of services to tasks and
containers.
![services diagram](https://docs.docker.com/engine/swarm/images/services-diagram.png)
## Toolbox
[Docker Toolbox](https://docs.docker.com/toolbox/overview/) is a legacy
installer for Mac and Windows users. It uses Oracle VirtualBox for
virtualization.
For Macs running OS X El Capitan 10.11 and newer macOS releases, [Docker for
Mac](https://docs.docker.com/docker-for-mac/) is the better solution.
For Windows 10 systems that support Microsoft Hyper-V (Professional, Enterprise
and Education), [Docker for
Windows](https://docs.docker.com/docker-for-windows/) is the better solution.
## Union file system
Union file systems implement a [union
mount](https://en.wikipedia.org/wiki/Union_mount) and operate by creating
layers. Docker uses union file systems in conjunction with
[copy-on-write](#copy-on-write) techniques to provide the building blocks for
containers, making them very lightweight and fast.
For more on Docker and union file systems, see [Docker and AUFS in
practice](https://docs.docker.com/engine/userguide/storagedriver/aufs-driver/),
[Docker and Btrfs in
practice](https://docs.docker.com/engine/userguide/storagedriver/btrfs-driver/),
and [Docker and OverlayFS in
practice](https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/)
Example implementations of union file systems are
[UnionFS](https://en.wikipedia.org/wiki/UnionFS),
[AUFS](https://en.wikipedia.org/wiki/Aufs), and
[Btrfs](https://btrfs.wiki.kernel.org/index.php/Main_Page).
## virtual machine
A virtual machine is a program that emulates a complete computer and imitates dedicated hardware.
It shares physical hardware resources with other users but isolates the operating system. The
end user has the same experience on a Virtual Machine as they would have on dedicated hardware.
Compared to containers, a virtual machine is heavier to run, provides more isolation,
gets its own set of resources and does minimal sharing.
*Also known as : VM*

BIN
images/angles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 20 KiB

598
js/hopscotch.js Normal file
View File

@ -0,0 +1,598 @@
/**! hopscotch - v0.2.6
*
* Copyright 2016 LinkedIn Corp. All rights reserved.
*
* 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(a, b) {
"use strict";
if ("function" == typeof define && define.amd) define([], b);
else if ("object" == typeof exports) module.exports = b();
else {
var c = "hopscotch";
if (a[c]) return;
a[c] = b()
}
}(this, function() {
var Hopscotch, HopscotchBubble, HopscotchCalloutManager, HopscotchI18N, customI18N, customRenderer, customEscape, utils, callbacks, helpers, winLoadHandler, defaultOpts, winHopscotch, templateToUse = "bubble_default",
Sizzle = window.Sizzle || null,
undefinedStr = "undefined",
waitingToStart = !1,
hasJquery = typeof jQuery !== undefinedStr,
hasSessionStorage = !1,
isStorageWritable = !1,
document = window.document,
validIdRegEx = /^[a-zA-Z]+[a-zA-Z0-9_-]*$/,
rtlMatches = {
left: "right",
right: "left"
};
try {
typeof window.sessionStorage !== undefinedStr && (hasSessionStorage = !0, sessionStorage.setItem("hopscotch.test.storage", "ok"), sessionStorage.removeItem("hopscotch.test.storage"), isStorageWritable = !0)
} catch (err) {}
return defaultOpts = {
smoothScroll: !0,
scrollDuration: 1e3,
scrollTopMargin: 200,
showCloseButton: !0,
showPrevButton: !1,
showNextButton: !0,
bubbleWidth: 280,
bubblePadding: 15,
arrowWidth: 20,
skipIfNoElement: !0,
isRtl: !1,
cookieName: "hopscotch.tour.state"
}, Array.isArray || (Array.isArray = function(a) {
return "[object Array]" === Object.prototype.toString.call(a)
}), winLoadHandler = function() {
waitingToStart && winHopscotch.startTour()
}, utils = {
addClass: function(a, b) {
var c, d, e, f;
if (a.className) {
for (d = b.split(/\s+/), c = " " + a.className + " ", e = 0, f = d.length; f > e; ++e) c.indexOf(" " + d[e] + " ") < 0 && (c += d[e] + " ");
a.className = c.replace(/^\s+|\s+$/g, "")
} else a.className = b
},
removeClass: function(a, b) {
var c, d, e, f;
for (d = b.split(/\s+/), c = " " + a.className + " ", e = 0, f = d.length; f > e; ++e) c = c.replace(" " + d[e] + " ", " ");
a.className = c.replace(/^\s+|\s+$/g, "")
},
hasClass: function(a, b) {
var c;
return a.className ? (c = " " + a.className + " ", -1 !== c.indexOf(" " + b + " ")) : !1
},
getPixelValue: function(a) {
var b = typeof a;
return "number" === b ? a : "string" === b ? parseInt(a, 10) : 0
},
valOrDefault: function(a, b) {
return typeof a !== undefinedStr ? a : b
},
invokeCallbackArrayHelper: function(a) {
var b;
return Array.isArray(a) && (b = helpers[a[0]], "function" == typeof b) ? b.apply(this, a.slice(1)) : void 0
},
invokeCallbackArray: function(a) {
var b, c;
if (Array.isArray(a)) {
if ("string" == typeof a[0]) return utils.invokeCallbackArrayHelper(a);
for (b = 0, c = a.length; c > b; ++b) utils.invokeCallback(a[b])
}
},
invokeCallback: function(a) {
return "function" == typeof a ? a() : "string" == typeof a && helpers[a] ? helpers[a]() : utils.invokeCallbackArray(a)
},
invokeEventCallbacks: function(a, b) {
var c, d, e = callbacks[a];
if (b) return this.invokeCallback(b);
for (c = 0, d = e.length; d > c; ++c) this.invokeCallback(e[c].cb)
},
getScrollTop: function() {
var a;
return a = typeof window.pageYOffset !== undefinedStr ? window.pageYOffset : document.documentElement.scrollTop
},
getScrollLeft: function() {
var a;
return a = typeof window.pageXOffset !== undefinedStr ? window.pageXOffset : document.documentElement.scrollLeft
},
getWindowHeight: function() {
return window.innerHeight || document.documentElement.clientHeight
},
addEvtListener: function(a, b, c) {
return a ? a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent("on" + b, c) : void 0
},
removeEvtListener: function(a, b, c) {
return a ? a.removeEventListener ? a.removeEventListener(b, c, !1) : a.detachEvent("on" + b, c) : void 0
},
documentIsReady: function() {
return "complete" === document.readyState
},
evtPreventDefault: function(a) {
a.preventDefault ? a.preventDefault() : event && (event.returnValue = !1)
},
extend: function(a, b) {
var c;
for (c in b) b.hasOwnProperty(c) && (a[c] = b[c])
},
getStepTargetHelper: function(a) {
var b = document.getElementById(a);
if (b) return b;
if (hasJquery) return b = jQuery(a), b.length ? b[0] : null;
if (Sizzle) return b = new Sizzle(a), b.length ? b[0] : null;
if (document.querySelector) try {
return document.querySelector(a)
} catch (c) {}
return /^#[a-zA-Z][\w-_:.]*$/.test(a) ? document.getElementById(a.substring(1)) : null
},
getStepTarget: function(a) {
var b;
if (!a || !a.target) return null;
if ("string" == typeof a.target) return utils.getStepTargetHelper(a.target);
if (Array.isArray(a.target)) {
var c, d;
for (c = 0, d = a.target.length; d > c; c++)
if ("string" == typeof a.target[c] && (b = utils.getStepTargetHelper(a.target[c]))) return b;
return null
}
return a.target
},
getI18NString: function(a) {
return customI18N[a] || HopscotchI18N[a]
},
setState: function(a, b, c) {
var d, e = "";
if (hasSessionStorage && isStorageWritable) try {
sessionStorage.setItem(a, b)
} catch (f) {
isStorageWritable = !1, this.setState(a, b, c)
} else hasSessionStorage && sessionStorage.removeItem(a), c && (d = new Date, d.setTime(d.getTime() + 24 * c * 60 * 60 * 1e3), e = "; expires=" + d.toGMTString()), document.cookie = a + "=" + b + e + "; path=/"
},
getState: function(a) {
var b, c, d, e = a + "=",
f = document.cookie.split(";");
if (hasSessionStorage && (d = sessionStorage.getItem(a))) return d;
for (b = 0; b < f.length; b++) {
for (c = f[b];
" " === c.charAt(0);) c = c.substring(1, c.length);
if (0 === c.indexOf(e)) {
d = c.substring(e.length, c.length);
break
}
}
return d
},
clearState: function(a) {
hasSessionStorage ? sessionStorage.removeItem(a) : this.setState(a, "", -1)
},
normalizePlacement: function(a) {
!a.placement && a.orientation && (a.placement = a.orientation)
},
flipPlacement: function(a) {
if (a.isRtl && !a._isFlipped) {
var b, c, d = ["orientation", "placement"];
a.xOffset && (a.xOffset = -1 * this.getPixelValue(a.xOffset));
for (c in d) b = d[c], a.hasOwnProperty(b) && rtlMatches.hasOwnProperty(a[b]) && (a[b] = rtlMatches[a[b]]);
a._isFlipped = !0
}
}
}, utils.addEvtListener(window, "load", winLoadHandler), callbacks = {
next: [],
prev: [],
start: [],
end: [],
show: [],
error: [],
close: []
}, helpers = {}, HopscotchI18N = {
stepNums: null,
nextBtn: "Next",
prevBtn: "Back",
doneBtn: "Done",
skipBtn: "Skip",
closeTooltip: "&#215;"
}, customI18N = {}, HopscotchBubble = function(a) {
this.init(a)
}, HopscotchBubble.prototype = {
isShowing: !1,
currStep: void 0,
setPosition: function(a) {
var b, c, d, e, f, g, h, i = utils.getStepTarget(a),
j = this.element,
k = this.arrowEl,
l = a.isRtl ? "right" : "left";
if (utils.flipPlacement(a), utils.normalizePlacement(a), c = j.offsetWidth, b = j.offsetHeight, utils.removeClass(j, "fade-in-down fade-in-up fade-in-left fade-in-right"), d = i.getBoundingClientRect(), h = a.isRtl ? d.right - c : d.left, "top" === a.placement) e = d.top - b - this.opt.arrowWidth, f = h;
else if ("bottom" === a.placement) e = d.bottom + this.opt.arrowWidth, f = h;
else if ("left" === a.placement) e = d.top, f = d.left - c - this.opt.arrowWidth;
else {
if ("right" !== a.placement) throw new Error("Bubble placement failed because step.placement is invalid or undefined!");
e = d.top, f = d.right + this.opt.arrowWidth
}
g = "center" !== a.arrowOffset ? utils.getPixelValue(a.arrowOffset) : a.arrowOffset, g ? "top" === a.placement || "bottom" === a.placement ? (k.style.top = "", "center" === g ? k.style[l] = Math.floor(c / 2 - k.offsetWidth / 2) + "px" : k.style[l] = g + "px") : ("left" === a.placement || "right" === a.placement) && (k.style[l] = "", "center" === g ? k.style.top = Math.floor(b / 2 - k.offsetHeight / 2) + "px" : k.style.top = g + "px") : (k.style.top = "", k.style[l] = ""), "center" === a.xOffset ? f = d.left + i.offsetWidth / 2 - c / 2 : f += utils.getPixelValue(a.xOffset), "center" === a.yOffset ? e = d.top + i.offsetHeight / 2 - b / 2 : e += utils.getPixelValue(a.yOffset), a.fixedElement || (e += utils.getScrollTop(), f += utils.getScrollLeft()), j.style.position = a.fixedElement ? "fixed" : "absolute", j.style.top = e + "px", j.style.left = f + "px"
},
render: function(a, b, c) {
var d, e, f, g, h, i, j, k, l, m, n = this.element;
if (a ? this.currStep = a : this.currStep && (a = this.currStep), this.opt.isTourBubble ? (g = winHopscotch.getCurrTour(), g && (e = g.customData, d = g.customRenderer, a.isRtl = a.hasOwnProperty("isRtl") ? a.isRtl : g.hasOwnProperty("isRtl") ? g.isRtl : this.opt.isRtl, f = g.unsafe, Array.isArray(g.steps) && (h = g.steps.length, i = this._getStepI18nNum(this._getStepNum(h - 1)), k = this._getStepNum(b) === this._getStepNum(h - 1)))) : (e = a.customData, d = a.customRenderer, f = a.unsafe, a.isRtl = a.hasOwnProperty("isRtl") ? a.isRtl : this.opt.isRtl), j = k ? utils.getI18NString("doneBtn") : a.showSkip ? utils.getI18NString("skipBtn") : utils.getI18NString("nextBtn"), utils.flipPlacement(a), utils.normalizePlacement(a), this.placement = a.placement, m = {
i18n: {
prevBtn: utils.getI18NString("prevBtn"),
nextBtn: j,
closeTooltip: utils.getI18NString("closeTooltip"),
stepNum: this._getStepI18nNum(this._getStepNum(b)),
numSteps: i
},
buttons: {
showPrev: utils.valOrDefault(a.showPrevButton, this.opt.showPrevButton) && this._getStepNum(b) > 0,
showNext: utils.valOrDefault(a.showNextButton, this.opt.showNextButton),
showCTA: utils.valOrDefault(a.showCTAButton && a.ctaLabel, !1),
ctaLabel: a.ctaLabel,
showClose: utils.valOrDefault(this.opt.showCloseButton, !0)
},
step: {
num: b,
isLast: utils.valOrDefault(k, !1),
title: a.title || "",
content: a.content || "",
isRtl: a.isRtl,
placement: a.placement,
padding: utils.valOrDefault(a.padding, this.opt.bubblePadding),
width: utils.getPixelValue(a.width) || this.opt.bubbleWidth,
customData: a.customData || {}
},
tour: {
isTour: this.opt.isTourBubble,
numSteps: h,
unsafe: utils.valOrDefault(f, !1),
customData: e || {}
}
}, "function" == typeof d) n.innerHTML = d(m);
else if ("string" == typeof d) {
if (!winHopscotch.templates || "function" != typeof winHopscotch.templates[d]) throw new Error('Bubble rendering failed - template "' + d + '" is not a function.');
n.innerHTML = winHopscotch.templates[d](m)
} else if (customRenderer) n.innerHTML = customRenderer(m);
else {
if (!winHopscotch.templates || "function" != typeof winHopscotch.templates[templateToUse]) throw new Error('Bubble rendering failed - template "' + templateToUse + '" is not a function.');
n.innerHTML = winHopscotch.templates[templateToUse](m)
}
for (children = n.children, numChildren = children.length, l = 0; l < numChildren; l++) node = children[l], utils.hasClass(node, "hopscotch-arrow") && (this.arrowEl = node);
return n.style.zIndex = "number" == typeof a.zindex ? a.zindex : "", this._setArrow(a.placement), this.hide(!1), this.setPosition(a), c && c(!a.fixedElement), this
},
_getStepNum: function(a) {
var b, c, d = 0,
e = winHopscotch.getSkippedStepsIndexes(),
f = e.length;
for (c = 0; f > c; c++) b = e[c], a > b && d++;
return a - d
},
_getStepI18nNum: function(a) {
var b = utils.getI18NString("stepNums");
return b && a < b.length ? a = b[a] : a += 1, a
},
_setArrow: function(a) {
utils.removeClass(this.arrowEl, "down up right left"), "top" === a ? utils.addClass(this.arrowEl, "down") : "bottom" === a ? utils.addClass(this.arrowEl, "up") : "left" === a ? utils.addClass(this.arrowEl, "right") : "right" === a && utils.addClass(this.arrowEl, "left")
},
_getArrowDirection: function() {
return "top" === this.placement ? "down" : "bottom" === this.placement ? "up" : "left" === this.placement ? "right" : "right" === this.placement ? "left" : void 0
},
show: function() {
var a = this,
b = "fade-in-" + this._getArrowDirection(),
c = 1e3;
return utils.removeClass(this.element, "hide"), utils.addClass(this.element, b), setTimeout(function() {
utils.removeClass(a.element, "invisible")
}, 50), setTimeout(function() {
utils.removeClass(a.element, b)
}, c), this.isShowing = !0, this
},
hide: function(a) {
var b = this.element;
return a = utils.valOrDefault(a, !0), b.style.top = "", b.style.left = "", a ? (utils.addClass(b, "hide"), utils.removeClass(b, "invisible")) : (utils.removeClass(b, "hide"), utils.addClass(b, "invisible")), utils.removeClass(b, "animate fade-in-up fade-in-down fade-in-right fade-in-left"), this.isShowing = !1, this
},
destroy: function() {
var a = this.element;
a && a.parentNode.removeChild(a), utils.removeEvtListener(a, "click", this.clickCb)
},
_handleBubbleClick: function(a) {
function b(c) {
return c === a.currentTarget ? null : utils.hasClass(c, "hopscotch-cta") ? "cta" : utils.hasClass(c, "hopscotch-next") ? "next" : utils.hasClass(c, "hopscotch-prev") ? "prev" : utils.hasClass(c, "hopscotch-close") ? "close" : b(c.parentElement)
}
var c;
a = a || window.event;
var d = a.target || a.srcElement;
if (c = b(d), "cta" === c) this.opt.isTourBubble || winHopscotch.getCalloutManager().removeCallout(this.currStep.id), this.currStep.onCTA && utils.invokeCallback(this.currStep.onCTA);
else if ("next" === c) winHopscotch.nextStep(!0);
else if ("prev" === c) winHopscotch.prevStep(!0);
else if ("close" === c) {
if (this.opt.isTourBubble) {
var e = winHopscotch.getCurrStepNum(),
f = winHopscotch.getCurrTour(),
g = e === f.steps.length - 1;
utils.invokeEventCallbacks("close"), winHopscotch.endTour(!0, g)
} else this.opt.onClose && utils.invokeCallback(this.opt.onClose), this.opt.id && !this.opt.isTourBubble ? winHopscotch.getCalloutManager().removeCallout(this.opt.id) : this.destroy();
utils.evtPreventDefault(a)
}
},
init: function(a) {
var b, c, d, e, f = document.createElement("div"),
g = this,
h = !1;
this.element = f, e = {
showPrevButton: defaultOpts.showPrevButton,
showNextButton: defaultOpts.showNextButton,
bubbleWidth: defaultOpts.bubbleWidth,
bubblePadding: defaultOpts.bubblePadding,
arrowWidth: defaultOpts.arrowWidth,
isRtl: defaultOpts.isRtl,
showNumber: !0,
isTourBubble: !0
}, a = typeof a === undefinedStr ? {} : a, utils.extend(e, a), this.opt = e, f.className = "hopscotch-bubble", e.isTourBubble ? (d = winHopscotch.getCurrTour(), d && utils.addClass(f, "tour-" + d.id)) : utils.addClass(f, "hopscotch-callout no-number"), b = function() {
!h && g.isShowing && (h = !0, setTimeout(function() {
g.setPosition(g.currStep), h = !1
}, 100))
}, utils.addEvtListener(window, "resize", b), this.clickCb = function(a) {
g._handleBubbleClick(a)
}, utils.addEvtListener(f, "click", this.clickCb), this.hide(), utils.documentIsReady() ? document.body.appendChild(f) : (document.addEventListener ? (c = function() {
document.removeEventListener("DOMContentLoaded", c), window.removeEventListener("load", c), document.body.appendChild(f)
}, document.addEventListener("DOMContentLoaded", c, !1)) : (c = function() {
"complete" === document.readyState && (document.detachEvent("onreadystatechange", c), window.detachEvent("onload", c), document.body.appendChild(f))
}, document.attachEvent("onreadystatechange", c)), utils.addEvtListener(window, "load", c))
}
}, HopscotchCalloutManager = function() {
var a = {},
b = {};
this.createCallout = function(c) {
var d;
if (!c.id) throw new Error("Must specify a callout id.");
if (!validIdRegEx.test(c.id)) throw new Error("Callout ID is using an invalid format. Use alphanumeric, underscores, and/or hyphens only. First character must be a letter.");
if (a[c.id]) throw new Error("Callout by that id already exists. Please choose a unique id.");
if (!utils.getStepTarget(c)) throw new Error("Must specify existing target element via 'target' option.");
return c.showNextButton = c.showPrevButton = !1, c.isTourBubble = !1, d = new HopscotchBubble(c), a[c.id] = d, b[c.id] = c, d.render(c, null, function() {
d.show(), c.onShow && utils.invokeCallback(c.onShow)
}), d
}, this.getCallout = function(b) {
return a[b]
}, this.removeAllCallouts = function() {
var b;
for (b in a) a.hasOwnProperty(b) && this.removeCallout(b)
}, this.removeCallout = function(c) {
var d = a[c];
a[c] = null, b[c] = null, d && d.destroy()
}, this.refreshCalloutPositions = function() {
var c, d, e;
for (c in a) a.hasOwnProperty(c) && b.hasOwnProperty(c) && (d = a[c], e = b[c], d && e && d.setPosition(e))
}
}, Hopscotch = function(a) {
var b, c, d, e, f, g, h, i, j = this,
k = {},
l = [],
m = function(a) {
return b && b.element && b.element.parentNode || (b = new HopscotchBubble(d)), a && utils.extend(b.opt, {
bubblePadding: o("bubblePadding"),
bubbleWidth: o("bubbleWidth"),
showNextButton: o("showNextButton"),
showPrevButton: o("showPrevButton"),
showCloseButton: o("showCloseButton"),
arrowWidth: o("arrowWidth"),
isRtl: o("isRtl")
}), b
},
n = function() {
b && (b.destroy(), b = null)
},
o = function(a) {
return "undefined" == typeof d ? defaultOpts[a] : utils.valOrDefault(d[a], defaultOpts[a])
},
p = function() {
var a;
return a = !e || 0 > f || f >= e.steps.length ? null : e.steps[f]
},
q = function() {
j.nextStep()
},
r = function(a) {
var b, c, d, e, f, g, h = m(),
i = h.element,
j = utils.getPixelValue(i.style.top),
k = j + utils.getPixelValue(i.offsetHeight),
l = utils.getStepTarget(p()),
n = l.getBoundingClientRect(),
q = n.top + utils.getScrollTop(),
r = n.bottom + utils.getScrollTop(),
s = q > j ? j : q,
t = k > r ? k : r,
u = utils.getScrollTop(),
v = u + utils.getWindowHeight(),
w = s - o("scrollTopMargin");
s >= u && (s <= u + o("scrollTopMargin") || v >= t) ? a && a() : o("smoothScroll") ? typeof YAHOO !== undefinedStr && typeof YAHOO.env !== undefinedStr && typeof YAHOO.env.ua !== undefinedStr && typeof YAHOO.util !== undefinedStr && typeof YAHOO.util.Scroll !== undefinedStr ? (b = YAHOO.env.ua.webkit ? document.body : document.documentElement, d = YAHOO.util.Easing ? YAHOO.util.Easing.easeOut : void 0, c = new YAHOO.util.Scroll(b, {
scroll: {
to: [0, w]
}
}, o("scrollDuration") / 1e3, d), c.onComplete.subscribe(a), c.animate()) : hasJquery ? jQuery("body, html").animate({
scrollTop: w
}, o("scrollDuration"), a) : (0 > w && (w = 0), e = u > s ? -1 : 1, f = Math.abs(u - w) / (o("scrollDuration") / 10), (g = function() {
var b = utils.getScrollTop(),
c = b + e * f;
return e > 0 && c >= w || 0 > e && w >= c ? (c = w, a && a(), void window.scrollTo(0, c)) : (window.scrollTo(0, c), utils.getScrollTop() === b ? void(a && a()) : void setTimeout(g, 10))
})()) : (window.scrollTo(0, w), a && a())
},
s = function(a, b) {
var c, d, g;
f + a >= 0 && f + a < e.steps.length ? (f += a, d = p(), g = function() {
c = utils.getStepTarget(d), c ? (k[f] && delete k[f], b(f)) : (k[f] = !0, utils.invokeEventCallbacks("error"), s(a, b))
}, d.delay ? setTimeout(g, d.delay) : g()) : b(-1)
},
t = function(a, b) {
var c, d, g, h, i = m(),
j = this;
if (i.hide(), a = utils.valOrDefault(a, !0), c = p(), c.nextOnTargetClick && utils.removeEvtListener(utils.getStepTarget(c), "click", q), d = c, g = b > 0 ? d.multipage : f > 0 && e.steps[f - 1].multipage, h = function(c) {
var e;
if (-1 === c) return this.endTour(!0);
if (a && (e = b > 0 ? utils.invokeEventCallbacks("next", d.onNext) : utils.invokeEventCallbacks("prev", d.onPrev)), c === f) {
if (g) return void x();
e = utils.valOrDefault(e, !0), e ? this.showStep(c) : this.endTour(!1)
}
}, !g && o("skipIfNoElement")) s(b, function(a) {
h.call(j, a)
});
else if (f + b >= 0 && f + b < e.steps.length) {
if (f += b, c = p(), !utils.getStepTarget(c) && !g) return utils.invokeEventCallbacks("error"), this.endTour(!0, !1);
h.call(this, f)
} else if (f + b === e.steps.length) return this.endTour();
return this
},
u = function(a) {
var b, c, d, e = {};
for (b in a) a.hasOwnProperty(b) && "id" !== b && "steps" !== b && (e[b] = a[b]);
return i.call(this, e, !0), c = utils.getState(o("cookieName")), c && (d = c.split(":"), g = d[0], h = d[1], d.length > 2 && (l = d[2].split(",")), h = parseInt(h, 10)), this
},
v = function(a, b, c) {
var d, e;
if (f = a || 0, k = b || {}, d = p(), e = utils.getStepTarget(d)) return void c(f);
if (!e) {
if (utils.invokeEventCallbacks("error"), k[f] = !0, o("skipIfNoElement")) return void s(1, c);
f = -1, c(f)
}
},
w = function(a) {
function b() {
d.show(), utils.invokeEventCallbacks("show", c.onShow)
}
var c = e.steps[a],
d = m(),
g = utils.getStepTarget(c);
f !== a && p().nextOnTargetClick && utils.removeEvtListener(utils.getStepTarget(p()), "click", q), f = a, d.hide(!1), d.render(c, a, function(a) {
a ? r(b) : b(), c.nextOnTargetClick && utils.addEvtListener(g, "click", q)
}), x()
},
x = function() {
var a = e.id + ":" + f,
b = winHopscotch.getSkippedStepsIndexes();
b && b.length > 0 && (a += ":" + b.join(",")), utils.setState(o("cookieName"), a, 1)
},
y = function(a) {
a && this.configure(a)
};
this.getCalloutManager = function() {
return typeof c === undefinedStr && (c = new HopscotchCalloutManager), c
}, this.startTour = function(a, b) {
var c, d, f = {},
i = this;
if (!e) {
if (!a) throw new Error("Tour data is required for startTour.");
if (!a.id || !validIdRegEx.test(a.id)) throw new Error("Tour ID is using an invalid format. Use alphanumeric, underscores, and/or hyphens only. First character must be a letter.");
e = a, u.call(this, a)
}
if (typeof b !== undefinedStr) {
if (b >= e.steps.length) throw new Error("Specified step number out of bounds.");
d = b
}
if (!utils.documentIsReady()) return waitingToStart = !0, this;
if ("undefined" == typeof d && e.id === g && typeof h !== undefinedStr) {
if (d = h, l.length > 0)
for (var j = 0, k = l.length; k > j; j++) f[l[j]] = !0
} else d || (d = 0);
return v(d, f, function(a) {
var b = -1 !== a && utils.getStepTarget(e.steps[a]);
return b ? (utils.invokeEventCallbacks("start"), c = m(), c.hide(!1), i.isActive = !0, void(utils.getStepTarget(p()) ? i.showStep(a) : (utils.invokeEventCallbacks("error"), o("skipIfNoElement") && i.nextStep(!1)))) : void i.endTour(!1, !1)
}), this
}, this.showStep = function(a) {
var b = e.steps[a],
c = f;
return utils.getStepTarget(b) ? (b.delay ? setTimeout(function() {
w(a)
}, b.delay) : w(a), this) : (f = a, utils.invokeEventCallbacks("error"), void(f = c))
}, this.prevStep = function(a) {
return t.call(this, a, -1), this
}, this.nextStep = function(a) {
return t.call(this, a, 1), this
}, this.endTour = function(a, b) {
var c, d = m();
return a = utils.valOrDefault(a, !0), b = utils.valOrDefault(b, !0), e && (c = p(), c && c.nextOnTargetClick && utils.removeEvtListener(utils.getStepTarget(c), "click", q)), f = 0, h = void 0, d.hide(), a && utils.clearState(o("cookieName")), this.isActive && (this.isActive = !1, e && b && utils.invokeEventCallbacks("end")), this.removeCallbacks(null, !0), this.resetDefaultOptions(), n(), e = null, this
}, this.getCurrTour = function() {
return e
}, this.getCurrTarget = function() {
return utils.getStepTarget(p())
}, this.getCurrStepNum = function() {
return f
}, this.getSkippedStepsIndexes = function() {
var a, b = [];
for (a in k) b.push(a);
return b
}, this.refreshBubblePosition = function() {
var a = p();
return a && m().setPosition(a), this.getCalloutManager().refreshCalloutPositions(), this
}, this.listen = function(a, b, c) {
return a && callbacks[a].push({
cb: b,
fromTour: c
}), this
}, this.unlisten = function(a, b) {
var c, d, e = callbacks[a];
for (c = 0, d = e.length; d > c; ++c) e[c].cb === b && e.splice(c, 1);
return this
}, this.removeCallbacks = function(a, b) {
var c, d, e, f;
for (f in callbacks)
if (!a || a === f)
if (b)
for (c = callbacks[f], d = 0, e = c.length; e > d; ++d) c[d].fromTour && (c.splice(d--, 1), --e);
else callbacks[f] = [];
return this
}, this.registerHelper = function(a, b) {
"string" == typeof a && "function" == typeof b && (helpers[a] = b)
}, this.unregisterHelper = function(a) {
helpers[a] = null
}, this.invokeHelper = function(a) {
var b, c, d = [];
for (b = 1, c = arguments.length; c > b; ++b) d.push(arguments[b]);
helpers[a] && helpers[a].call(null, d)
}, this.setCookieName = function(a) {
return d.cookieName = a, this
}, this.resetDefaultOptions = function() {
return d = {}, this
}, this.resetDefaultI18N = function() {
return customI18N = {}, this
}, this.getState = function() {
return utils.getState(o("cookieName"))
}, i = function(a, b) {
var c, e, f, g, h = ["next", "prev", "start", "end", "show", "error", "close"];
for (d || this.resetDefaultOptions(), utils.extend(d, a), a && utils.extend(customI18N, a.i18n), f = 0, g = h.length; g > f; ++f) e = "on" + h[f].charAt(0).toUpperCase() + h[f].substring(1), a[e] && this.listen(h[f], a[e], b);
return c = m(!0), this
}, this.configure = function(a) {
return i.call(this, a, !1)
}, this.setRenderer = function(a) {
var b = typeof a;
return "string" === b ? (templateToUse = a, customRenderer = void 0) : "function" === b && (customRenderer = a), this
}, this.setEscaper = function(a) {
return "function" == typeof a && (customEscape = a), this
}, y.call(this, a)
}, winHopscotch = new Hopscotch,
function() {
var _ = {};
_.escape = function(a) {
return customEscape ? customEscape(a) : null == a ? "" : ("" + a).replace(new RegExp("[&<>\"']", "g"), function(a) {
return "&" == a ? "&amp;" : "<" == a ? "&lt;" : ">" == a ? "&gt;" : '"' == a ? "&quot;" : "'" == a ? "&#x27;" : void 0
})
}, this.templates = this.templates || {}, this.templates.bubble_default = function(obj) {
function optEscape(a, b) {
return b ? _.escape(a) : a
}
obj || (obj = {});
var __t, __p = "";
_.escape, Array.prototype.join;
with(obj) __p += '\n<div class="hopscotch-bubble-container" style="width: ' + (null == (__t = step.width) ? "" : __t) + "px; padding: " + (null == (__t = step.padding) ? "" : __t) + 'px;">\n ', tour.isTour && (__p += '<span class="hopscotch-bubble-number">' + (null == (__t = i18n.stepNum) ? "" : __t) + "</span>"), __p += '\n <div class="hopscotch-bubble-content">\n ', "" !== step.title && (__p += '<h3 class="hopscotch-title">' + (null == (__t = optEscape(step.title, tour.unsafe)) ? "" : __t) + "</h3>"), __p += "\n ", "" !== step.content && (__p += '<div class="hopscotch-content">' + (null == (__t = optEscape(step.content, tour.unsafe)) ? "" : __t) + "</div>"), __p += '\n </div>\n <div class="hopscotch-actions">\n ', buttons.showPrev && (__p += '<button class="hopscotch-nav-button prev hopscotch-prev">' + (null == (__t = i18n.prevBtn) ? "" : __t) + "</button>"), __p += "\n ", buttons.showCTA && (__p += '<button class="hopscotch-nav-button next hopscotch-cta">' + (null == (__t = buttons.ctaLabel) ? "" : __t) + "</button>"), __p += "\n ", buttons.showNext && (__p += '<button class="hopscotch-nav-button next hopscotch-next">' + (null == (__t = i18n.nextBtn) ? "" : __t) + "</button>"), __p += "\n </div>\n ", buttons.showClose && (__p += '<button title="Close" class="hopscotch-bubble-close hopscotch-close">' + (null == (__t = i18n.closeTooltip) ? "" : __t) + "</button>"), __p += '\n</div>\n<div class="hopscotch-bubble-arrow-container hopscotch-arrow">\n <div class="hopscotch-bubble-arrow-border"></div>\n <div class="hopscotch-bubble-arrow"></div>\n</div>';
return __p
}
}.call(winHopscotch), winHopscotch
});

View File

@ -56,9 +56,6 @@ function hookupTOCEvents()
}
return false;
});
$(".currentPage").each(function(){
$(this).parentsUntil($('.docsidebarnav_section')).addClass("active").removeClass("menu-closed").addClass("menu-open");
});
$(".left-off-canvas-menu").css("display","block");
// console.log(metadata);
$("#st-search-input").on('keyup change', function(e) {

189
js/my_first_tour.js Normal file
View File

@ -0,0 +1,189 @@
// Find which tab is currently active
function findActiveTab() {
var tab;
$( "#top-nav li" ).each(function() {
if ( $( this ).hasClass( "active" ) ) {
tab = $( this ).attr('id');
}
});
return tab;
}
var wasActive = findActiveTab();
function removeActiveFromTabs() {
$( "#top-nav li" ).each(function() {
$( this ).removeClass( "active" );
});
}
// Define the tour!
var tour = {
id: "hello-hopscotch",
steps: [
{
title: "Navigation improvements!",
content: "We've improved the navigation for the Docker documentation!<br /><br /><b>This tour takes less than a minute.</b><br /><br />It highlights and explains each improvement, then returns you to the current page.<br /><br />You'll learn about:<br /><ul><li>New top navigation</li><li>Left-hand navigation</li><li>Feedback links</li><li>In-page navigation</li></ul>",
target: "main-content",
placement: "top",
xOffset: "center",
yOffset: "400px",
width: "400px",
onShow: function () {
// Hide the arrow on the first navigation bubble
$('.hopscotch-bubble-arrow-container').css('visibility', 'hidden');
},
multipage: "true",
onNext: function() {
window.location = "/engine/swarm/admin_guide/";
}
},
{
title: "Top Navigation",
content: "Use the top-level tabs to discover the types of content available.",
target: "top-nav-container",
placement: "bottom",
arrowOffset: "560px",
width: "570px",
onShow: function () {
// Show the arrow again
$('.hopscotch-bubble-arrow-container').css('visibility', 'visible');
}
},
{
title: "Guides",
content: "Learn how to install, configure, and manage Docker as a whole, or view the docs archives for previous Docker versions.",
target: "top-nav",
placement: "bottom",
width: "570px",
onShow: function() {
removeActiveFromTabs();
$('#guides').addClass('active');
}
},
{
title: "Product Manuals",
content: "Learn about Docker products and tools, such as Docker Cloud, UCP, Docker for Mac, or Docker for Windows.",
target: "top-nav",
placement: "bottom",
width: "570px",
arrowOffset: "140px",
onShow: function() {
removeActiveFromTabs();
$('#manuals').addClass('active');
}
},
{
title: "Glossary",
content: "Learn about terminology specific to Docker.",
target: "top-nav",
placement: "bottom",
width: "570px",
arrowOffset: "280px",
onShow: function() {
removeActiveFromTabs();
$('#glossary').addClass('active');
}
},
{
title: "Reference",
content: "Go straight to reference information about Docker, such as API and CLI reference topics.",
target: "top-nav",
placement: "bottom",
width: "570px",
arrowOffset: "390px",
onShow: function() {
removeActiveFromTabs();
$('#reference').addClass('active');
}
},
{
title: "Samples",
content: "Learn about Docker by using self-paced tutorials, labs, and sample Docker applications.",
target: "top-nav",
placement: "bottom",
width: "570px",
arrowOffset: "490px",
onShow: function() {
// Set class `active` on the samples section
removeActiveFromTabs();
$('#samples').addClass('active');
},
onNext: function() {
removeActiveFromTabs();
$( "#" + wasActive ).addClass('active');
}
},
{
title: "Left Navigation",
content: "Use the left navigation to browse a structured view of all topics provided within a tab.",
target: "left-nav",
placement: "right",
yOffset: "100px",
arrowOffset: "center"
},
{
title: "Feedback Links",
content: "Use these options to edit the page, provide feedback, or find out how to get support.",
target: "feedback-links",
placement: "left",
arrowOffset: "center"
},
{
title: "On-page navigation",
content: "Use on-page links to jump to topics on the page you are currently viewing.<br /><br />This is especially helpful for long pages with lots of content.",
target: "side-toc",
placement: "left",
yOffset: "100px",
arrowOffset: "center"
},
{
title: "The tour is complete!",
content: "Thanks for checking out the new navigation features. You will now be returned to where you started.",
target: "main-content",
placement: "top",
xOffset: "center",
yOffset: "300px",
onShow: function () {
// Hide the arrow on the first navigation bubble
$('.hopscotch-bubble-arrow-container').css('visibility', 'hidden');
}
}
],
showPrevButton: true,
scrollTopMargin: 200,
skipIfNoElement: false,
onEnd: function() {
// reset the active tab if they bail before it is done
removeActiveFromTabs();
$( "#" + wasActive ).addClass('active');
// Return them back where they came from when the tour ends
hopscotch.endTour(true);
window.location = document.referrer;
},
onClose: function() {
// reset the active tab if they bail before it is done
removeActiveFromTabs();
$( "#" + wasActive ).addClass('active');
// Return them back where they came from if they end the tour early
hopscotch.endTour(true);
window.location = document.referrer;
}
};
// Start tour if button is pressed
$("#start-tour").click(function(){
hopscotch.endTour(true);
hopscotch.startTour(tour);
ga('send', {
hitType: 'event',
eventCategory: 'Tour',
eventAction: 'play',
eventLabel: 'Navigation Tour'
});
});
// Resume tour if already in progress
if (hopscotch.getState() != null) {
hopscotch.startTour(tour, hopscotch.getState());
}

41
manuals.md Normal file
View File

@ -0,0 +1,41 @@
---
title: Product and tool manuals
skip-right-nav: true
---
The Docker platform is comprised of a family of tools and products. After
learning the general principles of the Docker workflow under [Guides](/), you
can find the documentation for these tools and products here.
## Products
Commercial Docker products that turn your container-based solution into a
production-ready application.
| Product | Description |
| ------- | ----------- |
| [Docker Cloud](/docker-cloud/overview) | Manages multi-container applications and host resources running on a cloud provider (such as Amazon Web Services) |
| [Universal Control Plane (UCP)](/ucp/overview/) | Manages multi-container applications on a custom host installation (on-premise, on a cloud provider) |
| [Docker Trusted Registry (DTR)](/docker-trusted-registry/) | Runs a private repository of container images and makes them available to a UCP instance |
| [Docker Store](/docker-store/) | Public, Docker-hosted registry that distributes free and paid images from various publishers |
| [CS Docker Engine](/cs-engine/install) | The commercially-supported version of Docker that excludes experimental features and includes customer support |
## Tools
Free downloadables that help your device use Docker containers.
| Tool | Description |
| ---- | ----------- |
| [Docker for Mac](/docker-for-mac/) | Docker desktop solution that includes everything a developer needs to create and test applications on a Mac |
| [Docker for Windows](/docker-for-windows) | Docker desktop solution that includes everything a developer needs to create and test applications on a Windows system|
| [Docker for Linux](/engine/installation/#on-linux) | Installation guides for running Docker on all supported Linux distros. |
| [Docker Compose](/compose/) | Enables you to define, build, and run multi-container applications |
| [Docker Notary](/notary/) | Allows the signing of container images to enable Docker Content Trust |
| [Docker Registry](/registry/) | The software that powers Docker Hub and Docker Store, Registry stores and distributes container images |
## Superseded products and tools
* [Docker Hub](/docker-hub/) - Superseded by Docker Store and Docker Cloud
* [Docker Swarm](/swarm/) - Functionality folded directly into native Docker, no longer a standalone tool
* [Docker Toolbox](/toolbox/overview/) - Superseded by Docker for Mac and Windows

46
reference.md Normal file
View File

@ -0,0 +1,46 @@
---
title: Reference documentation
skip-right-nav: true
---
This section includes the reference documentation for the Docker platform's
various APIs, CLIs, and file formats.
## File formats
| File format | Description |
| ----------- | ----------- |
| [Dockerfile](/engine/reference/builder/) | Defines the contents and startup behavior of a single container |
| [Compose file](/compose/compose-file/) | Defines a multi-container application |
| [Stack file](/docker-cloud/apps/stack-yaml-reference/) | Defines a multi-container application for Docker Cloud |
## Command-line interfaces (CLIs)
| CLI | Description |
| --- | ----------- |
| [Engine CLI](/engine/reference/commandline/) | The main CLI for Docker, includes all `docker` and [`dockerd`](/engine/reference/commandline/dockerd/) commands. |
| [Compose CLI](/compose/reference/overview/) | The CLI for Docker Compose, which allows you to build and run multi-container applications |
| [Machine CLI](/machine/reference/) | Manages virtual machines that are pre-configured to run Docker |
| [UCP tool](/datacenter/ucp/2.0/reference/cli/) | Manages a Universal Control Plane instance |
| [Trusted Registry CLI](/docker-trusted-registry/reference/) | Manages a trusted registry |
## Application programming interfaces (APIs)
| API | Description |
| --- | ----------- |
| [Cloud API](/apidocs/docker-cloud/) | Enables programmatic management of your Docker application running on a cloud provider |
| [Docker ID accounts API](/docker-id/api-reference/) | An API for accessing and updating Docker ID accounts |
| [Engine API](/engine/api/) | The main API for Docker, provides programmatic access to a [daemon](/glossary/#daemon) |
| [Registry API](/registry/spec/api/) | Facilitates distribution of images to the engine |
| [Trusted Registry API](/apidocs/overview/) | Provides programmatic access to a trusted registry |
## Drivers and specifications
| Driver | Description |
| ------ | ----------- |
| [Image specification](/registry/spec/manifest-v2-2/) | Describes the various components of a Docker image |
| [Machine drivers](/machine/drivers/os-base/) | Enables support for given cloud providers when provisioning resources with Machine |
| [Registry token authentication](/registry/spec/auth/) | Outlines the Docker registry authentication scheme |
| [Registry storage drivers](/registry/storage-drivers/) | Enables support for given cloud providers when storing images with Registry |

48
samples.md Normal file
View File

@ -0,0 +1,48 @@
---
title: Samples
skip-right-nav: true
---
## Docker samples
The following samples were developed by Docker and the Docker community.
{% assign labsbase = "https://github.com/docker/labs/tree/master" %}
## Tutorial labs
Learn how to develop and ship containerized applications, by walking through a
sample that exhibits canonical practices. These labs are from the [Docker Labs
repository]({{ labsbase }}).
| Sample | Description |
| ------ | ----------- |
| [Docker for Beginners]({{ labsbase }}/beginner/){: target="_blank"} | A good "Docker 101" course. |
| [Docker Swarm mode]({{ labsbase}}/swarm-mode){: target="_blank"} | Use Docker for natively managing a cluster of Docker Engines called a swarm. |
| [Service deployment in the cloud]({{ labsbase}}/swarm-mode/cloud-quick-start){: target="_blank"} | This script creates a swarm cluster and deploys a simple service on a cloud provider. |
| [Configuring developer tools and programming languages]({{ labsbase }}/developer-tools/README.md){: target="_blank"} | How to set-up and use common developer tools and programming languages with Docker. |
| [Live Debugging Java with Docker]({{ labsbase }}/developer-tools/java-debugging){: target="_blank"} | Java developers can use Docker to build a development environment where they can run, test, and live debug code running within a container. |
| [Docker for Java Developers]({{ labsbase }}/developer-tools/java/){: target="_blank"} | Offers Java developers an intro-level and self-paced hands-on workshop with Docker. |
| [Live Debugging a Node.js application in Docker]({{ labsbase }}/developer-tools/nodejs-debugging){: target="_blank"} | Node developers can use Docker to build a development environment where they can run, test, and live debug code running within a container. |
| [Dockerizing a Node.js application]({{ labsbase }}/developer-tools/nodejs/porting/){: target="_blank"} | This tutorial starts with a simple Node.js application and details the steps needed to Dockerize it and ensure its scalability. |
| [Docker for ASP.NET and Windows containers]({{ labsbase }}/windows/readme.md){: target="_blank"} | Docker supports Windows containers, too! Learn how to run ASP.NET, SQL Server, and more in these tutorials. |
| [Docker Security]({{ labsbase }}/security/README.md){: target="_blank"} | How to take advantage of a Docker security features. |
| [Building a 12-factor application with Docker]({{ labsbase}}/12factor){: target="_blank"} | Use Docker to create an app that conforms to Heroku's "12 factors for cloud-native applications." |
## Sample applications
Run popular software using Docker.
| Sample | Description |
| ------ | ----------- |
| [apt-cacher-ng](/engine/examples/apt-cacher-ng) | Run a Dockerized apt-cacher-ng instance. |
| [CouchDB](/engine/examples/couchdb_data_volumes) | Run a Dockerized CouchDB instance. |
| [Couchbase](/engine/examples/couchbase) | Run a Dockerized Couchbase instance. |
| [Django + PostgreSQL](/compose/django/) | Run a Dockerized Django + PostgreSQL environment. |
| [MongoDB](/engine/examples/mongodb) | Run a Dockerized MongoDB instance. |
| [PostgreSQL](/engine/examples/postgresql_service) | Run a Dockerized PosgreSQL instance. |
| [Rails + PostgreSQL](/compose/rails/) | Run a Dockerized Rails + PostgreSQL environment. |
| [Redis](/engine/examples/running_redis_service) | Run a Dockerized Redis instance. |
| [Riak](/engine/examples/running_riak_service) | Run a Dockerized Riak instance. |
| [SSHd](/engine/examples/running_ssh_service) | Run a Dockerized SSHd instance. |
| [WordPress](/compose/wordpress/) | Run a Dockerized WordPress instance. |

View File

@ -34,4 +34,4 @@ tree: false
})();
</script>
<gcse:search></gcse:search>
</div>
</div>