Merge branch 'master' into fix-broken-link

This commit is contained in:
Misty Stanley-Jones 2017-01-26 11:41:19 -08:00 committed by GitHub
commit 0055c98052
79 changed files with 1446 additions and 1035 deletions

View File

@ -44,8 +44,8 @@ RUN svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/extend
&& rm -rf allv/tests \
&& wget -O allv/engine/api/v1.25/swagger.yaml https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/api/swagger.yaml \
&& jekyll build -s allv -d allvbuild \
&& find allvbuild/engine/reference -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \
&& find allvbuild/engine/extend -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \
&& rm -rf allv/apidocs/layouts \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \
&& rm -rf allv
# Serve the site, which is now all static HTML

View File

@ -28,6 +28,7 @@ defaults:
values:
layout: docs
defaultassignee: johndmulhausen
enginebranch: 1.13.x
- scope:
path: "compose"
values:

View File

@ -11,7 +11,7 @@ long: |
## Daemon socket option
The Docker daemon can listen for [Docker Remote API](../api/docker_remote_api.md)
The Docker daemon can listen for [Docker Remote API](/engine/api/index.md)
requests via three different types of Socket: `unix`, `tcp`, and `fd`.
By default, a `unix` domain socket (or IPC socket) is created at
@ -985,6 +985,33 @@ long: |
option on `docker create` and `docker run`, and takes precedence over
the `--cgroup-parent` option on the daemon.
## Daemon Metrics
The `--metrics-addr` option takes a TCP address to serve the metrics API. This
feature is still experimental, therefore, the daemon must be running in
experimental mode for this feature to work.
To serve the metrics API on localhost:9323 you would specify
`--metrics-addr 127.0.0.1:9323` allowing you to make requests on the API at
`127.0.0.1:9323/metrics` to receive metrics in the
[prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/)
format.
If you are running a prometheus server you can add this address to your scrape
configs to have prometheus collect metrics on Docker. For more information on
prometheus you can view the website [here](https://prometheus.io/).
```yml
scrape_configs:
- job_name: 'docker'
static_configs:
- targets: ['127.0.0.1:9323']
```
Please note that this feature is still marked as experimental as metrics and
metric names could change while this feature is still in experimental. Please
provide feedback on what you would like to see collected in the API.
## Daemon configuration file
The `--config-file` option allows you to set any configuration option
@ -1327,6 +1354,8 @@ options:
- option: max-concurrent-uploads
default_value: 5
description: Set the max concurrent uploads for each push
- option: metrics-addr
description: Set address and port to serve the metrics api
- option: mtu
description: Set the containers network MTU
- option: oom-score-adjust

View File

@ -48,3 +48,7 @@
/v1.9/docker-hub/,/docker-hub/
/v1.10/docker-hub/,/docker-hub/
/v1.11/docker-hub/,/docker-hub/
/login,https://cloud.docker.com/app/login
/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html,https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html
/blog/docker-data-science/,https://www.dataquest.io/blog/docker-data-science/
/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container,http://stackoverflow.com/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container

1 /source destination
48 /v1.9/docker-hub/ /docker-hub/
49 /v1.10/docker-hub/ /docker-hub/
50 /v1.11/docker-hub/ /docker-hub/
51 /login https://cloud.docker.com/app/login
52 /bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-in-bitbucket-pipelines-792298897.html
53 /blog/docker-data-science/ https://www.dataquest.io/blog/docker-data-science/
54 /questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container http://stackoverflow.com/questions/19335444/how-to-assign-a-port-mapping-to-an-existing-docker-container

View File

@ -140,7 +140,7 @@ toc:
- sectiontitle: Define and deploy your app
section:
- path: /engine/getstarted-voting-app/
title: Tour the voting app sample
title: Sample app overview
- path: /engine/getstarted-voting-app/node-setup/
title: Set up Dockerized machines
- path: /engine/getstarted-voting-app/create-swarm/
@ -150,7 +150,7 @@ toc:
- path: /engine/getstarted-voting-app/test-drive/
title: Try out the voting app
- path: /engine/getstarted-voting-app/customize-app/
title: Customize the app and redploy
title: Customize the app and redeploy
- sectiontitle: Learn by example
section:
- path: /engine/tutorials/networkingcontainers/
@ -440,7 +440,7 @@ toc:
- path: /engine/reference/commandline/cli/
title: Use the Docker command line
- path: /engine/reference/commandline/dockerd/
title: Daemon CLI reference
title: Daemon CLI reference (dockerd)
- sectiontitle: Engine CLI reference
section:
- path: /engine/reference/commandline/docker/
@ -449,6 +449,8 @@ toc:
title: docker attach
- path: /engine/reference/commandline/build/
title: docker build
- path: /engine/reference/commandline/checkpoint/
title: docker checkpoint
- path: /engine/reference/commandline/commit/
title: docker commit
- sectiontitle: docker container *

View File

@ -11,7 +11,7 @@
- Build, then run your containers on a virtual host via [Docker Machine](machine/overview.md) as you develop.
2. Configure [networking](engine/tutorials/networkingcontainers.md) and
[storage](engine/tutorials/dockervolumes.md) for your solution, if needed.
3. Upload builds to a registry ([ours](engine/tutorials/dockerrepos.md), [yours](/datacenter/dtr/2.0/index.md), or your cloud provider's), to collaborate with your team.
3. Upload builds to a registry ([ours](/engine/getstarted/step_six.md), [yours](/datacenter/dtr/2.0/index.md), or your cloud provider's), to collaborate with your team.
4. If you're gonna need to scale your solution across multiple hosts (VMs or physical machines), [plan
for how you'll set up your Swarm cluster](engine/swarm/key-concepts.md) and [scale it to meet demand](engine/swarm/swarm-tutorial/index.md).
- Note: Use [Universal Control Plane](/datacenter/ucp/1.1/overview.md) and you can manage your

View File

@ -119,7 +119,7 @@ ng\:form {
<li class="leaf menu-mlid-402"><a href="https://training.docker.com/" target="_blank">Training</a></li>
<li class="leaf menu-mlid-2000"><a href="https://www.docker.com/partners/partner-program">Partners</a></li>
<li class="leaf menu-mlid-602"><a href="https://blog.docker.com/" target="_blank">Blog</a></li>
<li class="leaf menu-mlid-2001"><a href="https://cloud.docker.com/login/" target="_blank">Log-In</a></li>
<li class="leaf menu-mlid-2001"><a href="https://id.docker.com/login/" target="_blank">Log-In</a></li>
<li class="last leaf menu-mlid-2002"><a href="https://cloud.docker.com/" target="_blank">Sign-up</a></li>
</ul>
<ul class="nav-main">
@ -185,7 +185,7 @@ ng\:form {
<li class="leaf menu-mlid-402"><a href="https://training.docker.com/" target="_blank">Training</a></li>
<li class="leaf menu-mlid-2000"><a href="https://www.docker.com/partners/partner-program">Partners</a></li>
<li class="leaf menu-mlid-602"><a href="https://blog.docker.com/" target="_blank">Blog</a></li>
<li class="leaf menu-mlid-2001"><a href="https://cloud.docker.com/login/" target="_blank">Log-In</a></li>
<li class="leaf menu-mlid-2001"><a href="https://id.docker.com/login/" target="_blank">Log-In</a></li>
<li class="last leaf menu-mlid-2002"><a href="https://cloud.docker.com/" target="_blank">Sign-up</a></li>
</ul>
</aside>

View File

@ -253,8 +253,8 @@ updates.
- `delay`: The time to wait between updating a group of containers.
- `failure_action`: What to do if an update fails. One of `continue` or `pause`
(default: `pause`).
- `monitor`: TODO
- `max_failure_ratio`: TODO
- `monitor`: Duration after each task update to monitor for failure `(ns|us|ms|s|m|h)` (default 0s).
- `max_failure_ratio`: Failure rate to tolerate during an update.
update_config:
parallelism: 2
@ -768,7 +768,7 @@ Specify logging options as key-value pairs. An example of `syslog` options:
### net
> [Version 1 file format](compose-file.md#version-1) only. In version 2, use
> [network_mode](compose-file.md#network_mode).
> [network_mode](compose-file.md#networkmode).
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
@ -942,6 +942,7 @@ port (a random host port will be chosen).
- "49100:22"
- "127.0.0.1:8001:8001"
- "127.0.0.1:5000-5010:5000-5010"
- "6060:6060/udp"
### security_opt
@ -961,7 +962,7 @@ Override the default labeling scheme for each container.
Specify how long to wait when attempting to stop a container if it doesn't
handle SIGTERM (or whatever stop signal has been specified with
[`stop_signal`](compose-file.md#stop_signal)), before sending SIGKILL. Specified
[`stop_signal`](compose-file.md#stopsignal)), before sending SIGKILL. Specified
as a [duration](compose-file.md#specifying-durations).
stop_grace_period: 1s

View File

@ -8,46 +8,54 @@ You can run Compose on macOS, Windows and 64-bit Linux. To install it, you'll ne
To install Compose, do the following:
1. Install Docker Engine:
1. Install Docker Engine:
* <a href="/engine/installation/mac/" target="_blank">macOS installation</a>
* [macOS installation](/docker-for-mac/index.md){: target="_blank" class="_"}
* <a href="/engine/installation/windows/" target="_blank">Windows installation</a>
* [Windows installation](/docker-for-windows/index.md){: target="_blank" class="_"}
* <a href="/engine/installation/linux/ubuntulinux/" target="_blank">Ubuntu installation</a>
* [Ubuntu installation](/engine/installation/linux/ubuntu.md){: target="_blank" class="_"}
* <a href="/engine/installation/" target="_blank">other system installations</a>
* [Other systems](/engine/installation/index.md){: target="_blank" class="_"}
2. The Docker Toolbox installation includes both Engine and Compose, so Mac and Windows users are done installing. Others should continue to the next step.
2. The Docker Toolbox installation includes both Engine and Compose, so Mac and
Windows users are done installing. Others should continue to the next step.
3. Go to the <a href="https://github.com/docker/compose/releases" target="_blank">Compose repository release page on GitHub</a>.
3. Go to the
[Compose repository release page on GitHub](https://github.com/docker/compose/releases){: target="_blank" class="_"}.
4. Follow the instructions from the release page and run the `curl` command,
which the release page specifies, in your terminal.
4. Follow the instructions from the release page and run the `curl` command,
which the release page specifies, in your terminal.
> Note: If you get a "Permission denied" error, your `/usr/local/bin` directory
probably isn't writable and you'll need to install Compose as the superuser. Run
`sudo -i`, then the two commands below, then `exit`.
> Note: If you get a "Permission denied" error, your `/usr/local/bin` directory
> probably isn't writable and you'll need to install Compose as the superuser. Run
> `sudo -i`, then the two commands below, then `exit`.
The following is an example command illustrating the format:
The following is an example command illustrating the format:
$ curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```bash
$ curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
```
If you have problems installing with `curl`, see
[Alternative Install Options](install.md#alternative-install-options).
If you have problems installing with `curl`, see
[Alternative Install Options](install.md#alternative-install-options).
5. Apply executable permissions to the binary:
5. Apply executable permissions to the binary:
chmod +x /usr/local/bin/docker-compose
```bash
$ chmod +x /usr/local/bin/docker-compose
```
6. Optionally, install [command completion](completion.md) for the
`bash` and `zsh` shell.
`bash` and `zsh` shell.
7. Test the installation.
7. Test the installation.
$ docker-compose --version
docker-compose version: 1.9.0
```bash
$ docker-compose --version
docker-compose version: 1.10.0
```
## Alternative install options
@ -60,7 +68,9 @@ have python system packages that conflict with docker-compose dependencies. See
the [virtualenv tutorial](http://docs.python-guide.org/en/latest/dev/virtualenvs/)
to get started.
pip install docker-compose
```bash
$ pip install docker-compose
```
> **Note:** pip version 6.0 or greater is required
@ -69,15 +79,18 @@ to get started.
Compose can also be run inside a container, from a small bash script wrapper.
To install compose as a container run:
$ curl -L https://github.com/docker/compose/releases/download/1.9.0/run.sh > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
```bash
$ curl -L https://github.com/docker/compose/releases/download/1.10.0/run.sh > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose
```
## Master builds
If you're interested in trying out a pre-release build you can download a
binary from [https://dl.bintray.com/docker-compose/master/](https://dl.bintray.com/docker-compose/master/). Pre-release
builds allow you to try out new features before they are released, but may
be less stable.
binary from
[https://dl.bintray.com/docker-compose/master/](https://dl.bintray.com/docker-compose/master/).
Pre-release builds allow you to try out new features before they are released,
but may be less stable.
## Upgrading
@ -92,27 +105,35 @@ to run so that you don't end up with two sets of them. If you want to keep using
your existing containers (for example, because they have data volumes you want
to preserve) you can use compose 1.5.x to migrate them with the following command:
docker-compose migrate-to-labels
```bash
$ docker-compose migrate-to-labels
```
Alternatively, if you're not worried about keeping them, you can remove them.
Compose will just create new ones.
docker rm -f -v myapp_web_1 myapp_db_1 ...
```bash
docker rm -f -v myapp_web_1 myapp_db_1 ...
```
## Uninstallation
To uninstall Docker Compose if you installed using `curl`:
rm /usr/local/bin/docker-compose
```bash
rm /usr/local/bin/docker-compose
```
To uninstall Docker Compose if you installed using `pip`:
pip uninstall docker-compose
```bash
$ pip uninstall docker-compose
```
>**Note**: If you get a "Permission denied" error using either of the above
>methods, you probably do not have the proper permissions to remove
>`docker-compose`. To force the removal, prepend `sudo` to either of the above
>commands and run again.
> **Note**: If you get a "Permission denied" error using either of the above
> methods, you probably do not have the proper permissions to remove
> `docker-compose`. To force the removal, prepend `sudo` to either of the above
> >commands and run again.
## Where to go next
@ -122,5 +143,5 @@ To uninstall Docker Compose if you installed using `pip`:
- [Get started with Django](django.md)
- [Get started with Rails](rails.md)
- [Get started with WordPress](wordpress.md)
- [Command line reference](./reference/index.md)
- [Command line reference](/compose/reference/index.md)
- [Compose file reference](compose-file.md)

View File

@ -82,7 +82,8 @@ Supported values are: `TLSv1`, `TLSv1_1`, `TLSv1_2`.
## COMPOSE\_CONVERT\_WINDOWS\_PATHS
Enable path conversion from Windows-style to Unix-style in volume definitions.
Users of Docker Machine and Docker Toolbox on Windows should always set this.
Users of Docker Machine and Docker Toolbox on Windows should always set this. Defaults to `0`
Supported values: `true` or `1` to enable, `false` or `0` to disable.
## Related Information

View File

@ -21,6 +21,18 @@ cannot be adopted as quickly for consistency and compatibility reasons.
These notes refer to the current and immediately prior releases of the
CS Engine. For notes on older versions, see the [CS Engine prior release notes archive](prior-release-notes.md).
## CS Engine 1.12.6-cs7
(24 Jan 2017)
This release addresses the following issues:
* [#28406](https://github.com/docker/docker/issues/28406) Fix conflicts introduced
by the updated `selinux-policy` base package from RHEL/CentOS 7.3
* [#26639](https://github.com/docker/docker/issues/26639) Resolves hostnames passed
to the local volume driver for nfs mount options.
* [26111](https://github.com/docker/docker/issues/26111) Fix issue with adding
iptables rules due to xtables lock message change.
## CS Engine 1.12.6-cs6
(10 Jan 2017)
@ -69,6 +81,19 @@ This release addresses the following issues:
to connect to swarm-mode overlay network
* Various bug fixes in swarm mode networking
## CS Engine 1.11.2-cs7
(24 Jan 2017)
This release addresses the following issues:
* [#26639](https://github.com/docker/docker/issues/26639) Resolves hostnames passed
to the local volume driver for nfs mount options.
* [26111](https://github.com/docker/docker/issues/26111) Fix issue with adding
iptables rules due to xtables lock message change.
* [#1572](github.com/docker/libnetwork/issues/1572) Fix daemon panic
* [1130](https://github.com/docker/libnetwork/pull/1130) Fix IPAM out of sync
issue on ungraceful shutdown.
## CS Engine 1.11.2-cs6
(12 Jan 2017)

View File

@ -137,13 +137,34 @@
/* reset away from #008AB5 */
#DocumentationText a.button {
color: #fff;
}
#DocumentationText .darkblue-btn {
color: #ffffff;
margin-top: 15px;
}
#DocumentationText .secondary-btn,
button .secondary-btn {
border: 2px solid #1488c6;
color: #1488c6;
background: white;
margin-top: 15px;
font-size: 14px;
padding: 12px 30px 12px 30px;
text-decoration: none;
font-family: Open Sans, sans-serif;
font-weight: 700;
}
#DocumentationText button.secondary-btn {
background: transparent;
}
#DocumentationText .secondary-btn:hover,
button .secondary-btn:hover {
opacity: .8;
}
#DocumentationText table {
margin: 1.25rem 0;
width: 100%;

View File

@ -16,8 +16,10 @@ built images to your Docker Cloud repository, enable [Automated Builds](automate
## Set up automated test files
To set up your automated tests, create a `docker-compose.test.yml` file which defines a `sut` service that lists the
tests to be run. The `docker-compose.test.yml` file should be located in the same directory that contains the Dockerfile used to build the image.
To set up your automated tests, create a `docker-compose.test.yml` file which
defines a `sut` service that lists the tests to be run. The
`docker-compose.test.yml` file should be located in the same directory that
contains the Dockerfile used to build the image.
For example:
@ -35,7 +37,7 @@ is that `sut` is defined. Its return code determines if tests passed or not:
tests **pass** if the `sut` service returns `0`, and **fail** otherwise.
You can define more than one `docker-compose.test.yml` file if needed. Any file
that ends in `.test.yml` is used for testing, and the tests run sequentially.
that ends in `.test.yml` is used for testing, and the tests run sequentially. You can also use [custom build hooks](advanced.md#override-build-test-or-push-commands) to further customize your test behavior.
> **Note**: If you enable Automated builds, they will also run any tests defined
in the `test.yml` files.

View File

@ -78,7 +78,11 @@ To register an existing swarm in Docker Cloud:
To register a swarm with an organization, prefix the new name with the organization name, for example `myorganization/myteamswarm`.
The manager node pulls the `dockercloud/registration` container and runs it on the swarm. The swarm then appears in the **Swarms** screen in Docker Cloud.
The manager node pulls the `dockercloud/registration` container which creates a
global service called `dockercloud-server-proxy`. This service runs on _all_ of
the swarm's manager nodes.
The swarm then appears in the **Swarms** screen in Docker Cloud.
### Swarm Registration example
@ -109,7 +113,7 @@ Swarms that are registered in Docker Cloud appear in the Swarms list. Each line
- **UNAVAILABLE**: Docker Cloud is not receiving any heartbeats from the swarm.
- **REMOVED**: the swarm has been unregistered from Docker Cloud and will be removed from the list soon.
> **Note**: [Removing a swarm](#unregister-a-swarm-from-Docker-cloud) only makes the swarm unavailable in Docker Cloud. It does not change the swarm itself or any processes running on the swarm.
> **Note**: [Removing a swarm](#unregister-a-swarm-from-Docker-cloud) only removes the swarm from the interface in Docker Cloud. It does not change the swarm itself or any processes running on the swarm.
## Connect to a swarm through Docker Cloud
@ -144,9 +148,9 @@ To unregister a swarm from Docker Cloud:
2. Click **Swarms** in the top navigation.
3. Put your mouse cursor on the swarm you want to unregister.
4. Click the trash can icon that appears.
5. In the confirmation dialog that appears, click **Unregister**.
5. In the confirmation dialog that appears, click **Remove**.
Docker Cloud marks the swarm as `REMOVED` and removes the swarm from the list in the next few minutes.
Docker Cloud marks the swarm as `REMOVED` and removes the swarm from the list in the next few minutes.
## Reconnect a swarm

View File

@ -14,7 +14,10 @@ you'll need to define a volume.
### Data persistence
In order to persist, data in Docker Cloud must be stored in a volume. The volume can be defined on the image (for example in the Dockerfile), or specified when you create a new service in the Docker Cloud web UI. Learn more about volumes in Docker Cloud [here](../../apps/volumes.md).
In order to persist, data in Docker Cloud must be stored in a volume. The volume
can be defined on the image (for example in the Dockerfile), or specified when
you create a new service in the Docker Cloud web UI. Learn more about volumes in
Docker Cloud [here](/docker-cloud/apps/volumes.md).
#### Test for lack of persistence
@ -23,7 +26,7 @@ If you `redeploy` the Redis service you created earlier, you'll see that the cou
Let's try that. First, redeploy the redis service to reset the counter.
```bash
$ docker-cloud service redeploy redis
$ docker-cloud service redeploy redis --not-reuse-volumes
```
Check the container status using the `container ps` command, and wait until the new container is running again. In the example below you can see the original container in the "Terminated" state, and the new container that is "Starting".
@ -139,4 +142,13 @@ set up a volume to save the data.
There's lots more to learn about Docker Cloud, so check out [the rest of our documentation](/docker-cloud/), the [API and CLI Documentation](../../../apidocs/docker-cloud.md), and our [Knowledge Hub](https://success.docker.com/Cloud) and [Docker Cloud Forums](https://forums.docker.com/c/docker-cloud).
You might also want to delete or remove all of your hello world Stacks, Services, and Nodes running in Docker Cloud. To clean up when you're finished with the tutorial:
- Click **Stacks** in the left navigation, hover over the stack you created and click the selection box that appears, then click **Terminate**.
- Once the Stack has terminated, click **Services** in the left navigation, hover over each service you created, click the selection box that appears, then click **Terminate**.
- Click **Node Clusters** in the left navigation, hover over the node cluster you created, click the selection box that appears, then click **Terminate**.
Objects (Stacks, Services, Node Clusters, and Containers and nodes) still appear
in the list in Docker Cloud for about five minutes after they are terminated.
Happy Docking!

View File

@ -16,8 +16,8 @@ In step 2, you set your Docker Cloud username as an environment variable called
> **Note**: By default, the `docker-cloud` CLI uses your default user namespace,
meaning the repositories, nodes, and services associated with your individual
Docker ID account name. To use the CLI to interact with objects that belong to
an [organization](../../orgs.md), prefix these commands with
`DOCKERCLOUD_NAMESPACE=my-organization`. See the [CLI documentation](../../installing-cli.md#use-the-docker-cloud-cli-with-an-organization) for more information.
an [organization](/docker-cloud/orgs.md), prefix these commands with
`DOCKERCLOUD_NAMESPACE=my-organization`. See the [CLI documentation](/docker-cloud/installing-cli.md#use-the-docker-cloud-cli-with-an-organization) for more information.
First tag the image. Tags in this case denote different builds of an image.

View File

@ -9,15 +9,6 @@ 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](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](5_deploy_the_app_as_a_service.md#deploy-app-without-docker-engine-installed-locally).
## Deploy app with Docker Engine installed locally
> **Note**: By default, the `docker-cloud` CLI uses your default user namespace,
@ -38,35 +29,11 @@ or
$ docker-cloud service run -p 80 --name web $DOCKER_ID_USER/quickstart-go
```
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
If you don't have Docker Engine installed locally and you have been following
this tutorial, you probably don't have either of the quickstart images in your
private registry in Docker Cloud. To deploy the service without Engine installed
locally, use the public images `dockercloud/quickstart-python` or
`dockercloud/quickstart-go` available on Docker Hub.
To do this execute one of the following commands:
**Python quickstart**
```bash
$ docker-cloud service run -p 80 --name web dockercloud/quickstart-python
```
**Go quickstart**
```bash
$ docker-cloud service run -p 80 --name web dockercloud/quickstart-go
```
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
The `run` command **creates and runs** the service using the image you chose. The **-p 80** flag publishes port 80 in the container so that it is publicly accessible, and maps it to a dynamically assigned port in the node.
The `run` command **creates and runs** the service using the image you chose.
The **-p 80** flag publishes port 80 in the container so that it is publicly
accessible, and maps it to a dynamically assigned port in the node.
It might take a minute or two to get your service up and running. Once it
completes the startup process, it will be in the *running* state.

View File

@ -116,6 +116,15 @@ Click the links icon to the right of the endpoint. This opens a new tab and show
**Congratulations!** You've successfully deployed your first service using Docker Cloud.
## Optional cleanup
You probably don't need the `hello-world` container to run for very long after you complete the tutorial. To clean up and remove all of the resources you created during this tutorial:
- Click **Services**, hover over the `hello-world` container and click the selection that box appears, then click the **Terminate** icon to the right of the service information.
- Click **Node Clusters**, select the node cluster you created, and click the **Terminate** icon at the right end of the cluster information.
Both terminated Services and Node Clusters remain in the UI for about five minutes. After that time, they no longer appear.
### What's next?
Learn more about [scaling your service](../apps/service-scaling.md), or check out some of our other [Deploy an app tutorial](deploy-app/index.md).
Learn more about [scaling your service](../apps/service-scaling.md), or check out some of our other [Deploy an app tutorial](deploy-app/index.md).

View File

@ -61,6 +61,8 @@ follow the link for more information.
"ec2:AttachInternetGateway",
"ec2:AttachNetworkInterface",
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CreateInternetGateway",
"ec2:CreateNatGateway",
"ec2:CreateNetworkAcl",

View File

@ -63,7 +63,7 @@ Release date: 10/27/2016
- Fixed the shell container that runs on the managers, to remove a ssh host key that was accidentally added to the image.
This could have led to a potential man in the middle (MITM) attack. The ssh host key is now generated on host startup, so that each host has its own key.
- The SSH ELB for SSH'ing into the managers has been removed because it is no longer possible to SSH into the managers without getting a security warning
- Each Manager can be SSH'd into by following our deploy [guide](../deploy)
- Each Manager can be SSH'd into by following our deploy [guide](docker-for-aws/deploy.md)
- Added new region us-east-2 (Ohio)
- Fixed some bugs related to upgrading the swarm
- SSH keypair is now a required field in CloudFormation

View File

@ -19,7 +19,7 @@ To upgrade, apply a new version of the AWS Cloudformation template that powers D
New releases are announced on [Release Notes](release-notes.md) page.
To initiate an update, use either the AWS Console of the AWS cli to initiate a stack update. Use the S3 template URL for the new release and complete the update wizard. This will initiate a rolling upgrade of the Docker swarm, and service state will be maintained during and after the upgrade. Appropriately scaled services should not experience downtime during an upgrade.
To initiate an update, use either the AWS Console or the AWS cli to initiate a stack update. Use the S3 template URL for the new release and complete the update wizard. This will initiate a rolling upgrade of the Docker swarm, and service state will be maintained during and after the upgrade. Appropriately scaled services should not experience downtime during an upgrade.
![Upgrade in AWS console](img/cloudformation_update.png)

View File

@ -6,14 +6,16 @@ redirect_from:
title: Frequently asked questions (FAQ)
---
**Looking for popular FAQs on Docker for Mac?** Check out the [Docker Knowledge Hub](http://success.docker.com/) for knowledge base articles, FAQs, technical support for various subscription levels, and more.
**Looking for popular FAQs on Docker for Mac?** Check out the
[Docker Knowledge Hub](http://success.docker.com/) for knowledge base articles,
FAQs, technical support for various subscription levels, and more.
### Stable and beta channels
**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).
A: Use the download links for the channels given in the topic
[Download Docker for Mac](index.md#download-docker-for-mac).
This topic also has more information about the two channels.
@ -21,9 +23,19 @@ This topic also has more information about the two channels.
A: Two different download channels are available for Docker for Mac:
* The **stable channel** provides a general availability release-ready installer for a fully baked and tested, more reliable app. The stable version of Docker for Mac comes with the latest released version of Docker Engine. The release schedule is synched with Docker Engine releases and hotfixes. On the stable channel, you can select whether to send usage statistics and other data.
* The **stable channel** provides a general availability release-ready installer
for a fully baked and tested, more reliable app. The stable version of Docker
for Mac comes with the latest released version of Docker Engine. The release
schedule is synched with Docker Engine releases and hotfixes. On the stable
channel, you can select whether to send usage statistics and other data.
* The **beta channel** provides an installer with new features we are working on, but is not necessarily fully tested. It comes with the experimental version of Docker Engine. Bugs, crashes and issues are more likely to occur with the beta app, but you get a chance to preview new functionality, experiment, and provide feedback as the apps evolve. Releases are typically more frequent than for stable, often one or more per month. Usage statistics and crash reports are sent by default. You do not have the option to disable this on the beta channel.
* The **beta channel** provides an installer with new features we are working on,
but is not necessarily fully tested. It comes with the experimental version of
Docker Engine. Bugs, crashes and issues are more likely to occur with the beta
app, but you get a chance to preview new functionality, experiment, and provide
feedback as the apps evolve. Releases are typically more frequent than for
stable, often one or more per month. Usage statistics and crash reports are sent
by default. You do not have the option to disable this on the beta channel.
**Q: Can I switch back and forth between stable and beta versions of Docker for Mac?**
@ -39,48 +51,68 @@ leveraging beta features that aren't in stable yet. Just keep this in mind as
you create and work with beta containers, perhaps in the spirit of a playground
space where you are prepared to troubleshoot or start over.
<font color="#CC3366">To safely switch between beta and stable versions be sure to save images and export the containers you need, then uninstall the current version before installing another. The workflow is described in more detail below.</font><br>
<font color="#CC3366">To safely switch between beta and stable versions be sure
to save images and export the containers you need, then uninstall the current
version before installing another. The workflow is described in more detail
below.</font><br>
Do the following each time:
1. Use `docker save` to save any images you want to keep. (See [save](/engine/reference/commandline/save.md) in the Docker Engine command line reference.)
1. Use `docker save` to save any images you want to keep. (See
[save](/engine/reference/commandline/save.md) in the Docker Engine command
line reference.)
2. Use `docker export` to export containers you want to keep. (See [export](/engine/reference/commandline/export.md) in the Docker Engine command line reference.)
2. Use `docker export` to export containers you want to keep. (See
[export](/engine/reference/commandline/export.md) in the Docker Engine
command line reference.)
3. Uninstall the current app (whether stable or beta).
3. Uninstall the current app (whether stable or beta).
4. Install a different version of the app (stable or beta).
4. Install a different version of the app (stable or beta).
### What is Docker.app?
`Docker.app` is Docker for Mac, a bundle of Docker client, and Docker
Engine. `Docker.app` uses the macOS
Hypervisor.framework (part of macOS 10.10 Yosemite and higher)
to run containers, meaning that _**no separate VirtualBox is required**_.
`Docker.app` is Docker for Mac, a bundle of Docker client, and Docker Engine.
`Docker.app` uses the macOS Hypervisor.framework (part of macOS 10.10 Yosemite
and higher) to run containers, meaning that _**no separate VirtualBox is
required**_.
### What kind of feedback are we looking for?
Everything is fair game. We'd like your impressions on the download-install process, startup, functionality available, the GUI, usefulness of the app,
command line integration, and so on. Tell us about problems, what you like, or functionality you'd like to see added.
Everything is fair game. We'd like your impressions on the download-install
process, startup, functionality available, the GUI, usefulness of the app,
command line integration, and so on. Tell us about problems, what you like, or
functionality you'd like to see added.
We are especially interested in getting feedback on the new swarm mode described in [Docker Swarm](/engine/swarm/index.md). A good place to start is the [tutorial](/engine/swarm/swarm-tutorial/index.md).
We are especially interested in getting feedback on the new swarm mode described
in [Docker Swarm](/engine/swarm/index.md). A good place to start is the
[tutorial](/engine/swarm/swarm-tutorial/index.md).
### What if I have problems or questions?
You can find the list of frequent issues in
[Logs and Troubleshooting](troubleshoot.md).
[Logs and Troubleshooting](/docker-for-mac/troubleshoot.md).
If you do not find a solution in Troubleshooting, browse issues on [Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues) or create a new one. You can also create new issues based on diagnostics. To learn more, see [Diagnose problems, send feedback, and create GitHub issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues).
If you do not find a solution in Troubleshooting, browse issues on
[Docker for Mac issues on GitHub](https://github.com/docker/for-mac/issues) or
create a new one. You can also create new issues based on diagnostics. To learn more,
see
[Diagnose problems, send feedback, and create GitHub issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues).
[Docker for Mac forum](https://forums.docker.com/c/docker-for-mac) provides discussion threads as well, and you can create discussion topics there, but we recommend using the GitHub issues over the forums for better tracking and response.
[Docker for Mac forum](https://forums.docker.com/c/docker-for-mac)
provides discussion threads as well, and you can create discussion topics there,
but we recommend using the GitHub issues over the forums for better tracking and
response.
### Can I use Docker for Mac with new swarm mode?
Yes, you can use Docker for Mac to test single-node features of [swarm mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including
initializing a swarm with a single node, creating services, and scaling
Yes, you can use Docker for Mac to test single-node features of
[swarm mode](/engine/swarm/index.md) introduced with Docker Engine 1.12,
including initializing a swarm with a single node, creating services, and scaling
services. Docker “Moby” on Hyperkit will serve as the single swarm node. You can
also use Docker Machine, which comes with Docker for Mac, to create and
experiment a multi-node swarm. Check out the tutorial at [Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md).
experiment a multi-node swarm. Check out the tutorial at
[Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md).
### How do I connect to the remote Docker Engine API?
@ -88,36 +120,46 @@ You might need to provide the location of the Engine API for Docker clients and
On Docker for Mac, clients can connect to the Docker Engine through a Unix socket: `unix:///var/run/docker.sock`.
See also [Docker Engine API](/engine/reference/api/docker_remote_api.md) and Docker for Mac forums topic [Using pycharm Docker plugin..](https://forums.docker.com/t/using-pycharm-docker-plugin-with-docker-beta/8617).
See also [Docker Engine API](/engine/api.md) and Docker for Mac forums topic
[Using pycharm Docker plugin..](https://forums.docker.com/t/using-pycharm-docker-plugin-with-docker-beta/8617).
If you are working with applications like [Apache Maven](https://maven.apache.org/) that expect settings for `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables, specify these to connect to Docker instances through Unix sockets. For example:
If you are working with applications like
[Apache Maven](https://maven.apache.org/) that expect settings for `DOCKER_HOST`
and `DOCKER_CERT_PATH` environment variables, specify these to connect to Docker
instances through Unix sockets. For example:
export DOCKER_HOST=unix:///var/run/docker.sock
```bash
export DOCKER_HOST=unix:///var/run/docker.sock
```
### How do I connect from a container to a service on the host?
The Mac has a changing IP address (or none if you have no network access). Our current recommendation is to attach an unused IP to the `lo0` interface on the Mac so that containers can connect to this address.
The Mac has a changing IP address (or none if you have no network access). Our
current recommendation is to attach an unused IP to the `lo0` interface on the
Mac so that containers can connect to this address.
For a full explanation and examples, see [I want to connect from a container to
a service on the
host](networking.md#i-want-to-connect-from-a-container-to-a-service-on-the-host)
under [Known Limitations, Use Cases, and
Workarounds](networking.md#known-limitations-use-cases-and-workarounds) in the
Networking topic.
For a full explanation and examples, see
[I want to connect from a container to a service on the host](networking.md#i-want-to-connect-from-a-container-to-a-service-on-the-host)
under
[Known Limitations, Use Cases, and Workarounds](networking.md#known-limitations-use-cases-and-workarounds)
in the Networking topic.
### How do I to connect to a container from the Mac?
Our current recommendation is to publish a port, or to connect from another 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.
Our current recommendation is to publish a port, or to connect from another
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.
For a full explanation and examples, see [I want to connect to a container from
the Mac](networking.md#i-want-to-connect-to-a-container-from-the-mac) under
[Known Limitations, Use Cases, and
Workarounds](networking.md#known-limitations-use-cases-and-workarounds) in the
Networking topic.
For a full explanation and examples, see
[I want to connect to a container from the Mac](networking.md#i-want-to-connect-to-a-container-from-the-mac)
under
[Known Limitations, Use Cases, and Workarounds](networking.md#known-limitations-use-cases-and-workarounds)
in the Networking topic.
### How do I add custom CA certificates?
Starting with Docker for Mac Beta 27 and Stable 1.12.3, all trusted certificate authorities (CAs) (root or intermediate) are supported.
Starting with Docker for Mac Beta 27 and Stable 1.12.3, all trusted certificate
authorities (CAs) (root or intermediate) are supported.
Docker for Mac creates a certificate bundle of all user-trusted CAs based on the
Mac Keychain, and appends it to Moby trusted certificates. So if an enterprise
@ -128,13 +170,12 @@ To manually add a custom, self-signed certificate, start by adding
the certificate to the Macs keychain, which will be picked up by Docker for
Mac. Here is an example.
```
```bash
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt
```
For a complete explanation of how to do this, see the blog post [Adding Self-signed Registry Certs
to Docker & Docker for
Mac](http://container-solutions.com/adding-self-signed-registry-certs-docker-mac/).
For a complete explanation of how to do this, see the blog post
[Adding Self-signed Registry Certs to Docker & Docker for Mac](http://container-solutions.com/adding-self-signed-registry-certs-docker-mac/).
### How do I reduce the size of Docker.qcow2?
@ -160,7 +201,7 @@ Note the `Docker.qcow2` will not shrink in size immediately.
In 1.13 a background `cron` job runs `fstrim` every 15 minutes.
If the space needs to be reclaimed sooner, run this command:
```
```bash
docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n fstrim /var
```
@ -169,43 +210,59 @@ will compact the file and free up space. The app will
take longer than usual to restart because it must wait for the
compaction to complete.
For background conversation thread on this, see [Docker.qcow2 never shrinks
..](https://github.com/docker/for-mac/issues/371) on Docker for Mac GitHub
issues.
For background conversation thread on this, see
[Docker.qcow2 never shrinks ..](https://github.com/docker/for-mac/issues/371)
on Docker for Mac GitHub issues.
### What are system requirements for Docker for Mac?
Note that you need a Mac that supports hardware virtualization, which is most non ancient ones; i.e., use 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).
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).
### Do I need to uninstall Docker Toolbox to use Docker for Mac?
No, you can use these side by side. Docker Toolbox leverages a Docker daemon installed using `docker-machine` in a machine called `default`. Running `eval $(docker-machine env default)` in a shell sets DOCKER environment variables locally to connect to the default machine using Engine from Toolbox. To check whether Toolbox DOCKER environment variables are set, run `env | grep DOCKER`.
No, you can use these side by side. Docker Toolbox leverages a Docker daemon
installed using `docker-machine` in a machine called `default`. Running `eval
$(docker-machine env default)` in a shell sets DOCKER environment variables
locally to connect to the default machine using Engine from Toolbox. To check
whether Toolbox DOCKER environment variables are set, run `env | grep DOCKER`.
To make the client talk to the Docker for Mac Engine, run the command `unset ${!DOCKER_*}` to unset all DOCKER environment variables in the current shell. (Now, `env | grep DOCKER` should return no output.) You can have multiple command line shells open, some set to talk to Engine from Toolbox and others set to talk to Docker for Mac. The same applies to `docker-compose`.
To make the client talk to the Docker for Mac Engine, run the command `unset
${!DOCKER_*}` to unset all DOCKER environment variables in the current shell.
(Now, `env | grep DOCKER` should return no output.) You can have multiple
command line shells open, some set to talk to Engine from Toolbox and others set
to talk to Docker for Mac. The same applies to `docker-compose`.
### How do I uninstall Docker Toolbox?
You might decide that you do not need Toolbox now that you have Docker for Mac,
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.
Toolbox on the Mac, see
[How to uninstall Toolbox](/toolbox/toolbox_install_mac.md#how-to-uninstall-toolbox)
in the Toolbox Mac topics.
### What is HyperKit?
HyperKit is a hypervisor built on top of the Hypervisor.framework in macOS 10.10 Yosemite and higher. It runs entirely in userspace and has no other dependencies.
HyperKit is a hypervisor built on top of the Hypervisor.framework in macOS 10.10
Yosemite and higher. It runs entirely in userspace and has no other dependencies.
We use HyperKit to eliminate the need for other VM products, such as Oracle Virtualbox or VMWare Fusion.
We use HyperKit to eliminate the need for other VM products, such as Oracle
Virtualbox or VMWare Fusion.
### What is the benefit of HyperKit?
It is thinner than VirtualBox and VMWare fusion, and the version we include is tailor made for Docker workloads on the Mac.
It is thinner than VirtualBox and VMWare fusion, and the version we include is
tailor made for Docker workloads on the Mac.
### Why is com.docker.vmnetd running after I quit the app?
The privileged helper process `com.docker.vmnetd` is started by `launchd` and runs in the background. The process will not
consume any resources unless Docker.app connects to it, so it's safe to ignore.
The privileged helper process `com.docker.vmnetd` is started by `launchd` and
runs in the background. The process will not consume any resources unless
Docker.app connects to it, so it's safe to ignore.
### Can I pass through a USB device to a container?
Unfortunately it is not possible to pass through a USB device (or a serial port) to a container. For use cases requiring this, we recommend the use of [Docker Toolbox](/toolbox/overview.md).
Unfortunately it is not possible to pass through a USB device (or a serial
port) to a container. For use cases requiring this, we recommend the use of
[Docker Toolbox](/toolbox/overview.md).

View File

@ -17,16 +17,17 @@ 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).
> **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).
## 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](faqs.md#stable-and-beta-channels).
channels, see the [FAQs](/docker-for-mac/faqs.md#stable-and-beta-channels).
<table style="width:100%">
<tr>
@ -52,71 +53,104 @@ channels, see the [FAQs](faqs.md#stable-and-beta-channels).
>**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.
> - 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).
> - 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 <a href="https://github.com/docker/HyperKit/">HyperKit</a> 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.
* **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.
- 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.
* **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).
- 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.
* **System Requirements**: Docker for Mac will launch only if all of these
requirements are met.
- 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.
- 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.
- 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.
- 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.
- At least 4GB of RAM
- VirtualBox prior to version 4.3.30 must NOT be installed (it is incompatible with Docker for Mac)
- 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 Virtual Box instead of HyperKit.
> **Note**: If your system does not satisfy these requirements, you can
> install [Docker Toolbox](/toolbox/overview.md), which uses Oracle VirtualBox
> instead of HyperKit.
<p />
* **What the install includes**: The installation provides [Docker Engine](/engine/userguide/intro/), Docker CLI client, [Docker Compose](/compose/overview/), and [Docker Machine](/machine/overview/).
* **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.
1. Double-click `Docker.dmg` to open the installer, then drag Moby the whale to
the Applications folder.
![Install Docker app](images/docker-app-drag.png)
![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.
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.
2. Double-click `Docker.app` to start Docker.
![Docker app in Hockeyapp](images/docker-app-in-apps.png)
![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.
The whale in the top status bar indicates that Docker is running, and
accessible from a terminal.
![Whale in menu bar](images/whale-in-menu-bar.png)
![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 (<img src="images/whale-x.png">) in the status bar to dismiss this popup.
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)
![Docker success](images/mac-install-success-docker-ps.png)
3. Click the whale (<img src="images/whale-x.png">) to get Preferences, and other options.
3. Click the whale (![whale-x](images/whale-x.png)) to get Preferences and
other options.
![Docker context menu](images/menu.png)
![Docker context menu](images/menu.png)
4. Select **About Docker** to verify that you have the latest version.
4. Select **About Docker** to verify that you have the latest version.
Congratulations! You are up and running with Docker for Mac.
Congratulations! You are up and running with Docker for Mac.
## Step 2. 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`.
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
@ -129,34 +163,45 @@ $ docker-machine --version
docker-machine version 0.9.0-rc2, build 7b19591
```
>**Note**: The above is an example. Your output will differ if you are running different (e.g., newer) versions.
> **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
1. Open a command-line terminal, and run some Docker commands to verify that Docker is working as expected.
1. Open a command-line terminal, and run some Docker commands to verify that
Docker is working as expected.
Some good commands to try are `docker version` to check that you have the latest release installed, and `docker ps` and `docker run hello-world` to verify that Docker is running.
Some good commands to try are `docker version` to check that you have the
latest release installed, and `docker ps` and `docker run hello-world` to
verify that Docker is running.
2. For something more adventurous, start a Dockerized web server.
```
```bash
docker run -d -p 80:80 --name webserver nginx
```
If the image is not found locally, Docker will pull it from Docker Hub.
In a web browser, go to `http://localhost/` to bring up the home page. (Since you specified the default HTTP port, it isn't necessary to append `:80` at the end of the URL.)
In a web browser, go to `http://localhost/` to bring up the home page.
(Since you specified the default HTTP port, it isn't necessary to append
`:80` at the end of the URL.)
![nginx home page](images/hello-world-nginx.png)
>**Note:** Early beta releases used `docker` as the hostname to build the URL. Now, ports are exposed on the private IP addresses of the VM and forwarded to `localhost` with no other host name set. See also, [Release Notes](release-notes.md) for Beta 9.
> **Note:** Early beta releases used `docker` as the hostname to build the
> URL. Now, ports are exposed on the private IP addresses of the VM and
> forwarded to `localhost` with no other host name set. See also,
> [Release Notes](release-notes.md) for Beta 9.
3. Run `docker ps` while your web server is running to see details on the webserver container.
3. Run `docker ps` while your web server is running to see details on the
webserver container.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
56f433965490 nginx "nginx -g 'daemon off" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp webserver
4. Stop or remove containers and images.
```none
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
56f433965490 nginx "nginx -g 'daemon off" About a minute ago Up About a minute 0.0.0.0:80->80/tcp, 443/tcp webserver
```
4. Stop or remove containers and images.
The `nginx` webserver will continue to run in the container on that port
until you stop and/or remove the container. If you want to stop the
@ -168,42 +213,46 @@ docker-machine version 0.9.0-rc2, build 7b19591
`docker rm -f webserver`. This will remove the container, but not the
`nginx` image. You can list local images with `docker images`. You might
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`.
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](examples.md).
**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).
## Preferences
Choose <img src="images/whale-x.png"> --> **Preferences** from the menu bar. You
Choose ![whale-x](/docker-for-mac/images/whale-x.png) --> **Preferences** from the menu bar. You
can set the following runtime options.
### General
![Preferences](images/settings.png)
![Preferences](/docker-for-mac/images/settings.png)
#### Auto-start, update, backups, usage data
* Docker for Mac is set to automatically **start Docker when you log in**.
Uncheck this option if you don't want Docker to start when you
open your session.
* Docker for Mac is set to automatically **start Docker when you log in**.
Uncheck this option if you don't want Docker to start when you
open your session.
* Docker for Mac is set to **automatically check for updates** and notify
you when an update is available. If an update is found, click **OK** to
accept and install it (or cancel to keep the current version). If you
disable the check for updates, you can still find out about updates manually
by choosing <img src="images/whale-x.png"> -> **Check for Updates**
you when an update is available. If an update is found, click **OK** to
accept and install it (or cancel to keep the current version). If you
disable the check for updates, you can still find out about updates manually
by choosing ![whale-x](/docker-for-mac/images/whale-x.png) -> **Check for Updates**
* Check **Exclude VM from Time Machine backups** to prevent Time Machine
from backing up the Docker for Mac virtual machine.
from backing up the Docker for Mac virtual machine.
* **Send usage statistics** &mdash; You can set Docker for Mac to auto-send diagnostics, crash reports, and usage data. This information can help Docker
improve the application and get more context for troubleshooting problems.
Uncheck this to opt out and prevent auto-send of data. Docker may prompt for
more information in some cases, even with auto-send enabled. Also, you can
enable or disable these auto-reporting settings with one click on the
information popup when you first start Docker.
* **Send usage statistics** &mdash; You can set Docker for Mac to auto-send
diagnostics, crash reports, and usage data. This information can help Docker
improve the application and get more context for troubleshooting problems.
Uncheck this to opt out and prevent auto-send of data. Docker may prompt for
more information in some cases, even with auto-send enabled. Also, you can
enable or disable these auto-reporting settings with one click on the
information popup when you first start Docker.
![Startup information](images/mac-install-success-docker-wait.png)
![Startup information](/docker-for-mac/images/mac-install-success-docker-wait.png)
### File sharing
@ -218,21 +267,20 @@ want to add.
* Click **Apply & Restart** to make the directory available to
containers using Docker's bind mount (`-v`) feature.
There are some limitations on the directories that can be shared:
There are some limitations on the directories that can be shared:
* They cannot be a subdirectory of an already shared directory.
* They cannot be a subdirectory of an already shared directory.
* They cannot already exist inside of Docker.
* They cannot already exist inside of Docker.
See [Namespaces](osxfs.md#namespaces) in the topic on
[osxfs file system sharing](osxfs.md) for more information.
>**Tip:** File sharing is required for volume mounting if the project lives
outside of the `/Users` directory. In that case, share the drive where the
Dockerfile and volume are located. Otherwise, you will get file not found or
cannot start service errors at runtime. (See also [Volume mounting requires file
sharing for any project directories outside of
`/Users`](troubleshoot.md#volume-mounting-requires-file-sharing-for-any-project-directories-outside-of-users).)
> **Tip:** File sharing is required for volume mounting if the project lives
> outside of the `/Users` directory. In that case, share the drive where the
> Dockerfile and volume are located. Otherwise, you will get file not found or
> cannot start service errors at runtime. (See also
> [Volume mounting requires file sharing for any project directories outside of `/Users`](troubleshoot.md#volume-mounting-requires-file-sharing-for-any-project-directories-outside-of-users).)
### Advanced
@ -266,12 +314,13 @@ these to Docker and to your containers. For example, if you set your proxy
settings to `http://proxy.example.com`, Docker will use this proxy when pulling
containers.
![Proxies settings](images/settings-proxies.png)
![Proxies settings](/docker-for-mac/images/settings-proxies.png)
### Docker Daemon
You can configure options on the Docker daemon that determine how your
containers will run. You can configure some **Basic** options on the daemon with interactive settings, or switch to **Advanced** to edit the JSON directly.
containers will run. You can configure some **Basic** options on the daemon with
interactive settings, or switch to **Advanced** to edit the JSON directly.
The settings offered on **Basic** dialog can be
configured directly in the JSON as well. This version just surfaces
@ -281,15 +330,17 @@ some of the commmon settings to make it easier to configure them.
* [Custom registries](#custom-registries)
* [Edit the daemon configuration file](#edit-the-daemon-configuration-file)
![Daemon](images/settings-advanced-experimental-beta.png)
![Daemon](/docker-for-mac/images/settings-advanced-experimental-beta.png)
#### Experimental mode
By default, Docker for Mac Beta releases use the experimental version of Docker
Engine, described in the [Docker Experimental Features README](https://github.com/docker/docker/tree/master/experimental) on GitHub. Starting with
Beta 31, you can toggle **experimental mode** on and off. If you toggle it off,
Docker for Mac Beta uses the current generally available release of Docker
Engine, the same as Stable Docker for Mac versions uses.
Engine, described in the
[Docker Experimental Features README](https://github.com/docker/docker/tree/master/experimental)
on GitHub. Starting with Beta 31, you can toggle **experimental mode** on and
off. If you toggle it off, Docker for Mac Beta uses the current generally
available release of Docker Engine, the same as Stable Docker for Mac versions
uses.
You can check whether you are running experimental mode or not by typing `docker
version` on the command line. Experimental mode is listed under `Server` data.
@ -321,33 +372,35 @@ Server:
As an alternative to using [Docker Hub](https://hub.docker.com/) to store your
public or private images or [Docker Trusted
Registry](/datacenter/dtr/2.1/guides/index.md), you can use Docker to set up
your own insecure [registry](/registry/introduction/). Add URLs for insecure
registries and registry mirrors on which to host your images. (See also, [How do
I add custom CA certificates?](faqs.md#how-do-i-add-custom-ca-certificates) in
the FAQs.)
your own insecure [registry](/registry/introduction.md). Add URLs for insecure
registries and registry mirrors on which to host your images. (See also,
[How do I add custom CA certificates?](/docker-for-mac/faqs.md#how-do-i-add-custom-ca-certificates)
in the FAQs.)
#### Edit the daemon configuration file
On the **Daemon -> Advanced dialog**, you can directly configure the daemon from
the JSON file, and determine entirely how your containers will run. For a full
list of options on the Docker daemon, see <a
href="/engine/reference/commandline/dockerd/>daemon</a> in the Docker Engine
list of options on the Docker daemon, see
[daemon](/engine/reference/commandline/dockerd.md) in the Docker Engine
command line reference.
After editing the daemon configuration , click **Apply & Restart** to save it
and reboot Docker. Or, to cancel changes, click another preference tab, then
choose to discard or not apply changes when asked.
![Docker Daemon](images/settings-daemon-beta.png)
![Docker Daemon](/docker-for-mac/images/settings-daemon-beta.png)
## Uninstall or reset
Choose <img src="images/whale-x.png"> --> **Preferences** from the menu bar, then click **Uninstall / Reset** on the Preferences dialog.
Choose ![whale-x](/docker-for-mac/images/whale-x.png) --> **Preferences** from
the menu bar, then click **Uninstall / Reset** on the Preferences dialog.
![Uninstall or reset Docker](images/settings-uninstall.png)
* **Uninstall** - Choose this option to remove Docker for Mac from your system.
* **Reset to factory defaults** - Choose this option to reset all options on Docker for Mac to its initial state, the same as when it was first installed.
* **Reset to factory defaults** - Choose this option to reset all options on
Docker for Mac to its initial state, the same as when it was first installed.
You can uninstall Docker for Mac from the command line with this command:
`<DockerforMacPath> --uninstall`. If Docker is installed in the default
@ -359,21 +412,27 @@ Docker is running, exiting...
Docker uninstalled successfully. You can move the Docker application to the trash.
```
You might want to use the command-line uninstall if, for example, you find that the app is non-functional, and you cannot uninstall it from the menu.
You might want to use the command-line uninstall if, for example, you find that
the app is non-functional, and you cannot uninstall it from the menu.
## Installing bash completion
If you are using [bash completion](https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1), such as [homebrew bash-completion on Mac](http://davidalger.com/development/bash-completion-on-os-x-with-brew/), bash completion scripts for
If you are using
[bash completion](https://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1),
such as
[homebrew bash-completion on Mac](http://davidalger.com/development/bash-completion-on-os-x-with-brew/)
bash completion scripts for the following commands may be found inside
`Docker.app`, in the `Contents/Resources/etc/` directory:
- docker
- docker-machine
- docker-compose
may be found inside Docker.app, in the Contents/Resources/etc folder.
To activate bash completion, these files need to be copied or symlinked to your
bash_completion.d directory. For example, if you use <a
href="http://brew.sh/">Homebrew</a>:
`bash_completion.d/` directory. For example, if you use
[Homebrew](htt://brew.sh/):
```
```bash
ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion /usr/local/etc/bash_completion.d/docker
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-machine.bash-completion /usr/local/etc/bash_completion.d/docker-machine
ln -s /Applications/Docker.app/Contents/Resources/etc/docker-compose.bash-completion /usr/local/etc/bash_completion.d/docker-compose
@ -387,9 +446,8 @@ forum](https://forums.docker.com/c/docker-for-mac).
To report bugs or problems, log on to [Docker for Mac issues on
GitHub](https://github.com/docker/for-mac/issues), where you can review
community reported issues, and file new ones. See [Diagnose problems, send
feedback, and create GitHub
issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues).
community reported issues, and file new ones. See
[Diagnose problems, send feedback, and create GitHub issues](troubleshoot.md#diagnose-problems-send-feedback-and-create-github-issues).
As a part of reporting issues on GitHub, we can help you troubleshoot the log
data.
@ -400,13 +458,17 @@ options at the bottom of each docs page.
* Try out the [Getting Started with Docker](/engine/getstarted/index.md) tutorial.
* Follow up by working through the voting app example to learn how to [define and deploy a Docker stack](/engine/getstarted-voting-app/index.md) to a
* Follow up by working through the voting app example to learn how to
[define and deploy a Docker stack](/engine/getstarted-voting-app/index.md) to a
[swarm](/engine/swarm/index.md). This example shows how to deploy multiple
containers as services and use new [Compose Version
3](/compose/compose-file.md#version-3) features.
containers as services and use new
[Compose Version 3](/compose/compose-file.md#version-3) features.
* Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example walkthroughs and source code.
* Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example
walkthroughs and source code.
* For a summary of Docker command line interface (CLI) commands, see [Docker CLI Reference Guide](/engine/reference/index.md).
* For a summary of Docker command line interface (CLI) commands, see
[Docker CLI Reference Guide](/engine/api.md).
* Check out the blog post [Introducing Docker 1.13.0](https://blog.docker.com/2017/01/whats-new-in-docker-1-13/).
* Check out the blog post
[Introducing Docker 1.13.0](https://blog.docker.com/2017/01/whats-new-in-docker-1-13/).

View File

@ -12,8 +12,8 @@ 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](index.md#download-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).
This topic also has more information about the two channels.
@ -21,15 +21,19 @@ This topic also has more information about the two channels.
A: Two different download channels are available for Docker for Windows:
* The **stable channel** provides a general availability release-ready installer for a fully baked and tested, more reliable app. The stable version of Docker
for Windows comes with the latest released version of Docker Engine. The
release schedule is synched with Docker Engine releases and hotfixes. On the stable channel, you can select whether to send usage statistics and other data.
* The **stable channel** provides a general availability release-ready installer
for a fully baked and tested, more reliable app. The stable version of Docker
for Windows comes with the latest released version of Docker Engine. The
release schedule is synched with Docker Engine releases and hotfixes. On the
stable channel, you can select whether to send usage statistics and other data.
* The **beta channel** provides an installer with new features we are working on, but is not necessarily fully tested. It comes with the experimental version of
Docker Engine. Bugs, crashes and issues are more likely to occur with the beta
app, but you get a chance to preview new functionality, experiment, and provide
feedback as the apps evolve. Releases are typically more frequent than for
stable, often one or more per month. Usage statistics and crash reports are sent by default. You do not have the option to disable this on the beta channel.
* The **beta channel** provides an installer with new features we are working on,
but is not necessarily fully tested. It comes with the experimental version of
Docker Engine. Bugs, crashes and issues are more likely to occur with the beta
app, but you get a chance to preview new functionality, experiment, and provide
feedback as the apps evolve. Releases are typically more frequent than for
stable, often one or more per month. Usage statistics and crash reports are
sent by default. You do not have the option to disable this on the beta channel.
**Q: Can I switch back and forth between stable and beta versions of Docker for Windows?**
@ -52,17 +56,17 @@ below.</font><br>
Do the following each time:
1. Use `docker save` to save any images you want to keep. (See
[save](/engine/reference/commandline/save.md) in the Docker Engine command line
reference.)
1. Use `docker save` to save any images you want to keep. (See
[save](/engine/reference/commandline/save.md) in the Docker Engine command
line reference.)
2. Use `docker export` to export containers you want to keep. (See
[export](/engine/reference/commandline/export.md) in the Docker Engine command
line reference.)
2. Use `docker export` to export containers you want to keep. (See
[export](/engine/reference/commandline/export.md) in the Docker Engine command
line reference.)
3. Uninstall the current app (whether stable or beta).
3. Uninstall the current app (whether stable or beta).
4. Install a different version of the app (stable or beta).
4. Install a different version of the app (stable or beta).
### What kind of feedback are we looking for?
@ -78,13 +82,13 @@ in [Docker Swarm](/engine/swarm/index.md). A good place to start is the
### What if I have problems or questions?
You can find the list of frequent issues in
[Logs and Troubleshooting](troubleshoot.md).
[Logs and Troubleshooting](/docker-for-windows/troubleshoot.md).
If you do not find a solution in Troubleshooting, browse issues on [Docker for
Windows issues on GitHub](https://github.com/docker/for-win/issues) or create a
new one. You can also create new issues based on diagnostics. To learn more
about running diagnostics and about Docker for Windows GitHub issues, see
[Diagnose and Feedback](index.md#diagnose-and-feedback).
[Diagnose and Feedback](/docker-for-windows/index.md#diagnose-and-feedback).
[Docker for Windows forum](https://forums.docker.com/c/docker-for-windows)
provides discussion threads as well, and you can create discussion topics there,
@ -93,13 +97,13 @@ response.
### Can I use Docker for Windows with new swarm mode?
Yes! You can use Docker for Windows to test single-node features of [swarm
mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including
Yes! You can use Docker for Windows to test single-node features of
[swarm mode](/engine/swarm/index.md) introduced with Docker Engine 1.12, including
initializing a swarm with a single node, creating services, and scaling
services. Docker “Moby” on Hyper-V will serve as the single swarm node. You can
also use Docker Machine, which comes with Docker for Windows, to create and
experiment with a multi-node swarm. Check out the tutorial at [Get started with
swarm mode](/engine/swarm/swarm-tutorial/index.md).
experiment with a multi-node swarm. Check out the tutorial at
[Get started with swarm mode](/engine/swarm/swarm-tutorial/index.md).
### How do I connect to the remote Docker Engine API?
@ -109,14 +113,16 @@ On Docker for Windows, clients can connect to the Docker Engine through a **name
This sets `DOCKER_HOST` and `DOCKER_CERT_PATH` environment variables to the given values (for the named pipe or TCP socket, whichever you use).
See also [Docker Engine API](/engine/reference/api/) and the Docker for Windows forums topic [How to find the remote API](https://forums.docker.com/t/how-to-find-the-remote-api/20988).
See also [Docker Engine API](/engine/api.md) and the Docker for Windows forums
topic
[How to find the remote API](https://forums.docker.com/t/how-to-find-the-remote-api/20988).
### Why doesn't `nodemon` pick up file changes in a container mounted on a shared drive?
Currently, `inotify` does not work on Docker for Windows. This is a known issue.
For more information and a temporary workaround, see [inotify on shared drives
does not work](troubleshoot.md#inotify-on-shared-drives-does-not-work) in
[Troubleshooting](troubleshoot.md).
[Troubleshooting](/docker-for-windows/troubleshoot.md).
### Are symlinks supported?
@ -126,9 +132,11 @@ Symlinks created elsewhere (e.g., on the host) will not work.
To learn more about the reasons for this limitation, see the following discussions:
* GitHub issue: [Symlinks don't work as expected](https://github.com/docker/for-win/issues/109#issuecomment-251307391)
* GitHub issue:
[Symlinks don't work as expected](https://github.com/docker/for-win/issues/109#issuecomment-251307391)
* Docker for Windows forums topic: [Symlinks on shared volumes not supported](https://forums.docker.com/t/symlinks-on-shared-volumes-not-supported/9288)
* Docker for Windows forums topic:
[Symlinks on shared volumes not supported](https://forums.docker.com/t/symlinks-on-shared-volumes-not-supported/9288)
### How do I add custom CA certificates?
@ -136,7 +144,8 @@ Starting with Docker for Windows 1.12.1, 2016-09-16 (stable) and Beta 26 (2016-0
Docker for Windows creates a certificate bundle of all user-trusted CAs based on the Windows certificate store, and appends it to Moby trusted certificates. So if an enterprise SSL certificate is trusted by the user on the host, it will be trusted by Docker for Windows.
To learn more, see the GitHub issue [Allow user to add custom Certificate Authorities ](https://github.com/docker/for-win/issues/48).
To learn more, see the GitHub issue
[Allow user to add custom Certificate Authorities ](https://github.com/docker/for-win/issues/48).
### Why does Docker for Windows sometimes lose network connectivity (e.g., `push`/`pull` doesn't work)?
@ -156,7 +165,8 @@ Docker for Windows does not support mounts for nodes you created with
`docker-machine`.
For more about sharing local drives with containers using Docker for Windows,
see [Shared Drives](index.md#shared-drives) in the Getting Started topic.
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
@ -187,14 +197,13 @@ Windows to work.
Some firewalls and anti-virus software might be incompatible with Hyper-V and
some Windows 10 builds (possibly, the Anniversary Update), which impacts Docker
for Windows. See details and workarounds in [Docker fails to start when firewall
or anti-virus software is
installed](troubleshoot.md#docker-fails-to-start-when-firewall-or-anti-virus-software-is-installed)
in [Troubleshooting](troubleshoot.md).
for Windows. See details and workarounds in
[Docker fails to start when firewall or anti-virus software is installed](troubleshoot.md#docker-fails-to-start-when-firewall-or-anti-virus-software-is-installed)
in [Troubleshooting](/docker-for-windows/troubleshoot.md).
### How do I uninstall Docker Toolbox?
You might decide that you do not need Toolbox now that you have Docker for Windows, and want to uninstall it. For
details on how to perform a clean uninstall of Toolbox on Windows, see [How to
uninstall Toolbox](/toolbox/toolbox_install_windows.md#how-to-uninstall-toolbox)
details on how to perform a clean uninstall of Toolbox on Windows, see
[How to uninstall Toolbox](/toolbox/toolbox_install_windows.md#how-to-uninstall-toolbox)
in the Toolbox Windows topics.

View File

@ -26,7 +26,8 @@ through the rest of the Docker for Windows tour, or jump over to getting started
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](faqs.md#questions-about-stable-and-beta-channels).
beta channels, see the
[FAQs](/docker-for-windows/faqs.md#questions-about-stable-and-beta-channels).
<table style="width:100%">
<tr>
@ -52,16 +53,17 @@ beta channels, see the [FAQs](faqs.md#questions-about-stable-and-beta-channels).
>**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](index.md#what-to-know-before-you-install)
> for a full list of prerequisites.
> - 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
> - 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#questions-about-stable-and-beta-channels).
> 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
@ -89,7 +91,7 @@ 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).
<p />
* **What the Docker for Windows install includes**: The installation provides [Docker Engine](/engine/userguide/intro.md), Docker CLI client, [Docker Compose](/compose/overview/), and [Docker Machine](/machine/overview.md).
* **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
@ -104,7 +106,7 @@ Windows containers.
<p />
* [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 />
* Docker Container Platform for Windows Server 2016 [articles and blog posts](https://www.docker.com/microsoft) on the Docker website
* 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
@ -118,7 +120,7 @@ Windows containers.
3. Click **Finish** on the setup complete dialog to launch Docker.
![Install complete>](images/installer-finishes.png)
![Install complete>](/docker-for-windows/images/installer-finishes.png)
## Step 2. Start Docker for Windows
@ -128,7 +130,7 @@ The whale in the status bar indicates that Docker is running, and accessible fro
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](images/win-install-success-popup.png)
![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.
@ -151,197 +153,249 @@ Start your favorite shell (`cmd.exe`, PowerShell, or other) to check your versio
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.
1. Open a shell (`cmd.exe`, PowerShell, or other).
1. Open a shell (`cmd.exe`, PowerShell, or other).
2. Run some Docker commands, such as `docker ps`, `docker version`, and `docker info`.
2. Run some Docker commands, such as `docker ps`, `docker version`, and `docker info`.
Here is the output of `docker ps` run in a powershell. (In this example, no containers are running yet.)
```none
PS C:\Users\jdoe> docker ps
PS C:\Users\jdoe> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
```
Here is an example of command output for `docker version`.
PS C:\Users\jdoe> docker version
Client:
Version: 1.13.0-rc3
API version: 1.25
Go version: go1.7.3
Git commit: 4d92237
Built: Tue Dec 6 01:15:44 2016
OS/Arch: windows/amd64
```none
PS C:\Users\jdoe> docker version
Client:
Version: 1.13.0-rc3
API version: 1.25
Go version: go1.7.3
Git commit: 4d92237
Built: Tue Dec 6 01:15:44 2016
OS/Arch: windows/amd64
Server:
Version: 1.13.0-rc3
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 4d92237
Built: Tue Dec 6 01:15:44 2016
OS/Arch: linux/amd64
Experimental: true
Server:
Version: 1.13.0-rc3
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 4d92237
Built: Tue Dec 6 01:15:44 2016
OS/Arch: linux/amd64
Experimental: true
```
Here is an example of command output for `docker info`.
PS C:\Users\jdoe> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.13.0-rc3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 51371867a01c467f08af739783b8beafc154c4d7
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.8.12-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934 GiB
Name: moby
ID: EODE:VBXI:Y4EL:JXRJ:STRS:HCAI:LDLF:P4KW:B5XU:QPNE:LKTM:RG32
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 13
Goroutines: 21
System Time: 2016-12-07T19:02:41.3287973Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
```none
PS C:\Users\jdoe> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.13.0-rc3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 51371867a01c467f08af739783b8beafc154c4d7
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.8.12-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934 GiB
Name: moby
ID: EODE:VBXI:Y4EL:JXRJ:STRS:HCAI:LDLF:P4KW:B5XU:QPNE:LKTM:RG32
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 13
Goroutines: 21
System Time: 2016-12-07T19:02:41.3287973Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
```
>**Note:** The outputs above are examples. Your output for commands like `docker version` and `docker info` will vary depending on your product versions (e.g., as you install newer versions).
>**Note:** The outputs above are examples. Your output for commands like
> `docker version` and `docker info` will vary depending on your product
> versions (e.g., as you install newer versions).
3. Run `docker run hello-world` to test pulling an image from Docker Hub and starting a container.
PS C:\Users\jdoe> docker run hello-world
```none
PS C:\Users\jdoe> docker run hello-world
Hello from Docker.
This message shows that your installation appears to be working correctly.
Hello from Docker.
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
```
4. Try something more ambitious, and run an Ubuntu container with this command.
4. Try something more ambitious, and run an Ubuntu container with this command.
docker run -it ubuntu bash
```none
PS C:\Users\jdoe> docker run -it ubuntu bash
```
This will download the `ubuntu` container image and start it. Here is the output of running this command in a powershell.
This will download the `ubuntu` container image and start it. Here is the output of running this command in a powershell.
PS C:\Users\jdoe> docker run -it ubuntu bash
```none
PS C:\Users\jdoe> docker run -it ubuntu bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
5a132a7e7af1: Pull complete
fd2731e4c50c: Pull complete
28a2f68d1120: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:4e85ebe01d056b43955250bbac22bdb8734271122e3c78d21e55ee235fc6802d
Status: Downloaded newer image for ubuntu:latest
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
5a132a7e7af1: Pull complete
fd2731e4c50c: Pull complete
28a2f68d1120: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:4e85ebe01d056b43955250bbac22bdb8734271122e3c78d21e55ee235fc6802d
Status: Downloaded newer image for ubuntu:latest
```
Type `exit` to stop the container and close the powershell.
Type `exit` to stop the container and close the powershell.
5. Start a Dockerized webserver with this command:
5. Start a Dockerized webserver with this command:
docker run -d -p 80:80 --name webserver nginx
```none
PS C:\Users\jdoe> docker run -d -p 80:80 --name webserver nginx
```
This will download the `nginx` container image and start it. Here is the output of running this command in a powershell.
This will download the `nginx` container image and start it. Here is the
output of running this command in a powershell.
PS C:\Users\jdoe> docker run -d -p 80:80 --name webserver nginx
```none
PS C:\Users\jdoe> docker run -d -p 80:80 --name webserver nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
716f7a5f3082: Pull complete
7b10f03a0309: Pull complete
Digest: sha256:f6a001272d5d324c4c9f3f183e1b69e9e0ff12debeb7a092730d638c33e0de3e
Status: Downloaded newer image for nginx:latest
dfe13c68b3b86f01951af617df02be4897184cbf7a8b4d5caf1c3c5bd3fc267f
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
716f7a5f3082: Pull complete
7b10f03a0309: Pull complete
Digest: sha256:f6a001272d5d324c4c9f3f183e1b69e9e0ff12debeb7a092730d638c33e0de3e
Status: Downloaded newer image for nginx:latest
dfe13c68b3b86f01951af617df02be4897184cbf7a8b4d5caf1c3c5bd3fc267f
```
6. Point your web browser at `http://localhost` to display the start page.
(Since you specified the default HTTP port, it isn't necessary to append `:80` at the end of the URL.)
(Since you specified the default HTTP port, it isn't necessary to append
`:80` at the end of the URL.)
![Run nginx edge>](images/run-nginx.png)
![Run nginx edge>](images/run-nginx.png)
7. Run `docker ps` while your webserver is running to see details on the container.
7. Run `docker ps` while your webserver is running to see details on the
container.
PS C:\Users\jdoe> docker ps
```none
PS C:\Users\jdoe> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
dfe13c68b3b8 nginx "nginx -g 'daemon off" 3 days ago Up 45 seconds 0.0.0.0:80->80/tcp, 443/tc
p webserver
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
dfe13c68b3b8 nginx "nginx -g 'daemon off" 3 days ago Up 45 seconds 0.0.0.0:80->80/tcp, 443/tc
p webserver
```
8. Stop or remove containers and images.
8. Stop or remove containers and images.
The `nginx` webserver will continue to run in the container on that port until you stop and/or remove the container. If you want to stop the webserver, type: `docker stop webserver` and start it again with `docker start webserver`.
The `nginx` webserver will continue to run in the container on that port
until you stop and/or remove the container. If you want to stop the
webserver, type: `docker stop webserver` and start it again with `docker
start webserver`.
To stop and remove the running container with a single command, type: `docker rm -f webserver`. This will remove the container, but not the `nginx` image. You can list local images with `docker images`. You might 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 <imageID>|<imageName>`. For example, `docker rmi nginx`.
To stop and remove the running container with a single command, type:
`docker rm -f webserver`. This will remove the container, but not the
`nginx` image. You can list local images with `docker images`. You might
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
<imageID>|<imageName>`. 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](examples.md).
**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).
## Set up tab completion in PowerShell
If you would like to have handy tab completion for Docker commands, you can install the <a href="https://github.com/samneirinck/posh-docker">posh-docker</a> PowerShell Module as follows.
If you would like to have handy tab completion for Docker commands, you can
install the [`posh-docker`](https://github.com/samneirinck/posh-docker)
PowerShell Module as follows.
1. Start an "elevated" PowerShell (i.e., run it as administrator).
1. Start an "elevated" PowerShell (i.e., run it as administrator).
To do this, search for PowerShell, right-click, and choose **Run as administrator**.<br>
To do this, search for PowerShell, right-click, and choose
**Run as administrator**.<br>
![Run PowerShell as administrator](images/PowerShell-as-admin.png)
![Run PowerShell as administrator](/docker-for-windows/images/PowerShell-as-admin.png)
<br><br>
When asked if you want to allow this app to make changes to your device, click **Yes**.
When asked if you want to allow this app to make changes to your device,
click **Yes**.
2. Set the [script execution policy](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/set-executionpolicy) to allow downloaded scripts signed by trusted publishers to run on your computer. To do so, type this at the PowerShell prompt.
<br>
`Set-ExecutionPolicy RemoteSigned`
<br>
To check that the policy is set properly, run `get-executionpolicy`, which should return `RemoteSigned`.
<br>
3. To enable auto-completion of commands for the current PowerShell only, type:
2. Set the
[script execution policy](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/set-executionpolicy)
to allow downloaded scripts signed by trusted publishers to run on your
computer. To do so, type this at the PowerShell prompt.
`Install-Module posh-docker`
```none
Set-ExecutionPolicy RemoteSigned
```
4. To make tab completion persistent across all PowerShell sessions, add the command to a `$PROFILE` by typing these commands at the PowerShell prompt.
To check that the policy is set properly, run `get-executionpolicy`, which
should return `RemoteSigned`.
Install-Module -Scope CurrentUser posh-docker -Force
Add-Content $PROFILE "`nInstall-Module posh-docker"
3. To enable auto-completion of commands for the current PowerShell only, type:
This creates a `$PROFILE` if one does not already exist, and adds this line into the file:
```none
Install-Module posh-docker
```
`Install-Module posh-docker`
4. To make tab completion persistent across all PowerShell sessions, add the
command to a `$PROFILE` by typing these commands at the PowerShell prompt.
<br>
To check that the file was properly created, or simply edit it manually, type this in PowerShell:
```none
Install-Module -Scope CurrentUser posh-docker -Force
Add-Content $PROFILE "`nInstall-Module posh-docker"
```
`Notepad $PROFILE`
This creates a `$PROFILE` if one does not already exist, and adds this line
into the file:
```none
Install-Module posh-docker
```
To check that the file was properly created, or simply edit it manually,
type this in PowerShell:
```none
Notepad $PROFILE
```
Now, when you press tab after typing the first few letters, Docker commands such
as `start`, `stop`, `run`, and their options, along with container and image
@ -358,14 +412,13 @@ always visible on the taskbar. To do this, drag-and-drop the whale icon. Or,
right-click an empty porition of the taskbar, select Settings, and choose
display options through taskbar settings for notifications.
>
![whale pinned to taskbar](images/whale-taskbar.png)
![whale pinned to taskbar](/docker-for-windows/images/whale-taskbar.png)
![Showing hidden apps in the taskbar](images/whale-systray.png)
![Showing hidden apps in the taskbar](/docker-for-windows/images/whale-systray.png)
To get a popup menu with application options, right-click the whale:
![Docker for Windows popup menu](images/config-popup-menu-win.png)
![Docker for Windows popup menu](/docker-for-windows/images/config-popup-menu-win.png)
The **Settings** dialogs provide options to allow Docker auto-start,
automatically check for updates, share local drives with Docker containers,
@ -374,25 +427,33 @@ perform a factory reset.
### General
![Settings](images/settings-general.png)
![Settings](/docker-for-windows/images/settings-general.png)
* **Start Docker when you log in** - Automatically start the Docker for Windows application upon Windows system login.
* **Start Docker when you log in** - Automatically start the Docker for Windows
application upon Windows system login.
* **Check for updates when the application starts** - Docker for Windows is set to automatically check for updates and notify you when an update is available.
If an update is found, click **OK** to accept and install it (or cancel to keep
the current version). Uncheck this option if you do not want notifications of
version upgrades. You can still find out about updates manually by choosing
**Check for Updates** from the menu.
* **Check for updates when the application starts** - Docker for Windows is set
to automatically check for updates and notify you when an update is available.
If an update is found, click **OK** to accept and install it (or cancel to keep
the current version). Uncheck this option if you do not want notifications of
version upgrades. You can still find out about updates manually by choosing
**Check for Updates** from the menu.
* **Send usage statistics** - You can set Docker for Windows to auto-send diagnostics, crash reports, and usage data. This information can help Docker improve the application and get more context for troubleshooting problems.
* **Send usage statistics** - You can set Docker for Windows to auto-send
diagnostics, crash reports, and usage data. This information can help Docker
improve the application and get more context for troubleshooting problems.
Uncheck any of the options to opt out and prevent auto-send of data. Docker may prompt for more information in some cases, even with auto-send enabled. Also, you can enable or disable these auto-reporting settings with one click on the information popup when you first start Docker.
Uncheck any of the options to opt out and prevent auto-send of data. Docker
may prompt for more information in some cases, even with auto-send enabled.
Also, you can enable or disable these auto-reporting settings with one click
on the information popup when you first start Docker.
![Startup information](images/win-install-success-popup.png)
![Startup information](/docker-for-windows/images/win-install-success-popup.png)
### Shared Drives
Share your local drives (volumes) with Docker for Windows, so that they are available to your containers.
Share your local drives (volumes) with Docker for Windows, so that they are
available to your containers.
![Shared Drives](images/settings-shared-drives.png)
@ -405,31 +466,32 @@ here. If you run `docker` commands and tasks under a different username than the
one used here to set up sharing, your containers will not have permissions to
access the mounted volumes.
>**Tip:** Shared drives are only required for volume mounting [Linux
containers](#switch-between-windows-and-linux-containers), and not
for Windows containers. For Linux containers, you need to share the drive where your project is located (i.e., where the Dockerfile and
volume are located). Runtime errors such as file not found or cannot start
service may indicate shared drives are needed. (See also [Volume mounting
requires shared drives for Linux containers](troubleshoot.md#volume-mounting-requires-shared-drives-for-linux-containers).)
> **Tip:** Shared drives are only required for volume mounting
> [Linux containers](#switch-between-windows-and-linux-containers), and not for
> Windows containers. For Linux containers, you need to share the drive where
> your project is located (i.e., where the Dockerfile and volume are located).
> Runtime errors such as file not found or cannot start service may indicate
> shared drives are needed. (See also
> [Volume mounting requires shared drives for Linux containers](troubleshoot.md#volume-mounting-requires-shared-drives-for-linux-containers).)
See also [Verify domain user has permissions for shared
drives](troubleshoot.md#verify-domain-user-has-permissions-for-shared-drives-volumes)
See also
[Verify domain user has permissions for shared drives](troubleshoot.md#verify-domain-user-has-permissions-for-shared-drives-volumes)
in Troubleshooting.
>**Note:** You can share local drives with your _containers_ but not with Docker
Machine nodes. See [Can I share local drives and filesystem with my
Docker Machine
VMs?](faqs.md#can-i-share-local-drives-and-filesystem-with-my-docker-machine-vms) in
the FAQs.
> **Note:** You can share local drives with your _containers_ but not with
> Docker Machine nodes. See
> [Can I share local drives and filesystem with my Docker Machine VMs?](faqs.md#can-i-share-local-drives-and-filesystem-with-my-docker-machine-vms)
> in the FAQs.
#### Firewall rules for shared drives
Shared drives require port 445 to be open between the host machine and the virtual
machine that runs Linux containers.
>**Note**: In Docker for Windows Beta 29 and higher,
Docker detects if port 445 is closed and shows the following message when you
try to add a shared drive: ![Port 445 blocked](images/drive_sharing_firewall_blocked.png)
> **Note**: In Docker for Windows Beta 29 and higher,
> Docker detects if port 445 is closed and shows the following message when you
> try to add a shared drive:
> ![Port 445 blocked](/docker-for-windows/images/drive_sharing_firewall_blocked.png)
To share the drive, allow connections between the Windows host machine and the
@ -439,7 +501,7 @@ to 10.0.75.1 port 445 (the Windows host) from 10.0.75.2 (the virtual machine).
### Advanced
![CPU and Memory settings](images/settings-cpu-ram.png)
![CPU and Memory settings](/docker-for-windows/images/settings-cpu-ram.png)
* **CPUs** - Change the number of processors assigned to the Linux VM.
@ -455,9 +517,15 @@ You can configure Docker for Windows networking to work on a virtual private net
* **DNS Server** - You can configure the DNS server to use dynamic or static IP addressing.
![Network settings](images/settings-network.png)
![Network settings](/docker-for-windows/images/settings-network.png)
>**Note:** Some users reported problems connecting to Docker Hub on Docker for Windows stable version. This would manifest as an error when trying to run `docker` commands that pull images from Docker Hub that are not already downloaded, such as a first time run of `docker run hello-world`. If you encounter this, reset the DNS server to use the Google DNS fixed address: `8.8.8.8`. For more information, see [Networking issues](troubleshoot.md#networking-issues) in Troubleshooting.
> **Note:** Some users reported problems connecting to Docker Hub on Docker for
> Windows stable version. This would manifest as an error when trying to run
> `docker` commands that pull images from Docker Hub that are not already
> downloaded, such as a first time run of `docker run hello-world`. If you
> encounter this, reset the DNS server to use the Google DNS fixed address:
> `8.8.8.8`. For more information, see
> [Networking issues](troubleshoot.md#networking-issues) in Troubleshooting.
Note that updating these settings requires a reconfiguration and reboot of the Linux VM.
@ -466,7 +534,7 @@ Note that updating these settings requires a reconfiguration and reboot of the L
Docker for Windows lets you configure HTTP/HTTPS Proxy Settings and automatically propagate these to Docker and to your containers.
For example, if you set your proxy settings to `http://proxy.example.com`, Docker will use this proxy when pulling containers.
![Proxies](images/proxies.png)
![Proxies](/docker-for-windows/images/proxies.png)
When you start a container, you will see that your proxy settings propagate into the containers. For example:
@ -498,7 +566,7 @@ some of the commmon settings to make it easier to configure them.
* [Custom registries](#custom-registries)
* [Edit the daemon configuration file](#edit-the-daemon-configuration-file)
![Docker Daemon](images/docker-daemon_basic.png)
![Docker Daemon](/docker-for-windows/images/docker-daemon_basic.png)
#### Experimental mode
@ -543,7 +611,7 @@ Also starting with with Beta 34 and Stable 1.13.0, you can set up your own
As an alternative to using [Docker Hub](https://hub.docker.com/) to store your
public or private images or [Docker Trusted
Registry](/datacenter/dtr/2.1/guides/index.md), you can use Docker to set up your
own insecure [registry](/registry/introduction/). Add URLs for insecure
own insecure [registry](/registry/introduction.md). Add URLs for insecure
registries and registry mirrors on which to host your images. (See also, [How do
I add custom CA certificates?](faqs.md#how-do-i-add-custom-ca-certificates) in
the FAQs.)
@ -551,20 +619,21 @@ the FAQs.)
#### Edit the daemon configuration file
The **Advanced** daemon settings provide the original option to directly edit
the JSON configuration file for the <a
href="/engine/reference/commandline/dockerd/>daemon</a>.
the JSON configuration file for the [daemon](/engine/reference/commandline/dockerd.md).
![Docker Daemon](images/docker-daemon_advanced.png)
![Docker Daemon](/docker-for-windows/images/docker-daemon_advanced.png)
For a full list of options on the Docker daemon, see [daemon](/engine/reference/commandline/dockerd/) in the Docker Engine command line reference.
For a full list of options on the Docker daemon, see
[daemon](/engine/reference/commandline/dockerd.md) in the Docker Engine command
line reference.
In that topic, see also:
* [Daemon configuration file](/engine/reference/commandline/dockerd/#/daemon-configuration-file)
* [Daemon configuration file](/engine/reference/commandline/dockerd.md#daemon-configuration-file)
* [Linux configuration file](/engine/reference/commandline/dockerd/#/linux-configuration-file)
* [Linux configuration file](/engine/reference/commandline/dockerd.md#linux-configuration-file)
* [Windows configuration file](/engine/reference/commandline/dockerd/#/windows-configuration-file)
* [Windows configuration file](/engine/reference/commandline/dockerd.md#windows-configuration-file)
Note that updating these settings requires a reconfiguration and reboot of the
Linux VM.
@ -579,31 +648,35 @@ Microsoft Developer Network has preliminary/draft information on Windows
containers
[here](https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/about_overview).
For a full list of options on the Docker daemon, see [daemon](/engine/reference/commandline/dockerd/) in the Docker Engine command line reference.
For a full list of options on the Docker daemon, see [daemon](/engine/reference/commandline/dockerd.md) in the Docker Engine command line reference.
In that topic, see also:
* [Daemon configuration file](/engine/reference/commandline/dockerd/#/daemon-configuration-file)
* [Daemon configuration file](/engine/reference/commandline/dockerd.md#daemon-configuration-file)
* [Linux configuration file](/engine/reference/commandline/dockerd/#/linux-configuration-file)
* [Linux configuration file](/engine/reference/commandline/dockerd.md#linux-configuration-file)
* [Windows configuration file](/engine/reference/commandline/dockerd/#/windows-configuration-file)
* [Windows configuration file](/engine/reference/commandline/dockerd.md#windows-configuration-file)
#### Getting started with Windows containers
If you are interested in working with Windows containers, here are some guides to help you get started.
* [Build and Run Your First Windows Server Container (Blog Post)](https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/) gives a quick tour of how to build and run native Docker Windows containers on Windows 10 and Windows Server 2016 evaluation releases.
* [Build and Run Your First Windows Server Container (Blog Post)](https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/)
gives a quick tour of how to build and run native Docker Windows containers on
Windows 10 and Windows Server 2016 evaluation releases.
* [Getting Started with Windows Containers (Lab)](https://github.com/docker/labs/blob/master/windows/windows-containers/README.md)
shows you how to use the
[MusicStore](https://github.com/aspnet/MusicStore/blob/dev/README.md)
application with Windows containers. The MusicStore is a standard .NET
application and, [forked here to use
containers](https://github.com/friism/MusicStore), is a good example of a
multi-container application.
shows you how to use the
[MusicStore](https://github.com/aspnet/MusicStore/blob/dev/README.md)
application with Windows containers. The MusicStore is a standard .NET
application and,
[forked here to use containers](https://github.com/friism/MusicStore), is a
good example of a multi-container application.
>**Disclaimer:** This lab is still in work, and is based off of the blog, but you can test and leverage the example walkthroughs now, if you want to start experimenting. Please checking back as the lab evolves.
> **Disclaimer:** This lab is still in work, and is based off of the blog, but
> you can test and leverage the example walkthroughs now, if you want to start
> experimenting. Please checking back as the lab evolves.
#### About the Docker Windows containers specific dialogs
@ -653,21 +726,31 @@ Select **Upload a diagnostic**.
This uploads (sends) the logs to Docker.
![Diagnose problems and Feedback](images/diagnose-feedback-id-win.png)
![Diagnose problems and Feedback](/docker-for-windows/images/diagnose-feedback-id-win.png)
To create a new issue directly on GitHub, open [Docker for Windows issues on GitHub](https://github.com/docker/for-win/issues) in your web browser and follow the instructions in the README. Click [New Issue](https://github.com/docker/for-win/issues/new) on that page to get a "create new issue" template prepopulated with sections for the ID and summary of your diagnostics, system and version details, description of expected and actual behavior, and steps to reproduce the issue.
To create a new issue directly on GitHub, open
[Docker for Windows issues on GitHub](https://github.com/docker/for-win/issues)
in your web browser and follow the instructions in the README. Click
[New Issue](https://github.com/docker/for-win/issues/new) on that page to get a
"create new issue" template prepopulated with sections for the ID and summary of
your diagnostics, system and version details, description of expected and actual
behavior, and steps to reproduce the issue.
![issue template](images/diagnose-d4win-issues-template.png)
![issue template](/docker-for-windows/images/diagnose-d4win-issues-template.png)
### Reset
![Reset](images/settings-reset.png)
![Reset](/docker-for-windows/images/settings-reset.png)
* **Restart Docker** - Shuts down and restarts the Docker application.
* **Reset to Toolbox default machine content** - Imports containers and images from the existing Docker Toolbox machine named `default`. (This option is enabled only if you have Toolbox installed.) The VirtualBox VM will not be removed.
* **Reset to Toolbox default machine content** - Imports containers and images
from the existing Docker Toolbox machine named `default`. (This option is
enabled only if you have Toolbox installed.) The VirtualBox VM will not be
removed.
* **Reset to factory defaults** - Resets Docker to factory defaults. This is useful in cases where Docker stops working or becomes unresponsive.
* **Reset to factory defaults** - Resets Docker to factory defaults. This is
useful in cases where Docker stops working or becomes unresponsive.
<!-- ### Going back to Toolbox
@ -679,13 +762,17 @@ If you want to go back to using Docker Toolbox, you have to disable the Hyper-V
* Try out the [Getting Started with Docker](/engine/getstarted/index.md) tutorial.
* Follow up by working through the voting app example to learn how to [define and deploy a Docker stack](/engine/getstarted-voting-app/index.md) to a
[swarm](/engine/swarm/index.md). This example shows how to deploy multiple
containers as services and use new [Compose Version
3](/compose/compose-file.md#version-3) features.
* Follow up by working through the voting app example to learn how to
[define and deploy a Docker stack](/engine/getstarted-voting-app/index.md) to a
[swarm](/engine/swarm/index.md). This example shows how to deploy multiple
containers as services and use new
[Compose Version 3](/compose/compose-file.md#version-3) features.
* Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example walkthroughs and source code.
* Dig in deeper with [Docker Labs](https://github.com/docker/labs/) example
walkthroughs and source code.
* For a summary of Docker command line interface (CLI) commands, see [Docker CLI Reference Guide](/engine/reference/index.md).
* For a summary of Docker command line interface (CLI) commands, see the
[Docker CLI Reference Guide](/engine/reference/docker.md).
* Check out the blog post [Introducing Docker 1.13.0](https://blog.docker.com/2017/01/whats-new-in-docker-1-13/).
* Check out the blog post
[Introducing Docker 1.13.0](https://blog.docker.com/2017/01/whats-new-in-docker-1-13/).

View File

@ -8,30 +8,39 @@ title: Overview of Docker Hub
[Docker Hub](https://hub.docker.com) is a cloud-based registry service which
allows you to link to code repositories, build your images and test them, stores
manually pushed images, and links to [Docker Cloud](/docker-cloud/) so you can deploy images to your
hosts. It provides a centralized resource for container image discovery,
distribution and change management, [user and team collaboration](orgs.md), and
workflow automation throughout the development pipeline.
manually pushed images, and links to [Docker Cloud](/docker-cloud/) so you can
deploy images to your hosts. It provides a centralized resource for container
image discovery, distribution and change management,
[user and team collaboration](/docker-hub/orgs.md), and workflow automation
throughout the development pipeline.
Log in to Docker Hub and Docker Cloud using [your free Docker ID](accounts.md).
Log in to Docker Hub and Docker Cloud using
[your free Docker ID](/docker-hub/accounts.md).
![Getting started with Docker Hub](images/getting-started.png)
![Getting started with Docker Hub](/docker-hub/images/getting-started.png)
Docker Hub provides the following major features:
* [Image Repositories](repos.md): Find and pull images from community and official libraries, and manage, push to, and pull from private image libraries to which you have access.
* [Automated Builds](builds.md): Automatically create new images when you make changes to a source code repository.
* [Webhooks](webhooks.md): A feature of Automated Builds, Webhooks let you trigger actions after a successful push to a repository.
* [Organizations](orgs.md): Create work groups to manage access to image repositories.
* GitHub and Bitbucket Integration: Add the Hub and your Docker Images to your current workflows.
* [Image Repositories](/docker-hub/repos.md): Find and pull images from
community and official libraries, and manage, push to, and pull from private
image libraries to which you have access.
* [Automated Builds](/docker-hub/builds.md): Automatically create new images
when you make changes to a source code repository.
* [Webhooks](/docker-hub/webhooks.md): A feature of Automated Builds, Webhooks
let you trigger actions after a successful push to a repository.
* [Organizations](/docker-hub/orgs.md): Create work groups to manage access to
image repositories.
* GitHub and Bitbucket Integration: Add the Hub and your Docker Images to your
current workflows.
## Create a Docker ID
To explore Docker Hub, you'll need to create an account by following the
directions in [Your Docker ID](accounts.md).
directions in [Your Docker ID](/docker-hub/accounts.md).
> **Note**: You can search for and pull Docker images from Hub without logging in, however to push images you must log in.
> **Note**: You can search for and pull Docker images from Hub without logging
> in, however to push images you must log in.
Your Docker ID gives you one private Docker Hub repository for free. If you need
more private repositories, you can upgrade from your free account to a paid
@ -57,7 +66,7 @@ the repositories you can access and their status, view your "Dashboard" page on
[Docker Hub](https://hub.docker.com).
You can find more information on working with Docker images in the
[Docker userguide](/engine/tutorials/dockerimages/).
[Docker userguide](/engine/getstarted/step_four.md).
### Use Official Repositories
@ -70,7 +79,10 @@ to building your applications and services.
With Official Repositories you know you're using an optimized and
up-to-date image that was built by experts to power your applications.
> **Note:** If you would like to contribute an Official Repository for your organization or product, see the documentation on [Official Repositories on Docker Hub](official_repos.md) for more information.
> **Note:** If you would like to contribute an Official Repository for your
> organization or product, see the documentation on
> [Official Repositories on Docker Hub](/docker-hub/official_repos.md) for more
> information.
## Work with Docker Hub image repositories
@ -80,13 +92,19 @@ images.
You can configure Docker Hub repositories in two ways:
* [Repositories](repos.md), which allow you to push images from a local Docker daemon to Docker Hub, and
* [Automated Builds](builds.md), which link to a source code repository and trigger an image rebuild process on Docker Hub when changes are detected in the source code.
* [Repositories](/docker-hub/repos.md), which allow you to push images from a
local Docker daemon to Docker Hub, and
* [Automated Builds](/docker-hub/builds.md), which link to a source code
repository and trigger an image rebuild process on Docker Hub when changes are
detected in the source code.
You can create public repositories which can be accessed by any other Hub user,
or you can create private repositories with limited access you control.
### Docker commands and Docker Hub
Docker itself provides access to Docker Hub services via the [`docker search`](/engine/reference/commandline/search),
[`pull`](/engine/reference/commandline/pull), [`login`](/engine/reference/commandline/login), and [`push`](/engine/reference/commandline/push) commands.
Docker itself provides access to Docker Hub services via the
[`docker search`](/engine/reference/commandline/search.md),
[`pull`](/engine/reference/commandline/pull.md),
[`login`](/engine/reference/commandline/login.md), and
[`push`](/engine/reference/commandline/push.md) commands.

View File

@ -12,10 +12,10 @@ organization account.
Alternatively, if the source code for your Docker image is on GitHub or
Bitbucket, you can use an "Automated build" repository, which is built by the
Docker Hub services. See the [automated builds documentation](builds.md) to read
Docker Hub services. See the [automated builds documentation](/docker-hub/builds.md) to read
about the extra functionality provided by those services.
![repositories](images/repos.png)
![repositories](/docker-hub/images/repos.png)
## Searching for images
@ -59,7 +59,7 @@ Image sizes are the cumulative space taken up by the image and all its parent
images. This is also the disk space used by the contents of the Tar file created
when you `docker save` an image.
![images/busybox-image-tags.png](images/busybox-image-tags.png)
![images/busybox-image-tags.png](/docker-hub/images/busybox-image-tags.png)
## Creating a new repository on Docker Hub
@ -68,7 +68,7 @@ Docker Hub." screen, from which you can click directly into "Create Repository".
You can also use the "Create &#x25BC;" menu to "Create Repository".
When creating a new repository, you can choose to put it in your Docker ID
namespace, or that of any [organization](orgs.md) that you are in the "Owners"
namespace, or that of any [organization](/docker-hub/orgs.md) that you are in the "Owners"
team. The Repository Name will need to be unique in that namespace, can be two
to 255 characters, and can only contain lowercase letters, numbers or `-` and
`_`.
@ -95,7 +95,7 @@ You can name your local images either when you build it, using
by re-tagging an existing local image `docker tag <existing-image> <hub-user>/<repo-name>[:<tag>]`,
or by using `docker commit <exiting-container> <hub-user>/<repo-name>[:<tag>]` to commit
changes.
See [Working with Docker images](/engine/tutorials/dockerimages/) for a detailed description.
See [Working with Docker images](/engine/getstarted/step_four.md) for a detailed description.
Now you can push this repository to the registry designated by its name or tag.
@ -130,7 +130,7 @@ changing its status from private to public.
You can also assign more granular collaborator rights ("Read", "Write", or
"Admin") on Docker Hub by using organizations and teams. For more information
see the [organizations documentation](orgs.md).
see the [organizations documentation](/docker-hub/orgs.md).
## Private repositories
@ -158,8 +158,8 @@ It is possible to give access to a private repository to those whom you
designate (i.e., collaborators) from its "Settings" page. From there, you can
also switch repository status (*public* to *private*, or vice-versa). You will
need to have an available private repository slot open before you can do such a
switch. If you don't have any available, you can always upgrade your [Docker
Hub](https://hub.docker.com/account/billing-plans/) plan.
switch. If you don't have any available, you can always upgrade your
[Docker Hub](https://hub.docker.com/account/billing-plans/) plan.
## Webhooks

View File

@ -43,9 +43,9 @@ to Docker services.
For Docker Cloud, Hub, and Store, log in using the web interface.
![Login using the web interface](images/login-cloud.png)
![Login using the web interface](/docker-id/images/login-cloud.png)
You can also log in using the `docker login` command. (You can read more about `docker login` [here](../engine/reference/commandline/login/).)
You can also log in using the `docker login` command. (You can read more about `docker login` [here](/engine/reference/commandline/login.md).)
> **Warning:** When you use the `docker login` command, your credentials are
stored in your home directory in `.docker/config.json`. The password is base64
@ -54,4 +54,4 @@ encoded in this file. If you require secure storage for this password, use the
## The Accounts API
Once you create and verify your Docker ID, you can also update it using the [Docker Accounts API](../engine/reference/api/docker_io_accounts_api/).
Once you create and verify your Docker ID, you can also update it using the [Docker Accounts API](/docker-id/api-reference.md).

View File

@ -40,9 +40,9 @@ the tags. If you use `docker rename` to rename a container, the new name is not
reflected in the log messages. Instead, these messages continue to use the
original container name.
For advanced usage, the generated tag's use [go
templates](http://golang.org/pkg/text/template/) and the container's [logging
context](https://github.com/docker/docker/blob/v1.13.0/daemon/logger/context.go).
For advanced usage, the generated tag's use
[go templates](http://golang.org/pkg/text/template/) and the container's
[logging context](https://github.com/docker/docker/blob/v1.13.0/daemon/logger/loginfo.go).
As an example of what is possible with the syslog logger, if you use the following
command, you get the output that follows:

View File

@ -104,9 +104,9 @@ the container's cgroup on the host machine.
|-----------------------|-----------------------------|
| `--cpus=<value>` | Specify how much of the available CPU resources a container can use. For instance, if the host machine has two CPUs and you set `--cpus="1.5"`, the container will be guaranteed to be able to access at most one and a half of the CPUs. This is the equivalent of setting `--cpu-period="100000"` and `--cpu-quota="150000"`. Available in Docker 1.13 and higher. |
| `--cpu-period=<value>`| Specify the CPU CFS scheduler period, which is used alongside `--cpu-quota`. Defaults to 1 second, expressed in micro-seconds. Most users do not change this from the default. If you use Docker 1.13 or higher, use `--cpus` instead. |
| `--cpu-quota=<value>`: impose a CPU CFS quota on the container. The number of microseconds per `--cpu-period` that the container is guaranteed CPU access. In other words, `cpu-quota / cpu-period`. If you use Docker 1.13 or higher, use `--cpus` instead. |
| `--cpuset-cpus`: limit the specific CPUs or cores a container can use. A comma-separated list or hyphen-separated range of CPUs a container can use, if you have more than one CPU. The first CPU is numbered 0. A valid value might be `0-3` (to use the first, second, third, and fourth CPU) or `1,3` (to use the second and fourth CPU). |
| `--cpu-shares` | Set this flag to a value greater or less than the default of 1024 to increase or reduce the container's weight, and give it access to a greater or lesser proportion of the host machine's CPU cycles. This is only enforced when CPU cycles are constrained. When plenty of CPU cycles are available, all containers use as much CPU as they need. In that way, this is a soft limit. `--cpu-shares` does not prevent containers from being scheduled in swarm mode. It prioritizes container CPU resources for the available CPU cycles. It does not guarantee or reserve any specific CPU access. |
| `--cpu-quota=<value>` | Impose a CPU CFS quota on the container. The number of microseconds per `--cpu-period` that the container is guaranteed CPU access. In other words, `cpu-quota / cpu-period`. If you use Docker 1.13 or higher, use `--cpus` instead. |
| `--cpuset-cpus` | Limit the specific CPUs or cores a container can use. A comma-separated list or hyphen-separated range of CPUs a container can use, if you have more than one CPU. The first CPU is numbered 0. A valid value might be `0-3` (to use the first, second, third, and fourth CPU) or `1,3` (to use the second and fourth CPU). |
| `--cpu-shares` | Set this flag to a value greater or less than the default of 1024 to increase or reduce the container's weight, and give it access to a greater or lesser proportion of the host machine's CPU cycles. This is only enforced when CPU cycles are constrained. When plenty of CPU cycles are available, all containers use as much CPU as they need. In that way, this is a soft limit. `--cpu-shares` does not prevent containers from being scheduled in swarm mode. It prioritizes container CPU resources for the available CPU cycles. It does not guarantee or reserve any specific CPU access. |
If you have 1 CPU, each of the following commands will guarantee the container at
most 50% of the CPU every second.
@ -129,7 +129,7 @@ In Docker 1.13 and higher, you can configure your container to use the
realtime scheduler, for tasks which cannot use the CFS scheduler. You need to
[make sure the host machine's kernel is configured correctly](#configure-the-host-machines-kernel)
before you can [configure the Docker daemon](#configure-the-docker-daemon) or
[configure individuyal containers](#configure-individual-containers).
[configure individual containers](#configure-individual-containers).
>**Warning**: CPU scheduling and prioritization are advanced kernel-level
features. Most users do not need to change these values from their defaults.

View File

@ -2,7 +2,7 @@
title: Getting started with the Engine API
---
To try out the Docker Engine API in development, [you first need to install Docker](https://docs.docker.com/engine/installation/).
To try out the Docker Engine API in development, [you first need to install Docker](/engine/installation.md).
Next, you need to install an SDK for the language you are using. There are official ones available for Python and Go, and a number of community maintained libraries for other languages. [Head to the SDKs page to find and install them.](sdks.md)

View File

@ -13,4 +13,4 @@ This section contains the following:
* [Dockerizing a CouchDB service](couchdb_data_volumes.md)
* [Dockerizing a Redis service](running_redis_service.md)
* [Dockerizing an apt-cacher-ng service](apt-cacher-ng.md)
* [Dockerizing applications: A 'Hello world'](../tutorials/dockerizing.md)
* [Dockerizing applications: A 'Hello world'](/engine/getstarted/step_one.md)

View File

@ -1,30 +1,34 @@
---
description: overview of voting app example
keywords: docker-stack.yml, stack deploy, compose, multi-container, services, swarm mode, cluster, voting app,
title: Tour the voting app
title: Sample app overview
---
This example is built around a web-based voting application that collects,
tallies, and returns the results of votes (for cats and dogs, or other choices
you specify). The voting app includes several services, each one running in its
own container. We'll deploy the app as a _stack_ to introduce some new concepts
surfaced in [Compose Version 3](/compose/compose-file.md#version-3), and also
use [swarm mode](/engine/swarm/index.md), which is cluster management and
orchestration capability built into Docker Engine.
This example is built around a web-based voting application
that collects, tallies, and returns the results of votes
(for cats and dogs, or other choices you specify). The voting
app includes several services, each one running in its
own container. We'll deploy the app as a _stack_ to introduce
some new concepts surfaced in
[Compose Version 3](/compose/compose-file.md#version-3), and
also use [swarm mode](/engine/swarm/index.md), which is
cluster management and orchestration capability built into
Docker Engine.
## Got Docker?
If you haven't yet downloaded Docker or installed it, go to [Get
Docker](/engine/getstarted/step_one.md#step-1-get-docker) and grab Docker for
your platform. You can follow along and run this example using Docker for Mac,
Docker for Windows or Docker for Linux.
If you haven't yet downloaded Docker or installed it, go to
[Get Docker](/engine/getstarted/step_one.md#step-1-get-docker)
and grab Docker for your platform. You can follow along and
run this example using Docker for Mac, Docker for Windows or
Docker for Linux.
Once you have Docker installed, you can run `docker hello-world` or other
commands described in the Get Started with Docker tutorial to [verify your
installation](/engine/getstarted/step_one.md#step-3-verify-your-installation).
If you are totally new to Docker, you might continue through the full [Get
Started with Docker tutorial](/engine/getstarted/index.md) first, then come
back.
Once you have Docker installed, you can run `docker hello-world`
or other commands described in the Get Started with Docker
tutorial to [verify your installation](/engine/getstarted/step_one.md#step-3-verify-your-installation).
If you are totally new to Docker, you might continue through
the full [Get Started with Docker tutorial](/engine/getstarted/index.md)
first, then come back.
## What you'll learn and do
@ -41,10 +45,17 @@ the `docker stack deploy` command
`vote` image to implement a poll on different choices
* Use features new in Compose Version 3, highlighted in the sample app
## Anatomy of the voting app
## Services and images overview
The voting app you are about to deploy is composed of several services:
A service is a bit of executable code designed to accomplish
a specific task. A service can run in one or more
containers. Defining a service configuration for your app
(above and beyond `docker run` commands) enables you to
deploy it to a swarm and manage it as a distributed
multi-container application.
The voting app you are about to deploy is composed
of several services, each based on an image:
| Service | Description | Base Image |
| ------------- |--------------| -----|
@ -89,16 +100,37 @@ The `deploy` key specifies aspects of a swarm deployment, as described below in
[Compose Version 3 features and
compatibility](#compose-v3-features-and-compatibility).
## docker-stack.yml deployment configuration
## docker-stack.yml deployment configuration file
We'll deploy the app using `docker-stack.yml`, which is a type of [Compose
In addition to defining a set of build and run commands in a Dockerfile, you can
define services in a [Compose file](/compose/compose-file.md), along with
details about how and where those services will run.
In the Getting Started with Docker tutorial, you wrote a
[Dockerfile for the whalesay app](/engine/getstarted/step_four.md) then used
it to build the image and run it in a container.
For this tutorial, the Dockerfiles for our services are already written, the
images are pre-built, and when we deploy, each service will run in a container
(or more than one, for those that have replicas defined to scale the app).
To understand the relationship between Compose files and Dockerfiles, take a
quick look at the [source code for the voting app
here](https://github.com/docker/example-voting-app). For example, the vote
service is based on a Python image built using the [Dockerfile for
`vote`](https://github.com/docker/example-voting-app/blob/master/vote/Dockerfile)
and the vote result service is based on a
Node.js image built using the [Dockerfile for
`vote_result`](https://github.com/docker/example-voting-app/blob/master/result/Dockerfile).
We'll deploy this app using `docker-stack.yml`, which is a type of [Compose
file](/compose/compose-file.md) new in Compose Version 3.
To follow along with the example, you need only have Docker running and the copy
of `docker-stack.yml` we provide here. This file defines all the services shown
in the [table above](#anatomy-of-the-voting-app), their base images,
configuration details such as ports and networks, application dependencies, and
the swarm configuration.
To follow along with the example, you need only have Docker running and
the copy of `docker-stack.yml` we provide here. This file defines all
the services shown in the [table above](#services-and-images-overview),
their base images, configuration details such as ports and
networks, application dependencies, and the swarm configuration.
```
version: "3"
@ -192,7 +224,7 @@ volumes:
## Compose Version 3 features and compatibility
To deploy the voting application, we will run the `docker-stack deploy` command
To deploy the voting application, we will run the `docker stack deploy` command
with this `docker-stack.yml` file to pull the referenced images and launch the
services in a swarm as configured in the `.yml`.

View File

@ -66,7 +66,7 @@ worker - virtualbox Running tcp://192.168.99.101:2376 v1
You now have two "Dockerized" machines, each running
Docker Engine, accessible through the
[Docker CLI](/engine/reference/commandline.md), and available
[Docker CLI](/engine/reference/commandline/docker.md), and available
to become swarm nodes.
You can also get the IP address of a particular machine:

View File

@ -32,7 +32,7 @@ deployed.
![Visualizer web page](images/visualizer.png)
This surfaces some configuration and characteristics from
[docker-stack.yml](index#docker-stackyml), and you can see those strategies in
[docker-stack.yml](index.md#docker-stackyml), and you can see those strategies in
action here. For example:
* We have two nodes running: a `manager` and a `worker`.

View File

@ -21,23 +21,23 @@ Depending on your interest, the Docker documentation contains a wealth of inform
</tr>
<tr>
<td class="tg-031e">More about Docker for Mac, features, examples, FAQs, relationship to Docker Machine and Docker Toolbox, and how this fits in the Docker ecosystem</td>
<td class="tg-031e">[Getting Started with Docker for Mac](https://docs.docker.com/docker-for-mac/)</td>
<td class="tg-031e"><a href="/docker-for-mac/">Getting Started with Docker for Mac</a></td>
</tr>
<tr>
<td class="tg-031e">More about Docker for Windows, features, examples, FAQs, relationship to Docker Machine and Docker Toolbox, and how this fits in the Docker ecosystem</td>
<td class="tg-031e">[Getting Started with Docker for Windows](https://docs.docker.com/docker-for-windows/)</td>
<td class="tg-031e"><a href="/docker-for-windows/">Getting Started with Docker for Windows</a></td>
</tr>
<tr>
<td class="tg-031e">More about Docker Toolbox</td>
<td class="tg-031e">[Docker Toolbox Overview](/toolbox/overview.md)</td>
<td class="tg-031e"><a href="/toolbox/overview/">Docker Toolbox Overview</a></td>
</tr>
<tr>
<td class="tg-031e">More about Docker for Linux distributions</td>
<td class="tg-031e">[Install Docker Engine on Linux](/engine/installation/linux/index.md)</td>
<td class="tg-031e"><a href="/engine/installation/linux/">Install Docker Engine on Linux</a></td>
</tr>
<tr>
<td class="tg-031e">More advanced tutorials on running containers, building your own images, networking containers, managing data for containers, and storing images on Docker Hub</td>
<td class="tg-031e"> [Learn by example](/engine/tutorials/index.md)</a></td>
<td class="tg-031e"><a href="/engine/tutorials/">Learn by example</a></td>
</tr>
<tr>
<td class="tg-031e">Information about the Docker product line</td>
@ -46,12 +46,11 @@ Depending on your interest, the Docker documentation contains a wealth of inform
<tr>
<td class="tg-031e">How to set up an automated build on Docker Hub</td>
<td class="tg-031e"><a href="https://docs.docker.com/docker-hub/">Docker Hub documentation</a></td>
<td class="tg-031e"><a href="/docker-hub/">Docker Hub documentation</a></td>
</tr>
<tr>
<td class="tg-031e">How to run a multi-container application with Compose</td>
<td class="tg-031e"> [Docker Compose documentation](/compose/overview.md)
</td>
<td class="tg-031e"><a href="/compose/">Docker Compose documentation</a></td>
</tr>
<tr>
<td class="tg-031e">A tutorial on Docker Swarm, which provides clustering capabilities to scale applications across multiple Docker nodes </td>

View File

@ -5,6 +5,7 @@ redirect_from:
- /linux/step_four/
- /engine/tutorials/dockerimages/
- /userguide/dockerimages/
- /engine/userguide/dockerimages/
description: Getting started with Docker
keywords: beginner, getting started, Docker
title: Build your own image
@ -23,7 +24,8 @@ version that "talks on its own" and requires fewer words to run.
## Step 1: Write a Dockerfile
In this step, you use a text editor to write a short Dockerfile. A Dockerfile
In this step, you use a text editor to write a short
[Dockerfile](/engine/reference/builder.md). A Dockerfile
is a recipe which describes the files, environment, and commands that make up an
image. Your recipe is going to be very short.

View File

@ -25,7 +25,7 @@ title: Install Docker and run hello-world
Docker for Mac is our newest offering for the Mac. It runs as a native Mac application and uses <a href="https://github.com/mist64/xhyve/" target="_blank">xhyve</a> to virtualize the Docker Engine environment and Linux kernel-specific features for the Docker daemon.
<a class="button" href="https://download.docker.com/mac/stable/Docker.dmg">Get Docker for Mac</a>
<a class="button darkblue-btn" href="https://download.docker.com/mac/stable/Docker.dmg">Get Docker for Mac</a>
**Requirements**
@ -47,7 +47,7 @@ See [Docker Toolbox Overview](/toolbox/overview.md) for help on installing Docke
Docker for Windows is our newest offering for PCs. It runs as a native Windows application and uses Hyper-V to virtualize the Docker Engine environment and Linux kernel-specific features for the Docker daemon.
<a class="button" href="https://download.docker.com/win/stable/InstallDocker.msi">Get Docker for Windows</a>
<a class="button darkblue-btn" href="https://download.docker.com/win/stable/InstallDocker.msi">Get Docker for Windows</a>
**Requirements**

View File

@ -7,6 +7,8 @@ redirect_from:
- /linux/step_six/
- /engine/tutorials/dockerrepos/
- /userguide/dockerrepos/
- /engine/userguide/dockerimages/
- /engine/userguide/containers/dockerimages/
title: Tag, push, and pull your image
---

View File

@ -15,7 +15,7 @@ image you'll use in the rest of this getting started.
## Step 1: Locate the whalesay image
1. Open your browser and <a href="https://hub.docker.com/?utm_source=getting_started_guide&utm_medium=embedded_MacOSX&utm_campaign=find_whalesay" target=_blank> browse to the Docker Hub</a>.
1. Open your browser and [browse the Docker Hub](https://hub.docker.com/?utm_source=getting_started_guide&utm_medium=embedded_MacOSX&utm_campaign=find_whalesay).
![Browse Docker Hub](tutimg/browse_and_search.png)

View File

@ -99,9 +99,9 @@ instructions for enabling and configuring AppArmor or SELinux.
### Next steps
- Continue to [Post-installation steps for Linux](linux-postinstall.md)
- Continue to [Post-installation steps for Linux](/engine/installation/linux/linux-postinstall.md)
- Continue with the [User Guide](../../userguide/index.md).
- Continue with the [User Guide](/engine/userguide/index.md).
## Install client binaries on macOS

View File

@ -17,7 +17,7 @@ instructions are available for the following:
* [Fedora](linux/fedora.md)
* [Oracle Linux](linux/oracle.md)
* [Red Hat Enterprise Linux](linux/rhel.md)
* [openSUSE and SUSE Linux Enterprise](linux/SUSE.md)
* [openSUSE and SUSE Linux Enterprise](linux/suse.md)
* [Ubuntu](linux/ubuntulinux.md)
* [Other Linux distributions](linux/other.md)

View File

@ -79,16 +79,16 @@ Docker from the repository.
> which will almost certainly be an unstable one.
```bash
$ sudo yum-config-manager --set-enabled docker-testing
$ sudo yum-config-manager --enable docker-testing
```
You can disable the `testing` repository by running the `yum-config-manager`
command with the `--set-disabled` flag. To re-enable it, use the
`--set-enabled` flag. The following command disables the `testing`
command with the `--disable` flag. To re-enable it, use the
`--enable` flag. The following command disables the `testing`
repository.
```bash
$ sudo yum-config-manager --set-disabled docker-testing
$ sudo yum-config-manager --disable docker-testing
```
#### Install Docker

View File

@ -25,11 +25,12 @@ makes the ownership of the Unix socket read/writable by the `docker` group.
> **Warning**: The `docker` group grants privileges equivalent to the `root`
> user. For details on how this impacts security in your system, see
> [*Docker Daemon Attack Surface*](../../security/security.md#docker-daemon-attack-surface).
> [*Docker Daemon Attack Surface*](/engine/security/security.md#docker-daemon-attack-surface).
To create the `docker` group and add your user:
1. Create the `docker` group.
```bash
$ sudo groupadd docker
```
@ -72,7 +73,7 @@ $ sudo systemctl disable docker
If you need to add an HTTP Proxy, set a different directory or partition for the
Docker runtime files, or make other customizations, see
[customize your systemd Docker daemon options](../../admin/systemd.md).
[customize your systemd Docker daemon options](/engine/admin/systemd.md).
### `upstart`
@ -92,9 +93,9 @@ $ sudo chkconfig docker on
## Use a different storage engine
For information about the different storage engines, see
[Storage drivers](../userguide/storagedriver/index.md). The default storage
engine and the list of supported storage engines depend on your host's
Linux distribution and available kernel drivers.
[Storage drivers](/engine/userguide/storagedriver/imagesandcontainers.md).
The default storage engine and the list of supported storage engines depend on
your host's Linux distribution and available kernel drivers.
## Troubleshooting
@ -111,7 +112,6 @@ Cannot connect to the Docker daemon. Is 'docker daemon' running on this host?
To see which host your client is configured to connect to, check the value of
the `DOCKER_HOST` variable in your environment.
```bash
$ env | grep DOCKER_HOST
```
@ -121,7 +121,6 @@ Docker daemon running on that host. If it is unset, the Docker client is set to
connect to the Docker daemon running on the local host. If it is set in error,
use the following command to unset it:
```bash
$ unset DOCKER_HOST
```
@ -214,6 +213,7 @@ at `/etc/docker/daemon.json`.
2. Add a `dns` key with one or more IP addresses as values. If the file has
existing contents, you only need to add or edit the `dns` line.
```json
{
"dns": ["8.8.8.8", "8.8.4.4"]
@ -291,7 +291,7 @@ To disable `dnsmasq` on RHEL, CentOS, or Fedora:
```
2. Configure the DNS servers manually using the
[Red Hat documentation](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html){ :target="_blank" class="_"}.
[Red Hat documentation](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s1-networkscripts-interfaces.html){: target="_blank" class="_"}.
### Allow access to the remote API through a firewall
@ -314,7 +314,7 @@ hosts, to prevent remote privilege-escalation attacks.
To configure UFW and allow incoming connections on the Docker port:
1. Verify that UFW is enabled.
1. Verify that UFW is enabled.
```bash
$ sudo ufw status
@ -323,7 +323,7 @@ To configure UFW and allow incoming connections on the Docker port:
If `ufw` is not enabled, the remaining steps will not be helpful.
2. Edit the UFW configuration file, which is usually `/etc/default/ufw` or
`/etc/sysconfig/ufw`. Set the `DEFAULT_FORWARD_POLICY` policy to `ACCEPT`.
`/etc/sysconfig/ufw`. Set the `DEFAULT_FORWARD_POLICY` policy to `ACCEPT`.
```none
DEFAULT_FORWARD_POLICY="ACCEPT"
@ -341,6 +341,7 @@ To configure UFW and allow incoming connections on the Docker port:
```
4. Reload UFW.
```bash
$ sudo ufw reload
```
@ -377,8 +378,8 @@ memory and a 10% overall performance degradation, even if Docker is not running.
$ sudo update-grub
```
If your GRUB configuration file has incorrect syntax, an error will occur.
In this case, steps 3 and 4.
If your GRUB configuration file has incorrect syntax, an error will occur.
In this case, steps 3 and 4.
6. Reboot your system. Memory and swap accounting are enabled and the warning
does not occur.
@ -402,4 +403,4 @@ use the `btrfs` storage engine on Oracle Linux 7.
## Next steps
- Continue with the [User Guide](../../userguide/index.md).
- Continue with the [User Guide](/engine/userguide/index.md).

View File

@ -0,0 +1,13 @@
---
datafolder: engine-cli
datafile: docker_checkpoint
title: docker checkpoint
---
<!--
Sorry, but the contents of this page are automatically generated from
Docker's source code. If you want to suggest a change to the text that appears
here, you'll need to find the string by searching this repo:
https://www.github.com/docker/docker
-->
{% include cli.md %}

View File

@ -142,7 +142,7 @@ Registry credentials are managed by **docker-login(1)**.
Docker uses the `https://` protocol to communicate with a registry, unless the
registry is allowed to be accessed over an insecure connection. Refer to the
[insecure registries](https://docs.docker.com/engine/reference/commandline/daemon/#insecure-registries)
[insecure registries](/engine/reference/commandline/dockerd.md#insecure-registries)
section in the online documentation for more information.

View File

@ -24,13 +24,13 @@ This article covers the following swarm administration tasks:
* [Recovering from disaster](#recover-from-disaster)
* [Forcing the swarm to rebalance](#forcing-the-swarm-to-rebalance)
Refer to [How nodes work](how-swarm-mode-works/nodes.md)
Refer to [How nodes work](/engine/swarm/how-swarm-mode-works/nodes.md)
for a brief overview of Docker Swarm mode and the difference between manager and
worker nodes.
## Operating manager nodes in a swarm
Swarm manager nodes use the [Raft Consensus Algorithm](raft.md) to manage the
Swarm manager nodes use the [Raft Consensus Algorithm](/engine/swarm/raft.md) to manage the
swarm state. You only need to understand some general concepts of Raft in
order to manage a swarm.
@ -67,7 +67,7 @@ troubleshooting steps if you do lose the quorum of managers.
When initiating a swarm, you have to specify the `--advertise-addr` flag to
advertise your address to other manager nodes in the swarm. For more
information, see [Run Docker Engine in swarm mode](swarm-mode.md#configure-the-advertise-address). Because manager nodes are
information, see [Run Docker Engine in swarm mode](/engine/swarm/swarm-mode.md#configure-the-advertise-address). Because manager nodes are
meant to be a stable component of the infrastructure, you should use a *fixed
IP address* for the advertise address to prevent the swarm from becoming
unstable on machine reboot.
@ -112,7 +112,7 @@ swarm will become unavailable until you reboot the node or restart with
`--force-new-cluster`.
You manage swarm membership with the `docker swarm` and `docker node`
subsystems. Refer to [Add nodes to a swarm](join-nodes.md) for more information
subsystems. Refer to [Add nodes to a swarm](/engine/swarm/join-nodes.md) for more information
on how to add worker nodes and promote a worker node to be a manager.
## Distribute manager nodes
@ -170,7 +170,8 @@ directory of one of the manager nodes to restore to a new swarm.
## Monitor swarm health
You can monitor the health of manager nodes by querying the docker `nodes` API
in JSON format through the `/nodes` HTTP endpoint. Refer to the [nodes API documentation](../reference/api/docker_remote_api_v1.24.md#36-nodes)
in JSON format through the `/nodes` HTTP endpoint. Refer to the
[nodes API documentation](/engine/reference/api/docker_remote_api_v1.24.md#36-nodes)
for more information.
From the command line, run `docker node inspect <id-node>` to query the nodes.
@ -229,7 +230,7 @@ To cleanly re-join a manager node to a cluster:
3. Re-join the node to the swarm with a fresh state using `docker swarm join`.
For more information on joining a manager node to a swarm, refer to
[Join nodes to a swarm](join-nodes.md).
[Join nodes to a swarm](/engine/swarm/join-nodes.md).
## Force remove a node
@ -315,7 +316,7 @@ In Docker 1.13 and higher, you can use the `--force` or `-f` flag with the
`docker service update` command to force the service to redistribute its tasks
across the available worker nodes. This will cause the service tasks to restart.
Client applications may be disrupted. If you have configured it, your service
will use a [rolling update](swarm-tutorial.md#rolling-update).
will use a [rolling update](/engine/swarm/swarm-tutorial.md#rolling-update).
If you use an earlier version and you want to achieve an even balance of load
across workers and don't mind disrupting running tasks, you can force your swarm
@ -331,5 +332,5 @@ down to the original scale. You can use `docker service ps` to assess the curren
balance of your service across nodes.
See also
[`docker service scale`](../reference/commandline/service_scale.md) and
[`docker service ps`](../reference/commandline/service_ps.md).
[`docker service scale`](/engine/reference/commandline/service_scale.md) and
[`docker service ps`](/engine/reference/commandline/service_ps.md).

View File

@ -14,9 +14,11 @@ Engine 1.12 or later in swarm mode.
There are two types of nodes: [**managers**](#manager-nodes) and
[**workers**](#worker-nodes).
![Swarm mode cluster](../images/swarm-diagram.png)
![Swarm mode cluster](/engine/swarm/images/swarm-diagram.png)
If you haven't already, read through the [swarm mode overview](../index.md) and [key concepts](../key-concepts.md).
If you haven't already, read through the
[swarm mode overview](/engine/swarm/index.md) and
[key concepts](/engine/swarm/key-concepts.md).
## Manager nodes
@ -24,7 +26,7 @@ Manager nodes handle cluster management tasks:
* maintaining cluster state
* scheduling services
* serving swarm mode [HTTP API endpoints](../../reference/api/index.md)
* serving swarm mode [HTTP API endpoints](/engine/api/index.md)
Using a [Raft](https://raft.github.io/raft.pdf) implementation, the managers
maintain a consistent internal state of the entire swarm and all the services
@ -64,17 +66,17 @@ gracefully stops tasks on nodes in `Drain` mode and schedules the tasks on an
`Active` node. The scheduler does not assign new tasks to nodes with `Drain`
availability.
Refer to the [`docker node update`](../../reference/commandline/node_update.md)
Refer to the [`docker node update`](/engine/reference/commandline/node_update.md)
command line reference to see how to change node availability.
## Changing roles
You can promote a worker node to be a manager by running `docker node promote`.
For example, you may want to promote a worker node when you
take a manager node offline for maintenance. See [node promote](../../reference/commandline/node_promote.md).
take a manager node offline for maintenance. See [node promote](/engine/reference/commandline/node_promote.md).
You can also demote a manager node to a worker node. See
[node demote](../../reference/commandline/node_demote.md).
[node demote](/engine/reference/commandline/node_demote.md).
## Learn More

View File

@ -222,5 +222,5 @@ node-2
## Learn More
* [Swarm administration guide](admin_guide.md)
* [Docker Engine command line reference](../reference/commandline/index.md)
* [Docker Engine command line reference](/engine/reference/commandline/docker.md)
* [Swarm mode tutorial](swarm-tutorial/index.md)

View File

@ -40,7 +40,8 @@ $ docker network create \
By default nodes in the swarm encrypt traffic between themselves and other
nodes. The optional `--opt encrypted` flag enables an additional layer of
encryption in the overlay driver for vxlan traffic between containers on
different nodes. For more information, refer to [Docker swarm mode overlay network security model](../userguide/networking/overlay-security-model.md).
different nodes. For more information, refer to
[Docker swarm mode overlay network security model](/engine/userguide/networking/overlay-security-model.md).
The `--subnet` flag specifies the subnet for use with the overlay network. When
you don't specify a subnet, the swarm manager automatically chooses a subnet and
@ -296,5 +297,5 @@ is not the right tool to confirm VIP connectivity.
* [Deploy services to a swarm](services.md)
* [Swarm administration guide](admin_guide.md)
* [Docker Engine command line reference](../reference/commandline/index.md)
* [Docker Engine command line reference](/engine/reference/commandline/docker.md)
* [Swarm mode tutorial](swarm-tutorial/index.md)

View File

@ -159,11 +159,12 @@ updated. This feature is particularly important if you do use often-changing tag
such as `latest`, because it ensures that all service tasks use the same version
of the image.
> **Note**: If [content trust](security/trust/content_trust.md) is enabled, the
> client actually resolves the image's tag to a digest before contacting the
> swarm manager, in order to verify that the image is signed. Thus, if you use
> content trust, the swarm manager receives the request pre-resolved. In this
> case, if the client cannot resolve the image to a digest, the request fails.
> **Note**: If [content trust](/engine/security/trust/content_trust.md) is
> enabled, the client actually resolves the image's tag to a digest before
> contacting the swarm manager, in order to verify that the image is signed.
> Thus, if you use content trust, the swarm manager receives the request
> pre-resolved. In this case, if the client cannot resolve the image to a
> digest, the request fails.
{: id="image_resolution_with_trust" }
If the manager is not able to resolve the tag to a digest, each worker
@ -288,7 +289,7 @@ $ docker service create \
Service constraints let you set criteria for a node to meet before the scheduler
deploys a service to the node. You can apply constraints to the
service based upon node attributes and metadata or engine metadata. For more
information on constraints, refer to the `docker service create` [CLI reference](../reference/commandline/service_create.md).
information on constraints, refer to the `docker service create` [CLI reference](/engine/reference/commandline/service_create.md).
### Reserving memory or number of CPUs for a service
@ -594,5 +595,5 @@ paths from the host is unnecessary. The main risks include the following:<br />
## Learn More
* [Swarm administration guide](admin_guide.md)
* [Docker Engine command line reference](../reference/commandline/index.md)
* [Docker Engine command line reference](/engine/reference/commandline/docker.md)
* [Swarm mode tutorial](swarm-tutorial/index.md)

View File

@ -16,8 +16,9 @@ To run through this tutorial, you will need:
1. A Docker Engine of version 1.13.0 or later, running in [swarm
mode](/engine/swarm/swarm-mode.md). If you're not familiar with swarm mode,
you might want to read [Swarm mode key concepts ](key-concepts.md) and
[How services work](how-swarm-mode- works/services.md).
you might want to read
[Swarm mode key concepts ](/engine/swarm/how-swarm-mode-works/key-concepts.md)
and [How services work](/engine/swarm/how-swarm-mode-works/services.md).
> **Note:** If you're trying things out on a local development environment,
> you can put your engine into swarm mode with `docker swarm init`.
@ -64,10 +65,10 @@ a throwaway registry, which you can discard afterward.
## Create the example application
The app used in this guide is based on the hit counter app in the [Get started
with Docker Compose](/compose/gettingstarted.md) guide. It consists of a Python
app which maintains a counter in a Redis instance and increments the counter
whenever you visit it.
The app used in this guide is based on the hit counter app in the
[Get started with Docker Compose](/compose/gettingstarted.md) guide. It consists
of a Python app which maintains a counter in a Redis instance and increments the
counter whenever you visit it.
1. Create a directory for the project:
@ -113,7 +114,7 @@ whenever you visit it.
5. Create a file called `docker-compose.yml` and paste this in:
```yaml
```none
version: '3'
services:
@ -142,7 +143,7 @@ whenever you visit it.
Compose doesn't take advantage of swarm mode, and deploys everything to a
single node. You can safely ignore this.
```bash
```none
$ docker-compose up -d
WARNING: The Docker Engine you're using is running in swarm mode.

View File

@ -7,11 +7,12 @@ title: Add nodes to the swarm
Once you've [created a swarm](create-swarm.md) with a manager node, you're ready
to add worker nodes.
1. Open a terminal and ssh into the machine where you want to run a worker node.
This tutorial uses the name `worker1`.
1. Open a terminal and ssh into the machine where you want to run a worker node.
This tutorial uses the name `worker1`.
2. Run the command produced by the `docker swarm init` output from the
[Create a swarm](create-swarm.md) tutorial step to create a worker node joined to the existing swarm:
2. Run the command produced by the `docker swarm init` output from the
[Create a swarm](create-swarm.md) tutorial step to create a worker node
joined to the existing swarm:
```bash
$ docker swarm join \
@ -34,12 +35,12 @@ This tutorial uses the name `worker1`.
192.168.99.100:2377
```
3. Open a terminal and ssh into the machine where you want to run a second
worker node. This tutorial uses the name `worker2`.
3. Open a terminal and ssh into the machine where you want to run a second
worker node. This tutorial uses the name `worker2`.
4. Run the command produced by the `docker swarm init` output from the
[Create a swarm](create-swarm.md) tutorial step to create a second worker node
joined to the existing swarm:
4. Run the command produced by the `docker swarm init` output from the
[Create a swarm](create-swarm.md) tutorial step to create a second worker
node joined to the existing swarm:
```bash
$ docker swarm join \
@ -49,8 +50,8 @@ joined to the existing swarm:
This node joined a swarm as a worker.
```
5. Open a terminal and ssh into the machine where the manager node runs and run
the `docker node ls` command to see the worker nodes:
5. Open a terminal and ssh into the machine where the manager node runs and
run the `docker node ls` command to see the worker nodes:
```bash
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS

View File

@ -7,22 +7,23 @@ title: Delete the service running on the swarm
The remaining steps in the tutorial don't use the `helloworld` service, so now
you can delete the service from the swarm.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
2. Run `docker service rm helloworld` to remove the `helloworld` service.
2. Run `docker service rm helloworld` to remove the `helloworld` service.
```
```bash
$ docker service rm helloworld
helloworld
```
3. Run `docker service inspect <SERVICE-ID>` to verify that the swarm manager
removed the service. The CLI returns a message that the service is not found:
3. Run `docker service inspect <SERVICE-ID>` to verify that the swarm manager
removed the service. The CLI returns a message that the service is not
found:
```
```bash
$ docker service inspect helloworld
[]
Error: no such service: helloworld

View File

@ -8,8 +8,8 @@ After you [create a swarm](create-swarm.md), you can deploy a service to the
swarm. For this tutorial, you also [added worker nodes](add-nodes.md), but that
is not a requirement to deploy a service.
1. Open a terminal and ssh into the machine where you run your manager node. For
example, the tutorial uses a machine named `manager1`.
1. Open a terminal and ssh into the machine where you run your manager node.
For example, the tutorial uses a machine named `manager1`.
2. Run the following command:
@ -25,9 +25,9 @@ example, the tutorial uses a machine named `manager1`.
* The arguments `alpine ping docker.com` define the service as an Alpine
Linux container that executes the command `ping docker.com`.
3. Run `docker service ls` to see the list of running services:
3. Run `docker service ls` to see the list of running services:
```
```bash
$ docker service ls
ID NAME SCALE IMAGE COMMAND

View File

@ -13,11 +13,11 @@ availability. `DRAIN` availability prevents a node from receiving new tasks
from the swarm manager. It also means the manager stops tasks running on the
node and launches replica tasks on a node with `ACTIVE` availability.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
2. Verify that all your nodes are actively available.
2. Verify that all your nodes are actively available.
```bash
$ docker node ls
@ -28,7 +28,7 @@ run your manager node. For example, the tutorial uses a machine named
e216jshn25ckzbvmwlnh5jr3g * manager1 Ready Active Leader
```
3. If you aren't still running the `redis` service from the [rolling
3. If you aren't still running the `redis` service from the [rolling
update](rolling-update.md) tutorial, start it now:
```bash
@ -37,7 +37,7 @@ update](rolling-update.md) tutorial, start it now:
c5uo6kdmzpon37mgj9mwglcfw
```
4. Run `docker service ps redis` to see how the swarm manager assigned the
4. Run `docker service ps redis` to see how the swarm manager assigned the
tasks to different nodes:
```bash
@ -52,7 +52,7 @@ tasks to different nodes:
In this case the swarm manager distributed one task to each node. You may
see the tasks distributed differently among the nodes in your environment.
5. Run `docker node update --availability drain <NODE-ID>` to drain a node that
5. Run `docker node update --availability drain <NODE-ID>` to drain a node that
had a task assigned to it:
```bash
@ -61,7 +61,7 @@ had a task assigned to it:
worker1
```
6. Inspect the node to check its availability:
6. Inspect the node to check its availability:
```bash
$ docker node inspect --pretty worker1
@ -76,7 +76,7 @@ had a task assigned to it:
The drained node shows `Drain` for `AVAILABILITY`.
7. Run `docker service ps redis` to see how the swarm manager updated the
7. Run `docker service ps redis` to see how the swarm manager updated the
task assignments for the `redis` service:
```bash
@ -93,7 +93,7 @@ task assignments for the `redis` service:
with `Drain` availability and creating a new task on a node with `Active`
availability.
8. Run `docker node update --availability active <NODE-ID>` to return the
8. Run `docker node update --availability active <NODE-ID>` to return the
drained node to an active state:
```bash
@ -102,22 +102,22 @@ drained node to an active state:
worker1
```
9. Inspect the node to see the updated state:
9. Inspect the node to see the updated state:
```bash
$ docker node inspect --pretty worker1
```bash
$ docker node inspect --pretty worker1
ID: 38ciaotwjuritcdtn9npbnkuz
Hostname: worker1
Status:
State: Ready
Availability: Active
...snip...
```
ID: 38ciaotwjuritcdtn9npbnkuz
Hostname: worker1
Status:
State: Ready
Availability: Active
...snip...
```
When you set the node back to `Active` availability, it can receive new tasks:
When you set the node back to `Active` availability, it can receive new tasks:
* during a service update to scale up
* during a rolling update
* when you set another node to `Drain` availability
* when a task fails on another active node
* during a service update to scale up
* during a rolling update
* when you set another node to `Drain` availability
* when a task fails on another active node

View File

@ -7,16 +7,16 @@ title: Inspect a service on the swarm
When you have [deployed a service](deploy-service.md) to your swarm, you can use
the Docker CLI to see details about the service running in the swarm.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
2. Run `docker service inspect --pretty <SERVICE-ID>` to display the details
about a service in an easily readable format.
2. Run `docker service inspect --pretty <SERVICE-ID>` to display the details
about a service in an easily readable format.
To see the details on the `helloworld` service:
```
```bash
$ docker service inspect --pretty helloworld
ID: 9uk4639qpg7npwf3fn2aasksr
@ -36,7 +36,7 @@ about a service in an easily readable format.
>**Tip**: To return the service details in json format, run the same command
without the `--pretty` flag.
```
```bash
$ docker service inspect helloworld
[
{
@ -85,10 +85,10 @@ about a service in an easily readable format.
]
```
4. Run `docker service ps <SERVICE-ID>` to see which nodes are running the
service:
4. Run `docker service ps <SERVICE-ID>` to see which nodes are running the
service:
```
```bash
$ docker service ps helloworld
NAME IMAGE NODE DESIRED STATE LAST STATE
@ -103,8 +103,8 @@ service:
task so you can see if tasks are running according to the service
definition.
4. Run `docker ps` on the node where the task is running to see details about
the container for the task.
4. Run `docker ps` on the node where the task is running to see details about
the container for the task.
>**Tip**: If `helloworld` is running on a node other than your manager node,
you must ssh to that node.

View File

@ -9,12 +9,12 @@ instances of a service. In this part of the tutorial, you deploy a service based
on the Redis 3.0.6 container image. Then you upgrade the service to use the
Redis 3.0.7 container image using rolling updates.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
2. Deploy Redis 3.0.6 to the swarm and configure the swarm with a 10 second
update delay:
2. Deploy Redis 3.0.6 to the swarm and configure the swarm with a 10 second
update delay:
```bash
$ docker service create \
@ -44,7 +44,7 @@ update delay:
`--update-failure-action` flag for `docker service create` or
`docker service update`.
3. Inspect the `redis` service:
3. Inspect the `redis` service:
```bash
$ docker service inspect --pretty redis
@ -64,7 +64,7 @@ update delay:
Endpoint Mode: vip
```
4. Now you can update the container image for `redis`. The swarm manager
4. Now you can update the container image for `redis`. The swarm manager
applies the update to nodes according to the `UpdateConfig` policy:
```bash
@ -82,7 +82,7 @@ applies the update to nodes according to the `UpdateConfig` policy:
* If, at any time during the update, a task returns `FAILED`, pause the
update.
5. Run `docker service inspect --pretty redis` to see the new image in the
5. Run `docker service inspect --pretty redis` to see the new image in the
desired state:
```bash
@ -127,7 +127,7 @@ desired state:
To avoid repeating certain update failures, you may need to reconfigure the
service by passing flags to `docker service update`.
6. Run `docker service ps <SERVICE-ID>` to watch the rolling update:
6. Run `docker service ps <SERVICE-ID>` to watch the rolling update:
```bash
$ docker service ps redis

View File

@ -8,12 +8,12 @@ Once you have [deployed a service](deploy-service.md) to a swarm, you are ready
to use the Docker CLI to scale the number of service ps in
the swarm.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
1. If you haven't already, open a terminal and ssh into the machine where you
run your manager node. For example, the tutorial uses a machine named
`manager1`.
2. Run the following command to change the desired state of the
service running in the swarm:
2. Run the following command to change the desired state of the
service running in the swarm:
```bash
$ docker service scale <SERVICE-ID>=<NUMBER-OF-TASKS>
@ -27,9 +27,9 @@ service running in the swarm:
helloworld scaled to 5
```
3. Run `docker service ps <SERVICE-ID>` to see the updated task list:
3. Run `docker service ps <SERVICE-ID>` to see the updated task list:
```
```bash
$ docker service ps helloworld
NAME IMAGE NODE DESIRED STATE CURRENT STATE
@ -44,10 +44,10 @@ service running in the swarm:
running instances of Alpine Linux. The tasks are distributed between the
three nodes of the swarm. One is running on `manager1`.
4. Run `docker ps` to see the containers running on the node where you're
connected. The following example shows the tasks running on `manager1`:
4. Run `docker ps` to see the containers running on the node where you're
connected. The following example shows the tasks running on `manager1`:
```
```bash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

View File

@ -1,7 +1,6 @@
---
description: Automatically lock Swarm managers to protect encryption keys
keywords:
- swarm, manager, lock, unlock, autolock, encryption
keywords: swarm, manager, lock, unlock, autolock, encryption
title: Lock your swarm to protect its encryption key
---

View File

@ -8,11 +8,12 @@ redirect_from:
title: Manage data in containers
---
So far you've been introduced to some [basic Docker
concepts](usingdocker.md), seen how to work with [Docker
images](dockerimages.md) as well as learned about [how to network your containers](networkingcontainers.md). In this
section you're going to learn how you can manage data inside and between your
Docker containers.
So far you've been introduced to some
[basic Docker concepts](/engine/getstarted/step_three.md), seen how to work with
[Docker images](/engine/getstarted/step_four.md), and learned about
[how to network your containers](/engine/tutorials/networkingcontainers.md).
In this section you're going to learn how you can manage data inside and between
your Docker containers.
You're going to look at the two primary ways you can manage data with
Docker Engine.
@ -23,7 +24,8 @@ Docker Engine.
## Data volumes
A *data volume* is a specially-designated directory within one or more
containers that bypasses the [*Union File System*](../reference/glossary.md#union-file-system). Data volumes provide several useful features for persistent or shared data:
containers that bypasses the [*Union File System*](/engine/reference/glossary.md#union-file-system).
Data volumes provide several useful features for persistent or shared data:
- Volumes are initialized when a container is created. If the container's
base image contains data at the specified mount point, that existing data is
@ -162,7 +164,7 @@ instruction does not support passing a `host-dir`, because built images
### Mount a shared-storage volume as a data volume
In addition to mounting a host directory in your container, some Docker
[volume plugins](../extend/plugins_volume.md) allow you to
[volume plugins](/engine/extend/plugins_volume.md) allow you to
provision and mount shared storage, such as iSCSI, NFS, or FC.
A benefit of using shared volumes is that they are host-independent. This
@ -204,7 +206,7 @@ $ docker run -d -P \
```
A list of available plugins, including volume plugins, is available
[here](../extend/legacy_plugins.md).
[here](/engine/extend/legacy_plugins.md).
### Volume labels
@ -275,7 +277,7 @@ from the `dbstore` container are visible.
You can use multiple `--volumes-from` parameters to combine data volumes from
several containers. To find detailed information about `--volumes-from` see the
[Mount volumes from container](../reference/commandline/run.md#mount-volumes-from-container-volumes-from)
[Mount volumes from container](/engine/reference/commandline/run.md#mount-volumes-from-container-volumes-from)
in the `run` command reference.
You can also extend the chain by mounting the volume that came from the
@ -366,4 +368,4 @@ combine Docker with the services available on
[Docker Hub](https://hub.docker.com) including Automated Builds and private
repositories.
Go to [Store images in Docker Hub](dockerrepos.md).
Go to [Store images in Docker Hub](/engine/getstarted/step_six.md).

View File

@ -8,9 +8,9 @@ title: Engine tutorials
# Learn by example
* [Hello world in a container](dockerizing.md)
* [Run a simple application](usingdocker.md)
* [Build your own images](dockerimages.md)
* [Network containers](networkingcontainers.md)
* [Manage data in containers](dockervolumes.md)
* [Store images on Docker Hub](dockerrepos.md)
* [Hello world in a container](/engine/getstarted/step_one.md)
* [Run a simple application](/engine/getstarted/step_three.md)
* [Build your own images](/engine/getstarted/step_four.md)
* [Network containers](/engine/tutorials/networkingcontainers.md)
* [Manage data in containers](/engine/tutorials/dockervolumes.md)
* [Store images on Docker Hub](/engine/getstarted/step_six.md)

View File

@ -57,7 +57,7 @@ While `scratch` appears in Docker's repository on the hub, you can't pull it, ru
Assuming you built the "hello" executable example [from the Docker GitHub example C-source code](https://github.com/docker-library/hello-world/blob/master/hello.c), and you compiled it with the `-static` flag, you can then build this Docker image using: `docker build --tag hello .`
NOTE: Because Docker for Mac and Dcoker for Windows use a Linux VM, you must compile this code using a Linux toolchain to end up with a Linux binary. Not to worry, you can quickly pull down a Linux image and a build environment and build within it:
NOTE: Because Docker for Mac and Docker for Windows use a Linux VM, you must compile this code using a Linux toolchain to end up with a Linux binary. Not to worry, you can quickly pull down a Linux image and a build environment and build within it:
$ docker run --rm -it -v $PWD:/build ubuntu:16:04
container# apt-get install build-essential

View File

@ -10,12 +10,12 @@ This guide helps users learn how to use Docker Engine.
## Learn by example
- [Hello world in a container](../tutorials/dockerizing.md)
- [Build your own images](../tutorials/dockerimages.md)
- [Network containers](../tutorials/networkingcontainers.md)
- [Run a simple application](../tutorials/usingdocker.md)
- [Manage data in containers](../tutorials/dockervolumes.md)
- [Store images on Docker Hub](../tutorials/dockerrepos.md)
- [Hello world in a container](/engine/getstarted/step_one.md)
- [Build your own images](/engine/getstarted/step_four.md)
- [Network containers](/engine/tutorials/networkingcontainers.md)
- [Run a simple application](/engine/userguide/step_three.md)
- [Manage data in containers](/engine/tutorials/dockervolumes.md)
- [Store images on Docker Hub](/engine/getstarted/step_six.md)
## Work with images

View File

@ -25,7 +25,7 @@ This guide is broken into major sections that take you through learning the basi
Docker Engine offers a containerization platform to power your applications. To
learn how to Dockerize applications and run them:
Go to [Dockerizing Applications](../tutorials/dockerizing.md).
Go to [Dockerizing Applications](/engine/getstarted/step_one.md).
## Working with containers
@ -35,7 +35,7 @@ Go to [Dockerizing Applications](../tutorials/dockerizing.md).
Once you get a grip on running your applications in Docker containers, you'll learn how to manage those containers. To find out
about how to inspect, monitor and manage containers:
Go to [Working with Containers](../tutorials/usingdocker.md).
Go to [Working with Containers](/engine/getstarted/step_three.md).
## Working with Docker images
@ -44,7 +44,7 @@ Go to [Working with Containers](../tutorials/usingdocker.md).
Once you've learnt how to use Docker it's time to take the next step and
learn how to build your own application images with Docker.
Go to [Working with Docker Images](../tutorials/dockerimages.md).
Go to [Working with Docker Images](/engine/getstarted/step_four.md).
## Networking containers
@ -52,14 +52,14 @@ Until now we've seen how to build individual applications inside Docker
containers. Now learn how to build whole application stacks with Docker
networking.
Go to [Networking Containers](../tutorials/networkingcontainers.md).
Go to [Networking Containers](/engine/tutorials/networkingcontainers.md).
## Managing data in containers
Now we know how to link Docker containers together the next step is
learning how to manage data, volumes and mounts inside our containers.
Go to [Managing Data in Containers](../tutorials/dockervolumes.md).
Go to [Managing Data in Containers](/engine/tutorials/dockervolumes.md).
## Managing metadata (labels) for Docker objects
@ -124,7 +124,7 @@ Go to [Docker Swarm user guide](/swarm/).
* [Docker Hub](https://hub.docker.com)
* [Docker blog](https://blog.docker.com/)
* [Docker documentation](/)
* [Docker Getting Started Guide](../getstarted/index.md)
* [Docker Getting Started Guide](/engine/getstarted/index.md)
* [Docker code on GitHub](https://github.com/docker/docker)
* [Docker mailing
list](https://groups.google.com/forum/#!forum/docker-user)

View File

@ -8,12 +8,12 @@ title: Legacy container links
The information in this section explains legacy container links within the Docker default `bridge` network which is created automatically when you install Docker.
Before the [Docker networks feature](../index.md), you could use the
Before the [Docker networks feature](/engine/userguide/networking/index.md), you could use the
Docker link feature to allow containers to discover each other and securely
transfer information about one container to another container. With the
introduction of the Docker networks feature, you can still create links but they
behave differently between default `bridge` network and
[user defined networks](../work-with-networks.md#linking-containers-in-user-defined-networks)
[user defined networks](/engine/userguide/networking/work-with-networks.md#linking-containers-in-user-defined-networks)
This section briefly discusses connecting via a network port and then goes into
detail on container linking in default `bridge` network.
@ -28,7 +28,7 @@ between containers in a more controlled way.
## Connect using network port mapping
In [Run a simple application](../../../tutorials/usingdocker.md), you created a
In [Run a simple application](/engine/getstarted/step_three.md), you created a
container that ran a Python Flask application:
$ docker run -d -P training/webapp python app.py
@ -36,9 +36,9 @@ container that ran a Python Flask application:
> **Note:**
> Containers have an internal network and an IP address
> (as we saw when we used the `docker inspect` command to show the container's
> IP address in [Run a simple application](../../../tutorials/usingdocker.md) section).
> IP address in [Run a simple application](/engine/getstarted/step_three.md) section).
> Docker can have a variety of network configurations. You can see more
> information on Docker networking [here](../index.md).
> information on Docker networking [here](/engine/userguide/networking/index.md).
When that container was created, the `-P` flag was used to automatically map
any network port inside it to a random high port within an *ephemeral port
@ -102,7 +102,7 @@ configurations. For example, if you've bound the container port to the
> **Note**:
> This section covers the legacy link feature in the default `bridge` network.
> Please refer to [linking containers in user-defined networks](../work-with-networks.md#linking-containers-in-user-defined-networks)
> Please refer to [linking containers in user-defined networks](/engine/userguide/networking/work-with-networks.md#linking-containers-in-user-defined-networks)
> for more information on links in user-defined networks.
Network port mappings are not the only way Docker containers can connect to one

View File

@ -4,7 +4,7 @@ keywords: Examples, Usage, network, docker, documentation, user guide, macvlan,
title: Get started with Macvlan network driver
---
The Macvlan driver is in order to make Docker users use cases and vet the implementation to ensure a hardened, production ready driver. Libnetwork now gives users total control over both IPv4 and IPv6 addressing. The VLAN drivers build on top of that in giving operators complete control of layer 2 VLAN tagging for users interested in underlay network integration. For overlay deployments that abstract away physical constraints see the [multi-host overlay ](/engine/userguide/networking/get-started-overlay/) driver.
Libnetwork gives users total control over both IPv4 and IPv6 addressing. The VLAN drivers build on top of that in giving operators complete control of layer 2 VLAN tagging for users interested in underlay network integration. For overlay deployments that abstract away physical constraints see the [multi-host overlay ](/engine/userguide/networking/get-started-overlay/) driver.
Macvlan is a new twist on the tried and true network virtualization technique. The Linux implementations are extremely lightweight because rather than using the traditional Linux bridge for isolation, they are simply associated to a Linux Ethernet interface or sub-interface to enforce separation between networks and connectivity to the physical network.

View File

@ -99,57 +99,57 @@ block (`0x44f`) in an example container.
![](images/dm_container.jpg)
1. An application makes a read request for block `0x44f` in the container.
1. An application makes a read request for block `0x44f` in the container.
Because the container is a thin snapshot of an image it does not have the
data. Instead, it has a pointer (PTR) to where the data is stored in the image
snapshot lower down in the image stack.
Because the container is a thin snapshot of an image it does not have the
data. Instead, it has a pointer (PTR) to where the data is stored in the image
snapshot lower down in the image stack.
2. The storage driver follows the pointer to block `0xf33` in the snapshot
relating to image layer `a005...`.
2. The storage driver follows the pointer to block `0xf33` in the snapshot
relating to image layer `a005...`.
3. The `devicemapper` copies the contents of block `0xf33` from the image
snapshot to memory in the container.
3. The `devicemapper` copies the contents of block `0xf33` from the image
snapshot to memory in the container.
4. The storage driver returns the data to the requesting application.
4. The storage driver returns the data to the requesting application.
## Write examples
With the `devicemapper` driver, writing new data to a container is accomplished
by an *allocate-on-demand* operation. Updating existing data uses a
by an *allocate-on-demand* operation. Updating existing data uses a
copy-on-write operation. Because Device Mapper is a block-based technology
these operations occur at the block level.
For example, when making a small change to a large file in a container, the
`devicemapper` storage driver does not copy the entire file. It only copies the
blocks to be modified. Each block is 64KB.
blocks to be modified. Each block is 64KB.
### Writing new data
To write 56KB of new data to a container:
1. An application makes a request to write 56KB of new data to the container.
1. An application makes a request to write 56KB of new data to the container.
2. The allocate-on-demand operation allocates a single new 64KB block to the
container's snapshot.
2. The allocate-on-demand operation allocates a single new 64KB block to the
container's snapshot.
If the write operation is larger than 64KB, multiple new blocks are
allocated to the container's snapshot.
If the write operation is larger than 64KB, multiple new blocks are
allocated to the container's snapshot.
3. The data is written to the newly allocated block.
3. The data is written to the newly allocated block.
### Overwriting existing data
To modify existing data for the first time:
1. An application makes a request to modify some data in the container.
1. An application makes a request to modify some data in the container.
2. A copy-on-write operation locates the blocks that need updating.
2. A copy-on-write operation locates the blocks that need updating.
3. The operation allocates new empty blocks to the container snapshot and
copies the data into those blocks.
3. The operation allocates new empty blocks to the container snapshot and
copies the data into those blocks.
4. The modified data is written into the newly allocated blocks.
4. The modified data is written into the newly allocated blocks.
The application in the container is unaware of any of these
allocate-on-demand and copy-on-write operations. However, they may add latency
@ -189,7 +189,7 @@ Storage Driver: devicemapper
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.93-RHEL7 (2015-01-28)
[...]
```
```
The output above shows a Docker host running with the `devicemapper` storage
driver operating in `loop-lvm` mode. This is indicated by the fact that the
@ -215,91 +215,91 @@ identifier and volume sizes may be different in your environment and you
should substitute your own values throughout the procedure. The procedure also
assumes that the Docker daemon is in the `stopped` state.
1. Log in to the Docker host you want to configure and stop the Docker daemon.
1. Log in to the Docker host you want to configure and stop the Docker daemon.
2. Install the LVM2 and `thin-provisioning-tools` packages.
2. Install the LVM2 and `thin-provisioning-tools` packages.
The LVM2 package includes the userspace toolset that provides logical volume
management facilities on linux.
The LVM2 package includes the userspace toolset that provides logical volume
management facilities on linux.
The `thin-provisioning-tools` package allows you to activate and manage your
pool.
The `thin-provisioning-tools` package allows you to activate and manage your
pool.
3. Create a physical volume replacing `/dev/xvdf` with your block device.
3. Create a physical volume replacing `/dev/xvdf` with your block device.
```bash
$ pvcreate /dev/xvdf
```
```bash
$ pvcreate /dev/xvdf
```
4. Create a 'docker' volume group.
4. Create a 'docker' volume group.
```bash
$ vgcreate docker /dev/xvdf
```
```bash
$ vgcreate docker /dev/xvdf
```
5. Create a thin pool named `thinpool`.
5. Create a logical volume named `thinpool` and `thinpoolmeta`.
In this example, the data logical is 95% of the 'docker' volume group size.
Leaving this free space allows for auto expanding of either the data or
metadata if space runs low as a temporary stopgap.
In this example, the data logical is 95% of the 'docker' volume group size.
Leaving this free space allows for auto expanding of either the data or
metadata if space runs low as a temporary stopgap.
```bash
$ lvcreate --wipesignatures y -n thinpool docker -l 95%VG
$ lvcreate --wipesignatures y -n thinpoolmeta docker -l 1%VG
```
```bash
$ lvcreate --wipesignatures y -n thinpool docker -l 95%VG
$ lvcreate --wipesignatures y -n thinpoolmeta docker -l 1%VG
```
6. Convert the pool to a thin pool.
6. Convert the pool to a thin pool.
```bash
$ lvconvert -y --zero n -c 512K --thinpool docker/thinpool --poolmetadata docker/thinpoolmeta
```
```bash
$ lvconvert -y --zero n -c 512K --thinpool docker/thinpool --poolmetadata docker/thinpoolmeta
```
7. Configure autoextension of thin pools via an `lvm` profile.
7. Configure autoextension of thin pools via an `lvm` profile.
```bash
$ vi /etc/lvm/profile/docker-thinpool.profile
```
```bash
$ vi /etc/lvm/profile/docker-thinpool.profile
```
8. Specify 'thin_pool_autoextend_threshold' value.
8. Specify 'thin_pool_autoextend_threshold' value.
The value should be the percentage of space used before `lvm` attempts
to autoextend the available space (100 = disabled).
The value should be the percentage of space used before `lvm` attempts
to autoextend the available space (100 = disabled).
```
thin_pool_autoextend_threshold = 80
```
```none
thin_pool_autoextend_threshold = 80
```
9. Modify the `thin_pool_autoextend_percent` for when thin pool autoextension occurs.
9. Modify the `thin_pool_autoextend_percent` for when thin pool autoextension occurs.
The value's setting is the perentage of space to increase the thin pool (100 =
disabled)
The value's setting is the perentage of space to increase the thin pool (100 =
disabled)
```
thin_pool_autoextend_percent = 20
```
```none
thin_pool_autoextend_percent = 20
```
10. Check your work, your `docker-thinpool.profile` file should appear similar to the following:
An example `/etc/lvm/profile/docker-thinpool.profile` file:
An example `/etc/lvm/profile/docker-thinpool.profile` file:
```
activation {
thin_pool_autoextend_threshold=80
thin_pool_autoextend_percent=20
}
```
```none
activation {
thin_pool_autoextend_threshold=80
thin_pool_autoextend_percent=20
}
```
11. Apply your new lvm profile
```bash
$ lvchange --metadataprofile docker-thinpool docker/thinpool
```
```bash
$ lvchange --metadataprofile docker-thinpool docker/thinpool
```
12. Verify the `lv` is monitored.
```bash
$ lvs -o+seg_monitor
```
```bash
$ lvs -o+seg_monitor
```
13. If the Docker daemon was previously started, move your existing graph driver
directory out of the way.
@ -317,15 +317,20 @@ assumes that the Docker daemon is in the `stopped` state.
14. Configure the Docker daemon with specific devicemapper options.
Now that your storage is configured, configure the Docker daemon to use it. There are two ways to do this. You can set options on the command line if you start the daemon there:
Now that your storage is configured, configure the Docker daemon to use it.
There are two ways to do this. You can set options on the command line if
you start the daemon there:
```bash
--storage-driver=devicemapper --storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool --storage-opt=dm.use_deferred_removal=true --storage-opt=dm.use_deferred_deletion=true
```none
--storage-driver=devicemapper \
--storage-opt=dm.thinpooldev=/dev/mapper/docker-thinpool \
--storage-opt=dm.use_deferred_removal=true \
--storage-opt=dm.use_deferred_deletion=true
```
You can also set them for startup in the `daemon.json` configuration, for example:
You can also set them for startup in the `daemon.json` configuration, for example:
```json
```none
{
"storage-driver": "devicemapper",
"storage-opts": [
@ -336,19 +341,20 @@ assumes that the Docker daemon is in the `stopped` state.
}
```
>**Note**: Always set both `dm.use_deferred_removal=true` and `dm.use_deferred_deletion=true` to prevent unintentionally leaking mount points.
> **Note**: Always set both `dm.use_deferred_removal=true` and `dm.use_deferred_deletion=true`
> to prevent unintentionally leaking mount points.
15. If using systemd and modifying the daemon configuration via unit or drop-in file, reload systemd to scan for changes.
```bash
$ systemctl daemon-reload
```
```bash
$ systemctl daemon-reload
```
16. Start the Docker daemon.
```bash
$ systemctl start docker
```
```bash
$ systemctl start docker
```
After you start the Docker daemon, ensure you monitor your thin pool and volume
group free space. While the volume group will auto-extend, it can still fill
@ -403,7 +409,7 @@ In the diagram, the pool is named `Docker-202:1-1032-pool` and spans the `data`
and `metadata` devices created earlier. The `devicemapper` constructs the pool
name as follows:
```
```none
Docker-MAJ:MIN-INO-pool
```
@ -465,81 +471,81 @@ Logging Driver: json-file
The `Data Space` values show that the pool is 100GB total. This example extends the pool to 200GB.
1. List the sizes of the devices.
1. List the sizes of the devices.
```bash
$ sudo ls -lh /var/lib/docker/devicemapper/devicemapper/
```bash
$ sudo ls -lh /var/lib/docker/devicemapper/devicemapper/
total 1175492
-rw------- 1 root root 100G Mar 30 05:22 data
-rw------- 1 root root 2.0G Mar 31 11:17 metadata
```
total 1175492
-rw------- 1 root root 100G Mar 30 05:22 data
-rw------- 1 root root 2.0G Mar 31 11:17 metadata
```
2. Truncate `data` file to the size of the `metadata` file (approximately 200GB).
2. Truncate `data` file to the size of the `metadata` file (approximately 200GB).
```bash
$ sudo truncate -s 214748364800 /var/lib/docker/devicemapper/devicemapper/data
```
```bash
$ sudo truncate -s 214748364800 /var/lib/docker/devicemapper/devicemapper/data
```
3. Verify the file size changed.
3. Verify the file size changed.
```bash
$ sudo ls -lh /var/lib/docker/devicemapper/devicemapper/
```bash
$ sudo ls -lh /var/lib/docker/devicemapper/devicemapper/
total 1.2G
-rw------- 1 root root 200G Apr 14 08:47 data
-rw------- 1 root root 2.0G Apr 19 13:27 metadata
```
total 1.2G
-rw------- 1 root root 200G Apr 14 08:47 data
-rw------- 1 root root 2.0G Apr 19 13:27 metadata
```
4. Reload data loop device
4. Reload data loop device
```bash
$ sudo blockdev --getsize64 /dev/loop0
```bash
$ sudo blockdev --getsize64 /dev/loop0
107374182400
107374182400
$ sudo losetup -c /dev/loop0
$ sudo losetup -c /dev/loop0
$ sudo blockdev --getsize64 /dev/loop0
$ sudo blockdev --getsize64 /dev/loop0
214748364800
```
214748364800
```
5. Reload devicemapper thin pool.
5. Reload devicemapper thin pool.
a. Get the pool name first.
a. Get the pool name first.
```bash
$ sudo dmsetup status | grep pool
```bash
$ sudo dmsetup status | grep pool
docker-8:1-123141-pool: 0 209715200 thin-pool 91
422/524288 18338/1638400 - rw discard_passdown queue_if_no_space -
```
docker-8:1-123141-pool: 0 209715200 thin-pool 91
422/524288 18338/1638400 - rw discard_passdown queue_if_no_space -
```
The name is the string before the colon.
The name is the string before the colon.
b. Dump the device mapper table first.
b. Dump the device mapper table first.
```bash
$ sudo dmsetup table docker-8:1-123141-pool
```bash
$ sudo dmsetup table docker-8:1-123141-pool
0 209715200 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing
```
0 209715200 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing
```
c. Calculate the real total sectors of the thin pool now.
c. Calculate the real total sectors of the thin pool now.
Change the second number of the table info (i.e. the disk end sector) to
reflect the new number of 512 byte sectors in the disk. For example, as the
new loop size is 200GB, change the second number to 419430400.
Change the second number of the table info (i.e. the disk end sector) to
reflect the new number of 512 byte sectors in the disk. For example, as the
new loop size is 200GB, change the second number to 419430400.
d. Reload the thin pool with the new sector number
d. Reload the thin pool with the new sector number
```bash
$ sudo dmsetup suspend docker-8:1-123141-pool \
&& sudo dmsetup reload docker-8:1-123141-pool --table '0 419430400 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing' \
&& sudo dmsetup resume docker-8:1-123141-pool
```
```bash
$ sudo dmsetup suspend docker-8:1-123141-pool \
&& sudo dmsetup reload docker-8:1-123141-pool --table '0 419430400 thin-pool 7:1 7:0 128 32768 1 skip_block_zeroing' \
&& sudo dmsetup resume docker-8:1-123141-pool
```
#### The device_tool
@ -560,65 +566,66 @@ In this example, you extend the capacity of a running device that uses the
`direct-lvm` configuration. This example assumes you are using the `/dev/sdh1`
disk partition.
1. Extend the volume group (VG) `vg-docker`.
1. Extend the volume group (VG) `vg-docker`.
```bash
$ sudo vgextend vg-docker /dev/sdh1
```bash
$ sudo vgextend vg-docker /dev/sdh1
Volume group "vg-docker" successfully extended
```
Volume group "vg-docker" successfully extended
```
Your volume group may use a different name.
Your volume group may use a different name.
2. Extend the `data` logical volume(LV) `vg-docker/data`
2. Extend the `data` logical volume(LV) `vg-docker/data`
```bash
$ sudo lvextend -l+100%FREE -n vg-docker/data
```bash
$ sudo lvextend -l+100%FREE -n vg-docker/data
Extending logical volume data to 200 GiB
Logical volume data successfully resized
```
Extending logical volume data to 200 GiB
Logical volume data successfully resized
```
3. Reload devicemapper thin pool.
3. Reload devicemapper thin pool.
a. Get the pool name.
a. Get the pool name.
```bash
$ sudo dmsetup status | grep pool
```bash
$ sudo dmsetup status | grep pool
docker-253:17-1835016-pool: 0 96460800 thin-pool 51593 6270/1048576 701943/753600 - rw no_discard_passdown queue_if_no_space
```
docker-253:17-1835016-pool: 0 96460800 thin-pool 51593 6270/1048576 701943/753600 - rw no_discard_passdown queue_if_no_space
```
The name is the string before the colon.
The name is the string before the colon.
b. Dump the device mapper table.
b. Dump the device mapper table.
```bash
$ sudo dmsetup table docker-253:17-1835016-pool
```bash
$ sudo dmsetup table docker-253:17-1835016-pool
0 96460800 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing
```
0 96460800 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing
```
c. Calculate the real total sectors of the thin pool now. we can use `blockdev` to get the real size of data lv.
c. Calculate the real total sectors of the thin pool now. we can use `blockdev`
to get the real size of data lv.
Change the second number of the table info (i.e. the number of sectors) to
reflect the new number of 512 byte sectors in the disk. For example, as the
new data `lv` size is `264132100096` bytes, change the second number to
`515883008`.
Change the second number of the table info (i.e. the number of sectors) to
reflect the new number of 512 byte sectors in the disk. For example, as the
new data `lv` size is `264132100096` bytes, change the second number to
`515883008`.
```bash
$ sudo blockdev --getsize64 /dev/vg-docker/data
```bash
$ sudo blockdev --getsize64 /dev/vg-docker/data
264132100096
```
264132100096
```
d. Then reload the thin pool with the new sector number.
d. Then reload the thin pool with the new sector number.
```bash
$ sudo dmsetup suspend docker-253:17-1835016-pool \
&& sudo dmsetup reload docker-253:17-1835016-pool --table '0 515883008 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing' \
&& sudo dmsetup resume docker-253:17-1835016-pool
```
```bash
$ sudo dmsetup suspend docker-253:17-1835016-pool \
&& sudo dmsetup reload docker-253:17-1835016-pool --table '0 515883008 thin-pool 252:0 252:1 128 32768 1 skip_block_zeroing' \
&& sudo dmsetup resume docker-253:17-1835016-pool
```
## Device Mapper and Docker performance

View File

@ -4,6 +4,7 @@ keywords: container, storage, driver, AUFS, btfs, devicemapper,zvfs
title: Understand images, containers, and storage drivers
redirect_from:
- /en/latest/terms/layer/
- /engine/installation/userguide/storagedriver/
---
To use storage drivers effectively, you must understand how Docker builds and

View File

@ -320,3 +320,15 @@ performance. This is because they bypass the storage driver and do not incur
any of the potential overheads introduced by thin provisioning and
copy-on-write. For this reason, you should place heavy write workloads on data
volumes.
## Limiting your container's writable storage quota
If you want to implement a quota on a per-image/dataset basis, you can use
the `--storage-opt` option.
--storage-opt size=256M
This limits the space your container can write to/change (implemented with the
ZFS attribute `available`). This means that if you have an
image that is 256 MB in size and you use the aforementioned option, you end up with a
container of size 512 MB and 256 MB free.

View File

@ -12,7 +12,7 @@ system configuration, and making your app more portable.
<tr valign="top">
<td width="50%">
{% capture basics %}
## Learn the basics of Docker
### Learn the basics of Docker
The basic tutorial introduces Docker concepts, tools, and commands. The examples show you how to build, push,
and pull Docker images, and run them as containers. This
@ -22,7 +22,7 @@ tutorial stops short of teaching you how to deploy applications.
<td width="50%">
{% capture apps %}
## Define and deploy applications
### Define and deploy applications
The define-and-deploy tutorial shows how to relate
containers to each other and define them as services in an application that is ready to deploy at scale in a
@ -32,15 +32,9 @@ production environment. Highlights [Compose Version 3 new features](/engine/gets
</td></tr>
<tr valign="top">
<td width="50%">
{% capture basics %}
[Start the basic tutorial](/engine/getstarted/){: class="button darkblue-btn"}
{% endcapture %}{{ basics | markdownify }}
<td width="50%">{% capture basics %}[Start the basic tutorial](/engine/getstarted/){: class="button secondary-btn"}{% endcapture %}{{ basics | markdownify }}
</td>
<td width="50%">
{% capture apps %}
[Start the application tutorial](/engine/getstarted-voting-app/){: class="button darkblue-btn"}
{% endcapture %}{{ apps | markdownify }}
<td width="50%">{% capture apps %}[Start the application tutorial](/engine/getstarted-voting-app/){: class="button secondary-btn"}{% endcapture %}{{ apps | markdownify }}
</td>
</tr>
</table>

View File

@ -33,12 +33,12 @@ production environment. Highlights [Compose Version 3 new features](/engine/gets
<tr valign="top">
<td width="50%">
{% capture basics %}
[Start the basic tutorial](/engine/getstarted/){: class="button darkblue-btn"}
[Start the basic tutorial](/engine/getstarted/){: class="button secondary-btn"}
{% endcapture %}{{ basics | markdownify }}
</td>
<td width="50%">
{% capture apps %}
[Start the application tutorial](/engine/getstarted-voting-app/){: class="button darkblue-btn"}
[Start the application tutorial](/engine/getstarted-voting-app/){: class="button secondary-btn"}
{% endcapture %}{{ apps | markdownify }}
</td>
</tr>

View File

@ -14,8 +14,11 @@ To create a virtual machine, you supply Docker Machine with the name of the driv
Since Docker runs on Linux, each VM that Docker Machine provisions relies on a
base operating system. For convenience, there are default base operating
systems. For the Oracle Virtual Box driver, this base operating system is <a href="https://github.com/boot2docker/boot2docker" target="_blank">boot2docker</a>. For drivers used to connect to cloud providers, the base operating system is Ubuntu 12.04+. You can change this default when you create a machine. The Docker Machine reference includes a complete [list of
supported operating systems](drivers/os-base.md).
systems. For the Oracle Virtual Box driver, this base operating system
is [boot2docker](https://github.com/boot2docker/boot2docker). For drivers used
to connect to cloud providers, the base operating system is Ubuntu 12.04+. You
can change this default when you create a machine. The Docker Machine reference
includes a complete [list of supported operating systems](drivers/os-base.md).
## IP addresses for Docker hosts
@ -31,14 +34,16 @@ Before you can run a `docker` command on a machine, you need to configure your
command-line to point to that machine. The `docker-machine env <machine-name>`
subcommand outputs the configuration command you should use.
For a complete list of `docker-machine` subcommands, see the [Docker Machine subcommand reference](reference/index.md).
For a complete list of `docker-machine` subcommands, see the
[Docker Machine subcommand reference](/machine/reference/help.md).
## Custom root Certificate Authority for Registry
Users using their own Docker Registry will experience `x509: certificate signed by unknown authority`
error messages if their registry is signed by custom root Certificate Authority and it is
not registered with Docker Engine. As discussed in the [Docker Engine documentation](/engine/security/certificates/#/understanding-the-configuration)
certificates should be placed at `/etc/docker/certs.d/hostname/ca.crt`
Users using their own Docker Registry will experience `x509: certificate signed by unknown authority`
error messages if their registry is signed by custom root Certificate Authority and it is
not registered with Docker Engine. As discussed in the
[Docker Engine documentation](/engine/security/certificates.md#understanding-the-configuration)
certificates should be placed at `/etc/docker/certs.d/hostname/ca.crt`
where `hostname` is your Registry server's hostname.
```console
@ -78,19 +83,19 @@ Docker Machine is still in its infancy and under active development. If you need
help, would like to contribute, or simply want to talk about the project with
like-minded individuals, we have a number of open channels for communication.
- To report bugs or file feature requests: please use the [issue tracker on
Github](https://github.com/docker/machine/issues).
- To talk about the project with people in real time: please join the
`#docker-machine` channel on IRC.
- To contribute code or documentation changes: please [submit a pull request on
Github](https://github.com/docker/machine/pulls).
- To report bugs or file feature requests: please use the
[issue tracker on Github](https://github.com/docker/machine/issues).
- To talk about the project with people in real time: please join the
`#docker-machine` channel on IRC.
- To contribute code or documentation changes: please
[submit a pull request on Github](https://github.com/docker/machine/pulls).
For more information and resources, please visit
[our help page](/opensource/get-help.md).
## Where to go next
- Create and run a Docker host on your [local system using VirtualBox](get-started.md)
- Provision multiple Docker hosts [on your cloud provider](get-started-cloud.md)
- <a href="../drivers/" target="_blank">Docker Machine driver reference</a>
- <a href="../reference/" target="_blank">Docker Machine subcommand reference</a>
- Create and run a Docker host on your [local system using VirtualBox](get-started.md)
- Provision multiple Docker hosts [on your cloud provider](get-started-cloud.md)
- [Docker Machine driver reference](/machine/drivers.md){: target="_blank" class="_"}
- [Docker Machine subcommand reference](/machine/reference/help.md){: target="_blank" class="_"}

View File

@ -51,8 +51,9 @@ driver for Oracle VirtualBox](drivers/virtualbox.md).) Note that you can run
both HyperKit and Oracle VirtualBox on the same system. To learn more, see
[Docker for Mac vs. Docker Toolbox](/docker-for-mac/docker-toolbox/).
* Make sure you have <a href="https://www.virtualbox.org/wiki/Downloads" target="_blank">the latest VirtualBox</a> correctly installed on your system
(either as part of an earlier Toolbox install, or manual install).
* Make sure you have [the latest VirtualBox](https://www.virtualbox.org/wiki/Downloads){: target="_blank" class="_"}
correctly installed on your system (either as part of an earlier Toolbox install,
or manual install).
#### If you are using Docker Toolbox
@ -60,23 +61,23 @@ Docker for Mac and Docker for Windows both require newer versions of their
respective operating systems, so users with older OS versions must use Docker
Toolbox.
* If you are using Docker Toolbox on either Mac or an older version Windows system (without Hyper-V), you will use the `virtualbox` driver to create
a local machine based on Oracle <a href= "https://www.virtualbox.org/"
target="_blank">VirtualBox</a>. (See the [Docker Machine driver for Oracle
VirtualBox](drivers/virtualbox.md) )
<br />
* If you are using Docker Toolbox on a Windows system that has Hyper-V but cannot run Docker for Windows (for example Windows 8 Pro), you must use the
`hyperv` driver to create local machines. (See the [Docker Machine driver for
Microsoft Hyper-V](drivers/hyper-v.md).)
<br />
* Make sure you have <a href="https://www.virtualbox.org/wiki/Downloads" target="_blank">the latest VirtualBox</a> correctly installed on your system. If
you used <a href="https://www.docker.com/products/docker-toolbox"
target="_blank">Toolbox</a> for <a
href="/engine/installation/mac/" target="_blank">Mac</a>
or <a href="/engine/installation/windows/"
target="_blank">Windows</a> to install Docker Machine, VirtualBox is
automatically installed.
<br />
* If you are using Docker Toolbox on either Mac or an older version Windows system
(without Hyper-V), you will use the `virtualbox` driver to create a local
machine based on Oracle [VirtualBox(https://www.virtualbox.org/){: target="_blank" class="_"}.
(See the [Docker Machine driver for Oracle VirtualBox](drivers/virtualbox.md).)
* If you are using Docker Toolbox on a Windows system that has Hyper-V but cannot
run Docker for Windows (for example Windows 8 Pro), you must use the
`hyperv` driver to create local machines. (See the
[Docker Machine driver for Microsoft Hyper-V](drivers/hyper-v.md).)
* Make sure you have [the latest VirtualBox](https://www.virtualbox.org/wiki/Downloads){: target="_blank" class="_"}
correctly installed on your system. If you used
[Toolbox]("https://www.docker.com/products/docker-toolbox"){: target="_blank" class="_"}
or [Docker for Windows](/docker-for-windows/index.md){: target="_blank" class="_"}
to install Docker Machine, VirtualBox is
automatically installed.
* If you used the Quickstart Terminal to launch your first machine and set your terminal environment to point to it, a default machine was automatically
created. If this is the case, you can still follow along with these steps, but
create another machine and name it something other than "default" (e.g., staging
@ -138,7 +139,7 @@ choose another name for this new machine.
Docker is up and running!
To see how to connect Docker to this machine, run: docker-machine env default
This command downloads a lightweight Linux distribution (<a href="https://github.com/boot2docker/boot2docker" target="_blank">boot2docker</a>) with the Docker daemon installed, and creates and starts a VirtualBox VM with Docker running.
This command downloads a lightweight Linux distribution ([boot2docker](https://github.com/boot2docker/boot2docker){: target="_blank" class="_"}) with the Docker daemon installed, and creates and starts a VirtualBox VM with Docker running.
4. List available machines again to see your newly minted machine.
@ -164,7 +165,7 @@ choose another name for this new machine.
**Note**: If you are using `fish`, or a Windows shell such as
Powershell/`cmd.exe` the above method will not work as described.
Instead, see <a href="/machine/reference/env/" target="_blank">the `env` command's documentation</a>
Instead, see [the `env` command's documentation](/machine/reference/env.md){: target="_blank" class="_"}
to learn how to set the environment variables for your shell.
This sets environment variables for the current shell that the Docker client will read which specify the TLS settings. You need to do this each time you open a new shell or restart your machine.
@ -193,7 +194,7 @@ Run a container with `docker run` to verify your set up.
$ docker-machine ip default
192.168.99.100
3. Run a webserver (<a href="https://www.nginx.com/" target="_blank">nginx</a>) in a container with the following command:
3. Run a [Nginx](https://www.nginx.com/){: target="_blank" class="_"} webserver in a container with the following command:
$ docker run -d -p 8000:80 nginx

View File

@ -301,7 +301,7 @@ They will display corresponding entries for the change in leadership.
## Additional Resources
- [Installing Docker Engine on a cloud provider](/engine/installation/cloud/cloud-ex-aws/)
- [Installing Docker Engine on a cloud provider](/docker-for-aws/)
- [High availability in Docker Swarm](multi-manager-setup.md)
- [Discovery](discovery.md)
- [High-availability cluster using a trio of consul nodes](https://hub.docker.com/r/progrium/consul/)

View File

@ -58,10 +58,9 @@ documents.
## Swarm API
The [Docker Swarm API](swarm-api.md) is compatible with
the [Docker remote
API](/engine/reference/api/docker_remote_api/), and extends it
with some new endpoints.
The [Docker Swarm API](swarm-api.md) is compatible with the
[Docker remote API](/engine/api/index.md), and extends it with some new
endpoints.
## Getting help

View File

@ -18,19 +18,19 @@ you can use it to setup a Swarm cluster on a cloud provider, or inside your
company's data center.
If this is the first time you are creating a Swarm cluster, you should first
learn about Swarm and its requirements by [installing a Swarm for
evaluation](install-w-machine.md) or [installing a Swarm for
production](install-manual.md). If this is the first time you have used Machine,
you should take some time to [understand Machine before
continuing](/machine).
learn about Swarm and its requirements by
[installing a Swarm for evaluation](install-w-machine.md) or
[installing a Swarm for production](install-manual.md). If this is the first
time you have used Machine, you should take some time to
[understand Machine before continuing](/machine).
## What you need
If you are using macOS or Windows and have installed with Docker Toolbox, you
should already have Machine installed. If you need to install, see the
instructions for [macOS](/engine/installation/mac/) or
[Windows](/engine/installation/mac/).
instructions for [macOS](/docker-for-mac/) or
[Windows](/docker-for-windows/).
Machine supports installing on AWS, Digital Ocean, Google Cloud Platform, IBM
Softlayer, Microsoft Azure and Hyper-V, OpenStack, Rackspace, VirtualBox, VMware
@ -42,8 +42,8 @@ The Toolbox installation gives you VirtualBox and the `boot2docker.iso` image
you need. It also gives you the ability provision on all the systems Machine
supports.
**Note**:These examples assume you are using macOS or Windows, if you like you can also [install Docker Machine directly on a Linux
system](/machine/install-machine).
**Note**:These examples assume you are using macOS or Windows, if you like you can also
[install Docker Machine directly on a Linux system](/machine/install-machine).
## Provision a host to generate a Swarm token
@ -138,7 +138,7 @@ eval "$(docker-machine env local)"
Docker Machine provides a special `--swarm` flag with its `env` command to
connect to Swarm nodes.
```
```bash
docker-machine env --swarm HOST_NODE_NAME
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.101:3376"
@ -157,7 +157,7 @@ eval "$(docker-machine env --swarm swarm-manager)"
Now, you can use the Docker CLI to query and interact with your cluster.
```
```bash
docker info
Containers: 2
Images: 1
@ -181,4 +181,4 @@ Name: swarm-manager
* [Evaluate Swarm in a sandbox](install-w-machine.md)
* [Build a Swarm cluster for production](install-manual.md)
* [Swarm Discovery](discovery.md)
* [Docker Machine](/machine) documentation
* [Docker Machine](/machine/index.md) documentation

View File

@ -9,8 +9,8 @@ redirect_from:
title: Docker Swarm API
---
The Docker Swarm API is mostly compatible with the [Docker Remote
API](/engine/reference/api/docker_remote_api/). This
The Docker Swarm API is mostly compatible with the
[Docker Remote API](/engine/api/index.md). This
document is an overview of the differences between the Swarm API and the Docker
Engine API.

View File

@ -8,15 +8,15 @@ redirect_from:
title: Deploy the application
---
You've [deployed the load balancer, the discovery backend, and a Swarm
cluster](deploy-infra.md) so now you can build and deploy the voting application
itself. You do this by starting a number of "Dockerized applications" running in
containers.
You've
[deployed the load balancer, the discovery backend, and a Swarm cluster](deploy-infra.md)
so now you can build and deploy the voting application itself. You do this by
starting a number of "Dockerized applications" running in containers.
The diagram below shows the final application configuration including the overlay
container network, `voteapp`.
![](../images/final-result.png)
![](/swarm/swarm_at_scale/images/final-result.png)
In this procedure you will connect containers to this network. The `voteapp`
network is available to all Docker hosts using the Consul discovery backend.
@ -239,7 +239,7 @@ Now, you can test your application.
You should see something similar to the following:
![](../images/vote-app-test.png)
![](/swarm/swarm_at_scale/images/vote-app-test.png)
2. Click on one of the two voting options.
3. Navigate to the `http://results.myenterprise.example.com` site to see the results.
@ -247,7 +247,7 @@ Now, you can test your application.
You'll see both sides change as you switch your vote.
![](../images/votes.gif)
![](/swarm/swarm_at_scale/images/votes.gif)
## Extra Credit: Deployment with Docker Compose
@ -301,8 +301,8 @@ the containers at once. This extra credit
service in the file. This application relies on a volume and a network,
declare those at the bottom of the file.
3. Check your work against <a href="../docker-compose.yml" target="_blank">this
result file</a>
3. Check your work against
[this file](/swarm/swarm_at_scale/docker-compose.yml){: target="_blank" class="_"}.
4. When you are satisfied, save the `docker-compose.yml` file to your system.