diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..f8971197c6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2016 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/_layouts/docs.html b/_layouts/docs.html index 0ec1294b47..27216512bf 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -215,11 +215,13 @@ ng\:form { diff --git a/compose/compose-file.md b/compose/compose-file.md index 2ec5f262dc..10f4d2c962 100644 --- a/compose/compose-file.md +++ b/compose/compose-file.md @@ -14,9 +14,9 @@ title: Compose File Reference # Compose file reference The Compose file is a [YAML](http://yaml.org/) file defining -[services](#service-configuration-reference), -[networks](#network-configuration-reference) and -[volumes](#volume-configuration-reference). +[services](compose-file.md#service-configuration-reference), +[networks](compose-file.md#network-configuration-reference) and +[volumes](compose-file.md#volume-configuration-reference). The default path for a Compose file is `./docker-compose.yml`. A service definition contains configuration which will be applied to each @@ -29,7 +29,7 @@ As with `docker run`, options specified in the Dockerfile (e.g., `CMD`, specify them again in `docker-compose.yml`. You can use environment variables in configuration values with a Bash-like -`${VARIABLE}` syntax - see [variable substitution](#variable-substitution) for +`${VARIABLE}` syntax - see [variable substitution](compose-file.md#variable-substitution) for full details. @@ -37,7 +37,7 @@ full details. > **Note:** There are two versions of the Compose file format – version 1 (the > legacy format, which does not support volumes or networks) and version 2 (the -> most up-to-date). For more information, see the [Versioning](#versioning) +> most up-to-date). For more information, see the [Versioning](compose-file.md#versioning) > section. This section contains a list of all configuration options supported by a service @@ -48,8 +48,8 @@ definition. Configuration options that are applied at build time. `build` can be specified either as a string containing a path to the build -context, or an object with the path specified under [context](#context) and -optionally [dockerfile](#dockerfile) and [args](#args). +context, or an object with the path specified under [context](compose-file.md#context) and +optionally [dockerfile](compose-file.md#dockerfile) and [args](compose-file.md#args). build: ./dir @@ -67,7 +67,7 @@ with the `webapp` and optional `tag` specified in `image`: This will result in an image named `webapp` and tagged `tag`, built from `./dir`. -> **Note**: In the [version 1 file format](#version-1), `build` is different in +> **Note**: In the [version 1 file format](compose-file.md#version-1), `build` is different in > two ways: > > - Only the string form (`build: .`) is allowed - not the object form. @@ -76,8 +76,8 @@ This will result in an image named `webapp` and tagged `tag`, built from `./dir` #### context -> [Version 2 file format](#version-2) only. In version 1, just use -> [build](#build). +> [Version 2 file format](compose-file.md#version-2) only. In version 1, just use +> [build](compose-file.md#build). Either a path to a directory containing a Dockerfile, or a url to a git repository. @@ -101,7 +101,7 @@ specified. context: . dockerfile: Dockerfile-alternate -> **Note**: In the [version 1 file format](#version-1), `dockerfile` is +> **Note**: In the [version 1 file format](compose-file.md#version-1), `dockerfile` is > different in two ways: * It appears alongside `build`, not as a sub-option: @@ -113,7 +113,7 @@ specified. #### args -> [Version 2 file format](#version-2) only. +> [Version 2 file format](compose-file.md#version-2) only. Add build arguments, which are environment variables accessible only during the build process. @@ -247,7 +247,7 @@ Custom DNS search domains. Can be a single value or a list. ### tmpfs -> [Version 2 file format](#version-2) only. +> [Version 2 file format](compose-file.md#version-2) only. Mount a temporary file system inside the container. Can be a single value or a list. @@ -295,9 +295,9 @@ beginning with `#` (i.e. comments) are ignored, as are blank lines. # Set Rails/Rack environment RACK_ENV=development -> **Note:** If your service specifies a [build](#build) option, variables +> **Note:** If your service specifies a [build](compose-file.md#build) option, variables > defined in environment files will _not_ be automatically visible during the -> build. Use the [args](#args) sub-option of `build` to define build-time +> build. Use the [args](compose-file.md#args) sub-option of `build` to define build-time > environment variables. ### environment @@ -319,9 +319,9 @@ machine Compose is running on, which can be helpful for secret or host-specific - SHOW=true - SESSION_SECRET -> **Note:** If your service specifies a [build](#build) option, variables +> **Note:** If your service specifies a [build](compose-file.md#build) option, variables > defined in `environment` will _not_ be automatically visible during the -> build. Use the [args](#args) sub-option of `build` to define build-time +> build. Use the [args](compose-file.md#args) sub-option of `build` to define build-time > environment variables. ### expose @@ -374,7 +374,7 @@ container name and the link alias (`CONTAINER:ALIAS`). - project_db_1:mysql - project_db_1:postgresql -> **Note:** If you're using the [version 2 file format](#version-2), the +> **Note:** If you're using the [version 2 file format](compose-file.md#version-2), the > externally-created containers must be connected to at least one of the same > networks as the service which is linking to them. @@ -403,10 +403,10 @@ a partial image ID. image: a4bc65fd If the image does not exist, Compose attempts to pull it, unless you have also -specified [build](#build), in which case it builds it using the specified +specified [build](compose-file.md#build), in which case it builds it using the specified options and tags it with the specified tag. -> **Note**: In the [version 1 file format](#version-1), using `build` together +> **Note**: In the [version 1 file format](compose-file.md#version-1), using `build` together > with `image` is not allowed. Attempting to do so results in an error. ### labels @@ -440,16 +440,16 @@ Containers for the linked service will be reachable at a hostname identical to the alias, or the service name if no alias was specified. Links also express dependency between services in the same way as -[depends_on](#depends-on), so they determine the order of service startup. +[depends_on](compose-file.md#depends-on), so they determine the order of service startup. -> **Note:** If you define both links and [networks](#networks), services with +> **Note:** If you define both links and [networks](compose-file.md#networks), services with > links between them must share at least one network in common in order to > communicate. ### logging -> [Version 2 file format](#version-2) only. In version 1, use -> [log_driver](#log_driver) and [log_opt](#log_opt). +> [Version 2 file format](compose-file.md#version-2) only. In version 1, use +> [log_driver](compose-file.md#log_driver) and [log_opt](compose-file.md#log_opt). Logging configuration for the service. @@ -482,8 +482,8 @@ Logging options are key-value pairs. An example of `syslog` options: ### log_driver -> [Version 1 file format](#version-1) only. In version 2, use -> [logging](#logging). +> [Version 1 file format](compose-file.md#version-1) only. In version 2, use +> [logging](compose-file.md#logging). Specify a log driver. The default is `json-file`. @@ -491,8 +491,8 @@ Specify a log driver. The default is `json-file`. ### log_opt -> [Version 1 file format](#version-1) only. In version 2, use -> [logging](#logging). +> [Version 1 file format](compose-file.md#version-1) only. In version 2, use +> [logging](compose-file.md#logging). Specify logging options as key-value pairs. An example of `syslog` options: @@ -501,8 +501,8 @@ Specify logging options as key-value pairs. An example of `syslog` options: ### net -> [Version 1 file format](#version-1) only. In version 2, use -> [network_mode](#network_mode). +> [Version 1 file format](compose-file.md#version-1) only. In version 2, use +> [network_mode](compose-file.md#network_mode). Network mode. Use the same values as the docker client `--net` parameter. The `container:...` form can take a service name instead of a container name or @@ -515,7 +515,7 @@ id. ### network_mode -> [Version 2 file format](#version-2) only. In version 1, use [net](#net). +> [Version 2 file format](compose-file.md#version-2) only. In version 1, use [net](compose-file.md#net). Network mode. Use the same values as the docker client `--net` parameter, plus the special form `service:[service name]`. @@ -528,10 +528,10 @@ the special form `service:[service name]`. ### networks -> [Version 2 file format](#version-2) only. In version 1, use [net](#net). +> [Version 2 file format](compose-file.md#version-2) only. In version 1, use [net](compose-file.md#net). Networks to join, referencing entries under the -[top-level `networks` key](#network-configuration-reference). +[top-level `networks` key](compose-file.md#network-configuration-reference). services: some-service: @@ -593,7 +593,7 @@ In the example below, three services are provided (`web`, `worker`, and `db`), a Specify a static IP address for containers for this service when joining the network. -The corresponding network configuration in the [top-level networks section](#network-configuration-reference) must have an `ipam` block with subnet and gateway configurations covering each static address. If IPv6 addressing is desired, the `com.docker.network.enable_ipv6` driver option must be set to `true`. +The corresponding network configuration in the [top-level networks section](compose-file.md#network-configuration-reference) must have an `ipam` block with subnet and gateway configurations covering each static address. If IPv6 addressing is desired, the `com.docker.network.enable_ipv6` driver option must be set to `true`. An example: @@ -681,9 +681,9 @@ limit as an integer or soft/hard limits as a mapping. Mount paths or named volumes, optionally specifying a path on the host machine (`HOST:CONTAINER`), or an access mode (`HOST:CONTAINER:ro`). -For [version 2 files](#version-2), named volumes need to be specified with the -[top-level `volumes` key](#volume-configuration-reference). -When using [version 1](#version-1), the Docker Engine will create the named +For [version 2 files](compose-file.md#version-2), named volumes need to be specified with the +[top-level `volumes` key](compose-file.md#volume-configuration-reference). +When using [version 1](compose-file.md#version-1), the Docker Engine will create the named volume automatically if it doesn't exist. You can mount a relative path on the host, which will expand relative to @@ -710,10 +710,10 @@ If you do not use a host path, you may specify a `volume_driver`. volume_driver: mydriver -Note that for [version 2 files](#version-2), this driver +Note that for [version 2 files](compose-file.md#version-2), this driver will not apply to named volumes (you should use the `driver` option when -[declaring the volume](#volume-configuration-reference) instead). -For [version 1](#version-1), both named volumes and container volumes will +[declaring the volume](compose-file.md#volume-configuration-reference) instead). +For [version 1](compose-file.md#version-1), both named volumes and container volumes will use the specified driver. > Note: No path expansion will be done if you have also specified a @@ -736,7 +736,7 @@ then read-write will be used. - container:container_name:rw > **Note:** The `container:...` formats are only supported in the -> [version 2 file format](#version-2). In [version 1](#version-1), you can use +> [version 2 file format](compose-file.md#version-2). In [version 1](compose-file.md#version-1), you can use > container names without marking them as such: > > - service_name @@ -937,7 +937,7 @@ There are two versions of the Compose file format: - Version 2, the recommended format. This is specified with a `version: '2'` entry at the root of the YAML. -To move your project from version 1 to 2, see the [Upgrading](#upgrading) +To move your project from version 1 to 2, see the [Upgrading](compose-file.md#upgrading) section. > **Note:** If you're using @@ -957,15 +957,15 @@ These differences are explained below. ### Version 1 Compose files that do not declare a version are considered "version 1". In -those files, all the [services](#service-configuration-reference) are declared +those files, all the [services](compose-file.md#service-configuration-reference) are declared at the root of the document. Version 1 is supported by **Compose up to 1.6.x**. It will be deprecated in a future Compose release. Version 1 files cannot declare named -[volumes](#volume-configuration-reference), [networks](networking.md) or -[build arguments](#args). +[volumes](compose-file.md#volume-configuration-reference), [networks](networking.md) or +[build arguments](compose-file.md#args). Example: @@ -984,14 +984,14 @@ Example: ### Version 2 Compose files using the version 2 syntax must indicate the version number at -the root of the document. All [services](#service-configuration-reference) +the root of the document. All [services](compose-file.md#service-configuration-reference) must be declared under the `services` key. Version 2 files are supported by **Compose 1.6.0+** and require a Docker Engine of version **1.10.0+**. -Named [volumes](#volume-configuration-reference) can be declared under the -`volumes` key, and [networks](#network-configuration-reference) can be declared +Named [volumes](compose-file.md#volume-configuration-reference) can be declared under the +`volumes` key, and [networks](compose-file.md#network-configuration-reference) can be declared under the `networks` key. Simple example: @@ -1082,7 +1082,7 @@ It's more complicated if you're using particular configuration features: your service's containers to an [external network](networking.md#using-a-pre-existing-network). -- `net`: This is now replaced by [network_mode](#network_mode): +- `net`: This is now replaced by [network_mode](compose-file.md#network_mode): net: host -> network_mode: host net: bridge -> network_mode: bridge diff --git a/compose/extends.md b/compose/extends.md index 3abc4a7d93..9e9a8a54aa 100644 --- a/compose/extends.md +++ b/compose/extends.md @@ -15,8 +15,8 @@ title: Extending Services in Compose Compose supports two methods of sharing common configuration: 1. Extending an entire Compose file by - [using multiple Compose files](#multiple-compose-files) -2. Extending individual services with [the `extends` field](#extending-services) + [using multiple Compose files](extends.md#multiple-compose-files) +2. Extending individual services with [the `extends` field](extends.md#extending-services) ## Multiple Compose files @@ -34,7 +34,7 @@ services. If a service is defined in both files Compose merges the configurations using the rules described in [Adding and overriding -configuration](#adding-and-overriding-configuration). +configuration](extends.md#adding-and-overriding-configuration). To use multiple override files, or an override file with a different name, you can use the `-f` option to specify the list of files. Compose merges files in diff --git a/compose/install.md b/compose/install.md index f4c852ed07..990b6b0b64 100644 --- a/compose/install.md +++ b/compose/install.md @@ -41,7 +41,7 @@ which the release page specifies, in your terminal. curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose If you have problems installing with `curl`, see - [Alternative Install Options](#alternative-install-options). + [Alternative Install Options](install.md#alternative-install-options). 5. Apply executable permissions to the binary: diff --git a/compose/overview.md b/compose/overview.md index f4c36c9309..2917e429da 100644 --- a/compose/overview.md +++ b/compose/overview.md @@ -15,11 +15,11 @@ Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration. To learn more about all the features of Compose -see [the list of features](#features). +see [the list of features](overview.md#features). Compose is great for development, testing, and staging environments, as well as CI workflows. You can learn more about each case in -[Common Use Cases](#common-use-cases). +[Common Use Cases](overview.md#common-use-cases). Using Compose is basically a three-step process. @@ -75,10 +75,10 @@ Compose has commands for managing the whole lifecycle of your application: The features of Compose that make it effective are: -* [Multiple isolated environments on a single host](#Multiple-isolated-environments-on-a-single-host) -* [Preserve volume data when containers are created](#preserve-volume-data-when-containers-are-created) -* [Only recreate containers that have changed](#only-recreate-containers-that-have-changed) -* [Variables and moving a composition between environments](#variables-and-moving-a-composition-between-environments) +* [Multiple isolated environments on a single host](overview.md#Multiple-isolated-environments-on-a-single-host) +* [Preserve volume data when containers are created](overview.md#preserve-volume-data-when-containers-are-created) +* [Only recreate containers that have changed](overview.md#only-recreate-containers-that-have-changed) +* [Variables and moving a composition between environments](overview.md#variables-and-moving-a-composition-between-environments) ### Multiple isolated environments on a single host diff --git a/compose/swarm.md b/compose/swarm.md index 8207336e71..1cc86b53d6 100644 --- a/compose/swarm.md +++ b/compose/swarm.md @@ -23,7 +23,7 @@ format](compose-file.md#versioning) you are using: 2. If you're using version 2, your app should work with no changes: - - subject to the [limitations](#limitations) described below, + - subject to the [limitations](swarm.md#limitations) described below, - as long as the Swarm cluster is configured to use the [overlay driver](https://docs.docker.com/engine/userguide/networking/dockernetworks/#an-overlay-network), or a custom driver which supports multi-host networking. @@ -60,7 +60,7 @@ and reference it from `docker-compose.yml`: ### Multiple dependencies If a service has multiple dependencies of the type which force co-scheduling -(see [Automatic scheduling](#automatic-scheduling) below), it's possible that +(see [Automatic scheduling](swarm.md#automatic-scheduling) below), it's possible that Swarm will schedule the dependencies on different nodes, making the dependent service impossible to schedule. For example, here `foo` needs to be co-scheduled with `bar` and `baz`: @@ -80,7 +80,7 @@ The problem is that Swarm might first schedule `bar` and `baz` on different nodes (since they're not dependent on one another), making it impossible to pick an appropriate node for `foo`. -To work around this, use [manual scheduling](#manual-scheduling) to ensure that +To work around this, use [manual scheduling](swarm.md#manual-scheduling) to ensure that all three services end up on the same node: version: "2" diff --git a/cs-engine/install.md b/cs-engine/install.md index f25c0efa49..14b4ac9310 100644 --- a/cs-engine/install.md +++ b/cs-engine/install.md @@ -22,9 +22,9 @@ supported version of Docker Engine. CS Docker Engine can be installed on the following operating systems: -* [CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2 (YUM-based systems)](#install-on-centos-7-1-7-2-rhel-7-0-7-1-7-2-yum-based-systems) -* [Ubuntu 14.04 LTS](#install-on-ubuntu-14-04-lts) -* [SUSE Linux Enterprise 12](#install-on-suse-linux-enterprise-12-3) +* [CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2 (YUM-based systems)](install.md#install-on-centos-7-1-7-2-rhel-7-0-7-1-7-2-yum-based-systems) +* [Ubuntu 14.04 LTS](install.md#install-on-ubuntu-14-04-lts) +* [SUSE Linux Enterprise 12](install.md#install-on-suse-linux-enterprise-12-3) ## Install on CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2 (YUM-based systems) diff --git a/cs-engine/upgrade.md b/cs-engine/upgrade.md index c2e131274e..e5d2265521 100644 --- a/cs-engine/upgrade.md +++ b/cs-engine/upgrade.md @@ -19,9 +19,9 @@ This article explains how to upgrade your CS Docker Engine. The upgrade process depends on the version that is currently installed and the version that you want to upgrade to: -* [Upgrade from the same minor version](#upgrade-from-the-same-minor-version) -* [Upgrade from the same major version](#upgrade-from-the-same-major-version) -* [Upgrade from a legacy version](#upgrade-from-a-legacy-version) +* [Upgrade from the same minor version](upgrade.md#upgrade-from-the-same-minor-version) +* [Upgrade from the same major version](upgrade.md#upgrade-from-the-same-major-version) +* [Upgrade from a legacy version](upgrade.md#upgrade-from-a-legacy-version) Before starting the upgrade, make sure you stop all containers running on the host. This ensures your containers have time for cleaning up before exiting, diff --git a/docker-cloud/apps/deploy-tags.md b/docker-cloud/apps/deploy-tags.md index bfc3c86779..03e741a8d5 100644 --- a/docker-cloud/apps/deploy-tags.md +++ b/docker-cloud/apps/deploy-tags.md @@ -18,7 +18,7 @@ the tags on that service. Docker Cloud shows an error if no nodes match all of the service's deployment tags. A node might have extra tags that are not specified on the service, but these do not prevent the service from deploying. -You can specify multiple tags on services, on individual nodes, and on node clusters. All nodes that are members of a node cluster inherit the tags specified on the cluster. See [Automatic deployment tags](#automatic-deployment-tags) to learn more. +You can specify multiple tags on services, on individual nodes, and on node clusters. All nodes that are members of a node cluster inherit the tags specified on the cluster. See [Automatic deployment tags](deploy-tags.md#automatic-deployment-tags) to learn more. #### Deployment tags example @@ -67,7 +67,7 @@ of its member nodes. ![](images/nodecluster-wizard-tags.png) When the node cluster scales up, new nodes automatically inherit the - node cluster's tags, including the [Automatic deployment tags](#automatic-deployment-tags) described above. + node cluster's tags, including the [Automatic deployment tags](deploy-tags.md#automatic-deployment-tags) described above. You can see a node cluster's tags on the left side of the cluster's detail page. diff --git a/docker-cloud/apps/service-scaling.md b/docker-cloud/apps/service-scaling.md index 6a1aaccc54..d99ba265ab 100644 --- a/docker-cloud/apps/service-scaling.md +++ b/docker-cloud/apps/service-scaling.md @@ -52,9 +52,9 @@ Some services require coordination between different containers to ensure that the service functions correctly. Many databases, such as MySQL for example, require that the containers know about each other at startup time so that traffic can be routed to them appropriately. When this is the case, you should -use [sequential scaling](#sequential-deployment-and-scaling). +use [sequential scaling](service-scaling.md#sequential-deployment-and-scaling). -To allow peer-aware container startup, you can enable sequential scaling mode. See [Sequential Scaling](#sequential-deployment-and-scaling) for more information. +To allow peer-aware container startup, you can enable sequential scaling mode. See [Sequential Scaling](service-scaling.md#sequential-deployment-and-scaling) for more information. ## Setting the initial number of containers diff --git a/docker-cloud/builds/automated-build.md b/docker-cloud/builds/automated-build.md index b714adbe9c..8f3160fd77 100644 --- a/docker-cloud/builds/automated-build.md +++ b/docker-cloud/builds/automated-build.md @@ -67,7 +67,7 @@ repository service where the image's source code is stored. 6. Choose where to run your build processes. You can either run the process on your own infrastructure and optionally - [set up specific nodes to build on](#set-up-builder-nodes), or use the + [set up specific nodes to build on](automated-build.md#set-up-builder-nodes), or use the hosted build service offered on Docker Cloud's infrastructure. If you use Docker's infrastructure, select a builder size to run the build process on. This hosted build service is free while it is in Beta. @@ -88,14 +88,14 @@ repository service where the image's source code is stored. You can enter a name, or use a regex to match which source branch or tag names to build. To learn more, see - [regexes](#regexes-and-automated-builds). + [regexes](automated-build.md#regexes-and-automated-builds). * Specify the **Dockerfile location** as a path relative to the root of the source code repository. (If the Dockerfile is at the repository root, leave this path set to `/`.) * Enter the tag to apply to Docker images built from this source. If you configured a regex to select the source, you can reference the capture groups and use its result as part of the tag. To learn more, see - [regexes](#regexes-and-automated-builds). + [regexes](automated-build.md#regexes-and-automated-builds). 9. For each branch or tag, enable or disable the **Autobuild** toggle. @@ -186,13 +186,13 @@ and you'll see an error in your build timeline. To work around this, you can set up your automated build using the `SSH_PRIVATE` environment variable to override the deployment key and grant Docker Cloud's build system access to the repositories. -> **Note**: If you are using autobuild for teams, use [the process below](#service-users-for-team-autobuilds) instead, and configure a service user for your source code provider. You can also do this for an individual account to limit Docker Cloud's access to your source repositories. +> **Note**: If you are using autobuild for teams, use [the process below](automated-build.md#service-users-for-team-autobuilds) instead, and configure a service user for your source code provider. You can also do this for an individual account to limit Docker Cloud's access to your source repositories. 1. Generate a SSH keypair that you will use for builds only, and add the public key to your source code provider account. This step is optional, but allows you to revoke the build-only keypair without removing other access. 2. Copy the private half of the keypair to your clipboard. -3. In Docker Cloud, navigate to the build page for the repository that has linked private submodules. (If necessary, follow the steps [here](#configure-automated-build-settings) to configure the automated build.) +3. In Docker Cloud, navigate to the build page for the repository that has linked private submodules. (If necessary, follow the steps [here](automated-build.md#configure-automated-build-settings) to configure the automated build.) 4. At the bottom of the screen, click the plus sign ( **+** ) next to **Environment Variables**. 5. Enter `SSH_PRIVATE` as the name for the new environment variable. 6. Paste the private half of the keypair into the **Value** field. @@ -254,7 +254,7 @@ variable to automated builds associated with the account. > **Note**: You may need to log out of your individual account on the source code provider to create the link to the service account. -6. Optionally, use the SSH keys you generated to set up any builds with private submodules, using the service account and [the instructions above](#build-repositories-with-linked-private-submodules). +6. Optionally, use the SSH keys you generated to set up any builds with private submodules, using the service account and [the instructions above](automated-build.md#build-repositories-with-linked-private-submodules). ## What's Next? diff --git a/docker-cloud/builds/link-source.md b/docker-cloud/builds/link-source.md index 5171d8ee9b..5a6e76a0ef 100644 --- a/docker-cloud/builds/link-source.md +++ b/docker-cloud/builds/link-source.md @@ -40,7 +40,7 @@ need to link your source code provider. options to grant Docker Cloud access to them from this screen. You can also individually edit an organization's Third-party access settings to grant or revoke Docker Cloud's access. See [Grant access to a GitHub - organization](#grant-access-to-a-github-organization) to learn more. + organization](link-source.md#grant-access-to-a-github-organization) to learn more. 5. Click **Authorize application** to save the link. diff --git a/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md b/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md index 86a66cedec..94fc3ec4d9 100644 --- a/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md +++ b/docker-cloud/getting-started/deploy-app/5_deploy_the_app_as_a_service.md @@ -17,9 +17,9 @@ title: Deploy the app as a Docker Cloud service In this step you will deploy the app as a Docker Cloud Service. Remember that a service is a group of containers of the same **image:tag**. What you'll do in this step is slightly different if you have Docker Engine installed locally or not. -If you have Docker Engine installed locally, start at [Deploy app with Docker Engine installed locally](#deploy-app-with-docker-engine-installed-locally). +If you have Docker Engine installed locally, start at [Deploy app with Docker Engine installed locally](5_deploy_the_app_as_a_service.md#deploy-app-with-docker-engine-installed-locally). -If you do not have Docker Engine installed locally, start at [Deploy app without Docker Engine installed locally](#deploy-app-without-docker-engine-installed-locally). +If you do not have Docker Engine installed locally, start at [Deploy app without Docker Engine installed locally](5_deploy_the_app_as_a_service.md#deploy-app-without-docker-engine-installed-locally). > **Note**: If you don't have Docker Engine installed locally, skip to @@ -36,7 +36,7 @@ or ```bash $ docker-cloud service run -p 80 --name web $DOCKER_ID_USER/quickstart-go ``` -Skip the next section and read about [The run command](#the-run-command). +Skip the next section and read about [The run command](5_deploy_the_app_as_a_service.md#the-run-command). ## Deploy app without Docker Engine installed locally @@ -53,7 +53,7 @@ $ docker-cloud service run -p 80 --name web dockercloud/quickstart-python ```bash $ docker-cloud service run -p 80 --name web dockercloud/quickstart-go ``` -Go to the next section to read about [The run command](#the-run-command). +Go to the next section to read about [The run command](5_deploy_the_app_as_a_service.md#the-run-command). ## The run command diff --git a/docker-cloud/infrastructure/byoh.md b/docker-cloud/infrastructure/byoh.md index 31b91c1d66..ce2f77c88e 100644 --- a/docker-cloud/infrastructure/byoh.md +++ b/docker-cloud/infrastructure/byoh.md @@ -16,7 +16,7 @@ title: Use the Docker Cloud Agent Docker Cloud allows you to use any Linux host ("bring your own host") as a node which you can then use to deploy containers. To do this, you install the **Docker Cloud Agent** on your Linux host so that Docker Cloud can remotely manage it. -The **Docker Cloud Agent** installs its own Docker binary, and automatically removes any prior installation of the Docker Engine packages. See the [Known Limitations](#known-limitations) section for more information. +The **Docker Cloud Agent** installs its own Docker binary, and automatically removes any prior installation of the Docker Engine packages. See the [Known Limitations](byoh.md#known-limitations) section for more information. You can still run `docker` CLI commands on a host that is running the Docker Cloud Agent. If you do this, you might see the Docker Cloud system containers that start with `dockercloud/`. diff --git a/docker-cloud/infrastructure/link-aws.md b/docker-cloud/infrastructure/link-aws.md index ccdf226752..5098e18247 100644 --- a/docker-cloud/infrastructure/link-aws.md +++ b/docker-cloud/infrastructure/link-aws.md @@ -15,7 +15,7 @@ title: Link to Amazon Web Services hosts You can create a role with AWS IAM (Identity and Access Management) so that Docker Cloud can provision and manage **node clusters** and **nodes** on your behalf. -Previously, we recommended that you create a service user that Docker Cloud would use to access your AWS account. If you previously used this method, you can [create a new role](#acreate-a-dockercloud-role-role), attach the policy you created previously, unlink your AWS credentials and relink them using the new ARN method. You can then delete the `dockercloud-user`. +Previously, we recommended that you create a service user that Docker Cloud would use to access your AWS account. If you previously used this method, you can [create a new role](link-aws.md#acreate-a-dockercloud-role-role), attach the policy you created previously, unlink your AWS credentials and relink them using the new ARN method. You can then delete the `dockercloud-user`. ## Create a dockercloud-policy @@ -40,7 +40,7 @@ Create an access control policy that will grant specific privileges to Docker Cl ] } ``` - To limit the user to a specific region, use the [policy below](#limit-dockercloud-user-to-a-specific-ec2-region) instead. + To limit the user to a specific region, use the [policy below](link-aws.md#limit-dockercloud-user-to-a-specific-ec2-region) instead. `ec2:*` allows the user to perform any operation in EC2. diff --git a/docker-cloud/infrastructure/link-softlayer.md b/docker-cloud/infrastructure/link-softlayer.md index a203430c9a..3d9bf68514 100644 --- a/docker-cloud/infrastructure/link-softlayer.md +++ b/docker-cloud/infrastructure/link-softlayer.md @@ -18,7 +18,7 @@ to deploy **nodes** using Docker Cloud's Dashboard, API, or CLI. Docker Cloud uses your SoftLayer username and API key to interact with SoftLayer on your behalf to create and manage your **nodes** (virtual servers). Although any SoftLayer account with the right privileges will work, we -recommend creating a new **dockercloud-user** user. If you have already created a service user, or do not wish to do so, continue to [Add SoftLayer Account Credentials](#add-softlayer-account-credentials) +recommend creating a new **dockercloud-user** user. If you have already created a service user, or do not wish to do so, continue to [Add SoftLayer Account Credentials](link-softlayer.md#add-softlayer-account-credentials) ### Create dockercloud-user in SoftLayer diff --git a/docker-cloud/infrastructure/ssh-into-a-node.md b/docker-cloud/infrastructure/ssh-into-a-node.md index a032139d5d..3796d77819 100644 --- a/docker-cloud/infrastructure/ssh-into-a-node.md +++ b/docker-cloud/infrastructure/ssh-into-a-node.md @@ -18,7 +18,7 @@ You can use add a public SSH key to the *authorized_keys* file in each of your n ## Create pair of keys -First, generate a keypair using `ssh-keygen -t rsa`. If you have an existing keypair you prefer to use, you can skip this step, copy the public key to your clipboard and continue on to [create the authorizedkeys stack](#create-a-stack-in-docker-cloud). +First, generate a keypair using `ssh-keygen -t rsa`. If you have an existing keypair you prefer to use, you can skip this step, copy the public key to your clipboard and continue on to [create the authorizedkeys stack](ssh-into-a-node.md#create-a-stack-in-docker-cloud). ``` $ ssh-keygen -t rsa diff --git a/docker-cloud/orgs.md b/docker-cloud/orgs.md index 91bb1ee150..42853d8734 100644 --- a/docker-cloud/orgs.md +++ b/docker-cloud/orgs.md @@ -73,10 +73,10 @@ The UI refreshes. Log in from the Docker ID you specified as the first Owner, an Once you've created an organization: -* Add users to [the Owners team](#configure-the-owners-team) to help you manage the organization -* [Create teams](#create-teams) -* [Set team permissions](#set-team-permissions) -* Set up [linked providers](#link-a-service-provider-to-an-organization), and [manage resources](#manage-resources-for-an-organization) for the organization +* Add users to [the Owners team](orgs.md#configure-the-owners-team) to help you manage the organization +* [Create teams](orgs.md#create-teams) +* [Set team permissions](orgs.md#set-team-permissions) +* Set up [linked providers](orgs.md#link-a-service-provider-to-an-organization), and [manage resources](orgs.md#manage-resources-for-an-organization) for the organization ## Configure the Owners team diff --git a/docker-for-mac/docker-toolbox.md b/docker-for-mac/docker-toolbox.md index bb66887a93..f28a4d58b5 100644 --- a/docker-for-mac/docker-toolbox.md +++ b/docker-for-mac/docker-toolbox.md @@ -16,7 +16,6 @@ title: Docker for Mac vs. Docker Toolbox If you already have an installation of Docker Toolbox, please read these topics first to learn how Docker for Mac and Docker Toolbox differ, and how they can coexist. - ## The Docker Toolbox environment Docker Toolbox installs `docker`, `docker-compose` and `docker-machine` in `/usr/local/bin` on your Mac. It also installs VirtualBox. At installation time, Toolbox uses `docker-machine` to provision a VirtualBox VM called `default`, running the `boot2docker` Linux distribution, with [Docker Engine](https://docs.docker.com/engine/) with certificates located on your Mac at `$HOME/.docker/machine/machines/default`. @@ -27,7 +26,7 @@ This setup is shown in the following diagram. ![Docker Toolbox Install](images/toolbox-install.png) - + ## The Docker for Mac environment Docker for Mac is a Mac native application, that you install in `/Applications`. At installation time, it creates symlinks in `/usr/local/bin` for `docker` and `docker-compose`, to the version of the commands inside the Mac application bundle, in `/Applications/Docker.app/Contents/Resources/bin`. @@ -48,9 +47,9 @@ This setup is shown in the following diagram. With Docker for Mac, you get only one VM, and you don't manage it. It is managed by the Docker for Mac application, which includes autoupdate to update the client and server versions of Docker. -If you need several VMs and want to manage the version of the Docker client or server you are using, you can continue to use `docker-machine`, on the same machine, as described in [Docker Toolbox and Docker for Mac coexistence](#docker-toolbox-and-docker-for-mac-coexistence). +If you need several VMs and want to manage the version of the Docker client or server you are using, you can continue to use `docker-machine`, on the same machine, as described in [Docker Toolbox and Docker for Mac coexistence](docker-toolbox.md#docker-toolbox-and-docker-for-mac-coexistence). + - ## Setting up to run Docker for Mac 1. Check whether Toolbox DOCKER environment variables are set: @@ -82,7 +81,7 @@ If you need several VMs and want to manage the version of the Docker client or s > **Warning**: If you install Docker for Mac on a machine where Docker Toolbox is installed, it will replace the `docker` and `docker-compose` command lines in `/usr/local/bin` with symlinks to its own versions. - + ## Docker Toolbox and Docker for Mac coexistence You can use Docker for Mac and Docker Toolbox together on the same machine. When you want to use Docker for Mac, make sure all DOCKER environment variables are unset. You can do this in bash with `unset ${!DOCKER_*}`. When you want to use one of the VirtualBox VMs you have set with `docker-machine`, just run a `eval $(docker-machine env default)` (or the name of the machine you want to target). This will switch the current command shell to talk to the specified Toolbox machine. @@ -91,34 +90,34 @@ This setup is represented in the following diagram. ![Docker Toolbox and Docker for Mac coexistence](images/docker-for-mac-and-toolbox.png) - + ## Using different versions of Docker tools The coexistence setup works as is as long as your VirtualBox VMs provisioned with `docker-machine` run the same version of Docker Engine as Docker for Mac. If you need to use VMs running older versions of Docker Engine, you can use a tool like Docker Version Manager to manage several versions of docker client. - + ### Checking component versions Ideally, the Docker CLI client and Docker Engine should be the same version. Mismatches between client and server, and among host machines you might have created with Docker Machine can cause problems (client can't talk to the server or host machines). If you already have Docker Toolbox installed, and then install Docker for Mac, you might get a newer version of the Docker client. Run `docker version` in a command shell to see client and server versions. In this example, the client installed with Docker for Mac is `Version: 1.11.1` and the server (which was installed earlier with Toolbox) is Version: 1.11.0. - $ docker version - Client: - Version: 1.11.1 - ... + $ docker version + Client: + Version: 1.11.1 + ... - Server: - Version: 1.11.0 - ... + Server: + Version: 1.11.0 + ... Also, if you created machines with Docker Machine (installed with Toolbox) then upgraded or installed Docker for Mac, you might have machines running different versions of Engine. Run `docker-machine ls` to view version information for the machines you created. In this example, the DOCKER column shows that each machine is running a different version of server. - $ docker-machine ls - NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS - aws-sandbox - amazonec2 Running tcp://52.90.113.128:2376 v1.10.0 - default * virtualbox Running tcp://192.168.99.100:2376 v1.10.1 - docker-sandbox - digitalocean Running tcp://104.131.43.236:2376 v1.10.0 + $ docker-machine ls + NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS + aws-sandbox - amazonec2 Running tcp://52.90.113.128:2376 v1.10.0 + default * virtualbox Running tcp://192.168.99.100:2376 v1.10.1 + docker-sandbox - digitalocean Running tcp://104.131.43.236:2376 v1.10.0 You might also run into a similar situation with Docker Universal Control Plan (UCP). @@ -131,14 +130,3 @@ and want to uninstall it. For details on how to perform a clean uninstall of Toolbox on the Mac, see [How to uninstall Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox) in the Toolbox Mac topics. - -
-