Merge pull request #26455 from mstanleyjones/2016.09.09-docs-cherry-picks

2016.09.09 docs cherry picks
This commit is contained in:
Sven Dowideit 2016-09-12 09:45:49 +10:00 committed by GitHub
commit 2a1197037c
15 changed files with 56 additions and 51 deletions

View file

@ -38,7 +38,7 @@ to the MAJOR.MINOR.PATCH format."
## Vendoring cadence
In order to avoid huge vendoring changes, it is recommended to have a regular
cadence for vendoring updates. eg. monthly.
cadence for vendoring updates. e.g. monthly.
## Pre-merge vendoring tests
All related repos will be vendored into docker/docker.

View file

@ -1,3 +1,3 @@
docker.go contains Docker's main function.
docker.go contains Docker daemon's main function.
This file provides first line CLI argument parsing and environment variable setting.

View file

@ -53,7 +53,7 @@ following:
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// $OPTIONS \
ExecStart=/usr/bin/dockerd $OPTIONS \
$DOCKER_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \
$BLOCK_REGISTRY \
@ -85,18 +85,31 @@ In this example, we'll assume that your `docker.service` file looks something li
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
After=network.target
[Service]
Type=notify
ExecStart=/usr/bin/dockerd -H fd://
LimitNOFILE=1048576
LimitNPROC=1048576
TasksMax=1048576
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
Also=docker.socket
WantedBy=multi-user.target
This will allow us to add extra flags via a drop-in file (mentioned above) by
placing a file containing the following in the `/etc/systemd/system/docker.service.d`
@ -104,7 +117,7 @@ directory:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --graph="/mnt/docker-data" --storage-driver=overlay
ExecStart=/usr/bin/dockerd --graph="/mnt/docker-data" --storage-driver=overlay
You can also set other environment variables in this file, for example, the
`HTTP_PROXY` environment variables described below.
@ -114,7 +127,7 @@ by a new configuration as follows:
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --bip=172.17.42.1/16
ExecStart=/usr/bin/dockerd --bip=172.17.42.1/16
If you fail to specify an empty configuration, Docker reports an error such as:

View file

@ -72,13 +72,14 @@ If you don't already have a terminal open, open one now:
The format for the login command is:
docker login --username=yourhubusername --email=youremail@company.com
docker login
When prompted, enter your password and press enter. So, for example:
$ docker login --username=maryatdocker --email=mary@docker.com
Password:
WARNING: login credentials saved in C:\Users\sven\.docker\config.json
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username:
Password:
Login Succeeded
9. Type the `docker push` command to push your image to your new repository.

View file

@ -4009,7 +4009,7 @@ Return low-level information on the node `id`
`DELETE /nodes/<id>`
Remove a node [`id`] from the Swarm.
Remove a node [`id`] from the swarm.
**Example request**:
@ -4253,7 +4253,7 @@ JSON Parameters:
address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when
possible.
- **RemoteAddr** Address of any manager node already participating in the swarm.
- **JoinToken** Secret token for joining this Swarm.
- **JoinToken** Secret token for joining this swarm.
### Leave a swarm

View file

@ -4034,7 +4034,7 @@ Return low-level information on the node `id`
`DELETE /nodes/<id>`
Remove a node [`id`] from the Swarm.
Remove a node [`id`] from the swarm.
**Example request**:
@ -4274,7 +4274,7 @@ JSON Parameters:
address is used. If `AdvertiseAddr` is not specified, it will be automatically detected when
possible.
- **RemoteAddr** Address of any manager node already participating in the swarm.
- **JoinToken** Secret token for joining this Swarm.
- **JoinToken** Secret token for joining this swarm.
### Leave a swarm

View file

@ -26,7 +26,7 @@ Options:
--config=~/.docker Location of client config files
-D, --debug Enable debug mode
-H, --host=[] Daemon socket(s) to connect to
-h, --help Print usage
--help Print usage
-l, --log-level=info Set the logging level
--tls Use TLS; implied by --tlsverify
--tlscacert=~/.docker/ca.pem Trust certs signed only by this CA

View file

@ -14,7 +14,7 @@ parent = "smn_cli"
```markdown
Usage: docker plugin rm PLUGIN
Remove a plugin
Remove one or more plugins
Aliases:
rm, remove

View file

@ -74,7 +74,7 @@ This flag forces an existing node that was part of a quorum that was lost to res
### `--listen-addr value`
The node listens for inbound Swarm manager traffic on this address. The default is to listen on
The node listens for inbound swarm manager traffic on this address. The default is to listen on
0.0.0.0:2377. It is also possible to specify a network interface to listen on that interface's
address; for example `--listen-addr eth0:2377`.

View file

@ -61,7 +61,7 @@ dvfxp4zseq4s0rih1selh0d20 * manager1 Ready Active Leader
### `--listen-addr value`
If the node is a manager, it will listen for inbound Swarm manager traffic on this
If the node is a manager, it will listen for inbound swarm manager traffic on this
address. The default is to listen on 0.0.0.0:2377. It is also possible to specify a
network interface to listen on that interface's address; for example `--listen-addr eth0:2377`.

View file

@ -9,15 +9,6 @@ weight=-80
+++
<![end-metadata]-->
<!-- TODO (@thaJeztah) define more flexible table/td classes -->
<style>
table .no-wrap {
white-space: nowrap;
}
table code {
white-space: nowrap;
}
</style>
# Docker run reference
Docker runs processes in isolated containers. A container is a process

View file

@ -97,7 +97,7 @@ task assignments for the `redis` service:
9bg7cezvedmkgg6c8yzvbhwsd redis.3 redis:3.0.6 worker2 Running Running 4 minutes
```
The Swarm manager maintains the desired state by ending the task on a node
The swarm manager maintains the desired state by ending the task on a node
with `Drain` availability and creating a new task on a node with `Active`
availability.

View file

@ -71,7 +71,7 @@ store uses the hostnames to identify cluster members.
Though Docker Machine and Docker Swarm are not mandatory to experience Docker
multi-host networking with a key-value store, this example uses them to
illustrate how they are integrated. You'll use Machine to create both the
key-value store server and the host cluster. This example creates a Swarm
key-value store server and the host cluster. This example creates a swarm
cluster.
>**Note:** Docker Engine running in swarm mode is not compatible with networking
@ -135,11 +135,11 @@ Keep your terminal open and move onto the next step.
In this step, you use `docker-machine` to provision the hosts for your network.
At this point, you won't actually create the network. You'll create several
machines in VirtualBox. One of the machines will act as the Swarm master;
machines in VirtualBox. One of the machines will act as the swarm master;
you'll create that first. As you create each host, you'll pass the Engine on
that machine options that are needed by the `overlay` network driver.
1. Create a Swarm master.
1. Create a swarm master.
$ docker-machine create \
-d virtualbox \
@ -151,7 +151,7 @@ that machine options that are needed by the `overlay` network driver.
At creation time, you supply the Engine `daemon` with the ` --cluster-store` option. This option tells the Engine the location of the key-value store for the `overlay` network. The bash expansion `$(docker-machine ip mh-keystore)` resolves to the IP address of the Consul server you created in "STEP 1". The `--cluster-advertise` option advertises the machine on the network.
2. Create another host and add it to the Swarm cluster.
2. Create another host and add it to the swarm cluster.
$ docker-machine create -d virtualbox \
--swarm \
@ -178,13 +178,13 @@ Leave your terminal open and go onto the next step.
To create an overlay network
1. Set your docker environment to the Swarm master.
1. Set your docker environment to the swarm master.
$ eval $(docker-machine env --swarm mhs-demo0)
Using the `--swarm` flag with `docker-machine` restricts the `docker` commands to Swarm information alone.
Using the `--swarm` flag with `docker-machine` restricts the `docker` commands to swarm information alone.
2. Use the `docker info` command to view the Swarm.
2. Use the `docker info` command to view the swarm.
$ docker info
@ -214,7 +214,7 @@ To create an overlay network
$ docker network create --driver overlay --subnet=10.0.9.0/24 my-net
You only need to create the network on a single host in the cluster. In this case, you used the Swarm master but you could easily have run it on any host in the cluster.
You only need to create the network on a single host in the cluster. In this case, you used the swarm master but you could easily have run it on any host in the cluster.
> **Note** : It is highly recommended to use the `--subnet` option when creating
> a network. If the `--subnet` is not specified, the docker daemon automatically
@ -235,11 +235,11 @@ To create an overlay network
d0bb78cbe7bd mhs-demo1/bridge bridge
1c0eb8f69ebb mhs-demo1/none null
As you are in the Swarm master environment, you see all the networks on all
the Swarm agents: the default networks on each engine and the single overlay
As you are in the swarm master environment, you see all the networks on all
the swarm agents: the default networks on each engine and the single overlay
network. Notice that each `NETWORK ID` is unique.
5. Switch to each Swarm agent in turn and list the networks.
5. Switch to each swarm agent in turn and list the networks.
$ eval $(docker-machine env mhs-demo0)
@ -268,7 +268,7 @@ To create an overlay network
Once your network is created, you can start a container on any of the hosts and it automatically is part of the network.
1. Point your environment to the Swarm master.
1. Point your environment to the swarm master.
$ eval $(docker-machine env --swarm mhs-demo0)
@ -322,7 +322,7 @@ Additionally, containers connected to the multi-host network are automatically
connected to the `docker_gwbridge` network. This network allows the containers
to have external connectivity outside of their cluster.
1. Change your environment to the Swarm agent.
1. Change your environment to the swarm agent.
$ eval $(docker-machine env mhs-demo1)
@ -337,7 +337,7 @@ to have external connectivity outside of their cluster.
1aeead6dd890 host host
e1dbd5dff8be docker_gwbridge bridge
3. Repeat steps 1 and 2 on the Swarm master.
3. Repeat steps 1 and 2 on the swarm master.
$ eval $(docker-machine env mhs-demo0)
@ -381,7 +381,7 @@ to have external connectivity outside of their cluster.
Please refer to the Networking feature introduced in [Compose V2 format]
(https://docs.docker.com/compose/networking/) and execute the
multi-host networking scenario in the Swarm cluster used above.
multi-host networking scenario in the swarm cluster used above.
## Related information

View file

@ -495,7 +495,7 @@ Docker Engine for use with `overlay` network. There are three options to set:
</tbody>
</table>
Create an `overlay` network on one of the machines in the Swarm.
Create an `overlay` network on one of the machines in the swarm.
$ docker network create --driver overlay my-multi-host-network

View file

@ -2,7 +2,7 @@
% Docker Community
% JUNE 2014
# NAME
docker-restart - Restart a container
docker-restart - Restart one or more containers
# SYNOPSIS
**docker restart**