Rendering fixes, part 1 (up through cs-engine)

This commit is contained in:
John Mulhausen 2016-09-30 19:38:30 -07:00
parent 39055aeab4
commit a0ee6c6004
19 changed files with 242 additions and 241 deletions

View File

@ -36,19 +36,19 @@ to update its RHEL kernel.
1. Log into the system as a user with root or sudo permissions.
2. Add the Docker public key for CS packages:
2. Add the Docker public key for CS packages:
```bash
$ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
```
3. Install yum-utils if necessary:
3. Install yum-utils if necessary:
```bash
$ sudo yum install -y yum-utils
```
4. Add the Docker repository:
4. Add the Docker repository:
```bash
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
@ -57,26 +57,26 @@ to update its RHEL kernel.
This adds the repository of the latest version of CS Docker Engine. You can
customize the URL to install an older version.
5. Install Docker CS Engine:
5. Install Docker CS Engine:
```bash
$ sudo yum install docker-engine
```
6. Enable the Docker daemon as a service and start it.
6. Enable the Docker daemon as a service and start it.
```bash
$ sudo systemctl enable docker.service
$ sudo systemctl start docker.service
```
7. Confirm the Docker daemon is running:
7. Confirm the Docker daemon is running:
```bash
$ sudo docker info
```
8. Optionally, add non-sudo access to the Docker socket by adding your user
8. Optionally, add non-sudo access to the Docker socket by adding your user
to the `docker` group.
```bash
@ -89,19 +89,19 @@ to the `docker` group.
1. Log into the system as a user with root or sudo permissions.
2. Add Docker's public key for CS packages:
2. Add Docker's public key for CS packages:
```bash
$ curl -s 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add --import
```
3. Install the HTTPS helper for apt (your system may already have it):
3. Install the HTTPS helper for apt (your system may already have it):
```bash
$ sudo apt-get update && sudo apt-get install apt-transport-https
```
4. Install additional virtual drivers not in the base image.
4. Install additional virtual drivers not in the base image.
```bash
$ sudo apt-get install -y linux-image-extra-virtual
@ -109,7 +109,7 @@ to the `docker` group.
You may need to reboot your server after updating the LTS kernel.
5. Add the repository for the new version:
5. Add the repository for the new version:
```bash
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
@ -128,7 +128,7 @@ to the `docker` group.
* ubuntu-vivid (Ubuntu 15.04)
* ubuntu-wily (Ubuntu 15.10)
6. Run the following to install commercially supported Docker Engine and its
6. Run the following to install commercially supported Docker Engine and its
dependencies:
```bash
@ -141,7 +141,7 @@ dependencies:
$ sudo docker info
```
8. Optionally, add non-sudo access to the Docker socket by adding your
8. Optionally, add non-sudo access to the Docker socket by adding your
user to the `docker` group.
```bash
@ -155,14 +155,14 @@ user to the `docker` group.
1. Log into the system as a user with root or sudo permissions.
2. Refresh your repository so that curl commands and CA certificates
2. Refresh your repository so that curl commands and CA certificates
are available:
```bash
$ sudo zypper ref
```
3. Add the Docker repository and public key:
3. Add the Docker repository and public key:
```bash
$ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.12
@ -172,26 +172,26 @@ are available:
This adds the repository of the latest version of CS Docker Engine. You can
customize the URL to install an older version.
4. Install the Docker daemon package:
4. Install the Docker daemon package:
```bash
$ sudo zypper install docker-engine
```
5. Enable the Docker daemon as a service and then start it:
5. Enable the Docker daemon as a service and then start it:
```bash
$ sudo systemctl enable docker.service
$ sudo systemctl start docker.service
```
6. Confirm the Docker daemon is running:
6. Confirm the Docker daemon is running:
```bash
$ sudo docker info
```
7. Optionally, add non-sudo access to the Docker socket by adding your user
7. Optionally, add non-sudo access to the Docker socket by adding your user
to the `docker` group.
```bash

View File

@ -57,7 +57,7 @@ for all the kernels that the base CS Engine is supported on.
>**Note**: Centos 7 has its firewall enabled by default and it prevents the VXLAN tunnel from communicating. If this applies to you, then after installing the CS Engine, execute the following command in the Linux host:
`sudo firewall-cmd --zone=public --permanent --add-port=4789/udp`
sudo firewall-cmd --zone=public --permanent --add-port=4789/udp
* Corrected an issue where Docker didn't remove the Masquerade NAT rule from `iptables` when the network was removed. This caused the gateway address to be
@ -138,54 +138,53 @@ SELinux will be unable to use hostname-based network access in either `docker bu
For example, you see will failures such as:
```
[root@dtr ~]# docker -v
Docker version 1.6.0-cs2, build b8dd430
[root@dtr ~]# ping dtr.home.org.au
PING dtr.home.org.au (10.10.10.104) 56(84) bytes of data.
64 bytes from dtr.home.gateway (10.10.10.104): icmp_seq=1 ttl=64 time=0.663 ms
^C
--- dtr.home.org.au ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.078/0.370/0.663/0.293 ms
[root@dtr ~]# docker run --rm -it debian ping dtr.home.org.au
ping: unknown host
[root@dtr ~]# docker run --rm -it debian cat /etc/resolv.conf
cat: /etc/resolv.conf: Permission denied
[root@dtr ~]# docker run --rm -it debian apt-get update
Err http://httpredir.debian.org jessie InRelease
```bash
[root@dtr ~]# docker -v
Docker version 1.6.0-cs2, build b8dd430
[root@dtr ~]# ping dtr.home.org.au
PING dtr.home.org.au (10.10.10.104) 56(84) bytes of data.
64 bytes from dtr.home.gateway (10.10.10.104): icmp_seq=1 ttl=64 time=0.663 ms
^C
--- dtr.home.org.au ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.078/0.370/0.663/0.293 ms
[root@dtr ~]# docker run --rm -it debian ping dtr.home.org.au
ping: unknown host
[root@dtr ~]# docker run --rm -it debian cat /etc/resolv.conf
cat: /etc/resolv.conf: Permission denied
[root@dtr ~]# docker run --rm -it debian apt-get update
Err http://httpredir.debian.org jessie InRelease
Err http://security.debian.org jessie/updates InRelease
Err http://security.debian.org jessie/updates InRelease
Err http://httpredir.debian.org jessie-updates InRelease
Err http://httpredir.debian.org jessie-updates InRelease
Err http://security.debian.org jessie/updates Release.gpg
Could not resolve 'security.debian.org'
Err http://httpredir.debian.org jessie Release.gpg
Could not resolve 'httpredir.debian.org'
Err http://httpredir.debian.org jessie-updates Release.gpg
Could not resolve 'httpredir.debian.org'
[output truncated]
```
Err http://security.debian.org jessie/updates Release.gpg
Could not resolve 'security.debian.org'
Err http://httpredir.debian.org jessie Release.gpg
Could not resolve 'httpredir.debian.org'
Err http://httpredir.debian.org jessie-updates Release.gpg
Could not resolve 'httpredir.debian.org'
[output truncated]
```
or when running a `docker build`:
```
[root@dtr ~]# docker build .
Sending build context to Docker daemon 11.26 kB
Sending build context to Docker daemon
Step 0 : FROM fedora
---> e26efd418c48
Step 1 : RUN yum install httpd
---> Running in cf274900ea35
```bash
[root@dtr ~]# docker build .
Sending build context to Docker daemon 11.26 kB
Sending build context to Docker daemon
Step 0 : FROM fedora
---> e26efd418c48
Step 1 : RUN yum install httpd
---> Running in cf274900ea35
One of the configured repositories failed (Fedora 21 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
One of the configured repositories failed (Fedora 21 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
[output truncated]
```
[output truncated]
```
**Affected Versions**: All previous versions of Docker Engine when SELinux is
enabled.
@ -200,7 +199,7 @@ where SELinux is typically required.
The second option is to pass the following parameter in to `docker run`.
--security-opt=label:type:docker_t
--security-opt=label:type:docker_t
This parameter cannot be passed to the `docker build` command.
@ -211,34 +210,40 @@ When upgrading, make sure you stop Docker Trusted Registry first, perform the En
If you are running with SELinux enabled, previous Docker Engine releases allowed
you to bind-mount additional volumes or files inside the container as follows:
`$ docker run -it -v /home/user/foo.txt:/foobar.txt:ro <imagename>`
$ docker run -it -v /home/user/foo.txt:/foobar.txt:ro <imagename>
In the 1.6.2-cs5 release, you must ensure additional bind-mounts have the
correct SELinux context. For example, if you want to mount `foobar.txt` as
read-only into the container, do the following to create and test your
bind-mount:
1. Add the `z` option to the bind mount when you specify `docker run`.
1. Add the `z` option to the bind mount when you specify `docker run`.
$ docker run -it -v /home/user/foo.txt:/foobar.txt:ro,z <imagename>
```bash
$ docker run -it -v /home/user/foo.txt:/foobar.txt:ro,z <imagename>
```
2. Exec into your new container.
2. Exec into your new container.
For example, if your container is `bashful_curie`, open a shell on the
container:
For example, if your container is `bashful_curie`, open a shell on the
container:
$ docker exec -it bashful_curie bash
```bash
$ docker exec -it bashful_curie bash
```
3. Use `cat` to check the permissions on the mounted file.
3. Use `cat` to check the permissions on the mounted file.
$ cat /foobar.txt
the contents of foobar appear
```bash
$ cat /foobar.txt
the contents of foobar appear
```
If you see the file's contents, your mount succeeded. If you receive a
`Permission denied` message and/or the `/var/log/audit/audit.log` file on your
Docker host contains an AVC Denial message, the mount did not succeed.
type=AVC msg=audit(1432145409.197:7570): avc: denied { read } for pid=21167 comm="cat" name="foobar.txt" dev="xvda2" ino=17704136 scontext=system_u:system_r:svirt_lxc_net_t:s0:c909,c965 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
type=AVC msg=audit(1432145409.197:7570): avc: denied { read } for pid=21167 comm="cat" name="foobar.txt" dev="xvda2" ino=17704136 scontext=system_u:system_r:svirt_lxc_net_t:s0:c909,c965 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file
Recheck your command line to make sure you passed in the `z` option.

View File

@ -35,13 +35,13 @@ same minor version. As an example, from 1.1.0 to 1.1.1.
### CentOS 7.1 & RHEL 7.0/7.1
Use these instructions to upgrade YUM-based systems.
1. Update your docker-engine package:
1. Update your docker-engine package:
```bash
$ sudo yum upgrade docker-engine
```
2. Check that the CS Docker Engine is running:
2. Check that the CS Docker Engine is running:
```bash
$ sudo docker info
@ -50,13 +50,13 @@ Use these instructions to upgrade YUM-based systems.
### Ubuntu 14.04 LTS
Use these instructions to upgrade APT-based systems.
1. Update your docker-engine package:
1. Update your docker-engine package:
```bash
$ sudo apt-get update && sudo apt-get upgrade docker-engine
```
2. Check that the CS Docker Engine is running:
2. Check that the CS Docker Engine is running:
```bash
$ sudo docker info
@ -64,13 +64,13 @@ Use these instructions to upgrade APT-based systems.
### SUSE Enterprise 12.3
1. Update your docker-engine package:
1. Update your docker-engine package:
```bash
$ sudo zypper upgrade docker-engine
```
2. Check that the CS Docker Engine is running:
2. Check that the CS Docker Engine is running:
```bash
$ sudo docker info
@ -86,7 +86,7 @@ same major version. As an example, from 1.1.x to 1.2.x.
### CentOS 7.1 & RHEL 7.0/7.1
Use these instructions to upgrade YUM-based systems.
1. Add the Docker Engine repository.
1. Add the Docker Engine repository.
```bash
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
@ -95,13 +95,13 @@ Use these instructions to upgrade YUM-based systems.
This adds the repository of the latest version of CS Docker Engine. You can
customize the URL to install other versions.
2. Install the new package:
2. Install the new package:
```bash
$ sudo yum update docker-engine
```
3. Check that the CS Engine is running:
3. Check that the CS Engine is running:
```bash
$ sudo docker info
@ -111,7 +111,7 @@ Use these instructions to upgrade YUM-based systems.
Use these instructions to update APT-based systems.
1. Add the docker engine repository.
1. Add the docker engine repository.
```bash
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
@ -130,13 +130,13 @@ Use these instructions to update APT-based systems.
* ubuntu-vivid (Ubuntu 15.04)
* ubuntu-wily (Ubuntu 15.10)
2. Update your docker-engine package.
2. Update your docker-engine package.
```bash
$ sudo apt-get update && sudo apt-get upgrade docker-engine
```
3. Check that the CS Engine is running:
3. Check that the CS Engine is running:
```bash
$ sudo docker info
@ -144,22 +144,22 @@ Use these instructions to update APT-based systems.
#### SUSE Enterprise 12.3
1. Add the docker engine repository.
1. Add the docker engine repository.
```bash
$ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.12
```
```bash
$ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.12
```
This adds the repository of the latest version of CS Docker Engine. You
can customize the URL to install other versions.
This adds the repository of the latest version of CS Docker Engine. You
can customize the URL to install other versions.
2. Install the new package:
2. Install the new package:
```bash
$ sudo zypper update docker-engine
```
3. Check that the CS Engine is running:
3. Check that the CS Engine is running:
```bash
$ sudo docker info
@ -175,25 +175,25 @@ then install the latest version.
### CentOS 7.1 & RHEL 7.0/7.1
Use these instructions to upgrade YUM-based systems.
1. Remove the current CS Engine:
1. Remove the current CS Engine:
```bash
$ sudo yum remove docker-engine-cs
```
2. Add the Docker public key for CS packages:
2. Add the Docker public key for CS packages:
```bash
$ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
```
3. Install yum-utils if necessary:
3. Install yum-utils if necessary:
```bash
$ sudo yum install -y yum-utils
```
4. Add the repository for the new version and disable the old one.
4. Add the repository for the new version and disable the old one.
```bash
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
@ -203,13 +203,13 @@ Use these instructions to upgrade YUM-based systems.
This adds the repository of the latest version of CS Docker Engine. You
can customize the URL to install other versions.
5. Install the new package:
5. Install the new package:
```bash
$ sudo yum install docker-engine
```
6. Enable the Docker daemon as a service and start it.
6. Enable the Docker daemon as a service and start it.
```bash
$ sudo systemctl enable docker.service
@ -220,25 +220,25 @@ Use these instructions to upgrade YUM-based systems.
Use these instructions to update APT-based systems.
1. Remove the current Engine:
1. Remove the current Engine:
```bash
$ sudo apt-get remove docker-engine-cs
```
2. Add the Docker public key for CS packages:
2. Add the Docker public key for CS packages:
```bash
$ curl -s 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add --import
```
3. Install the HTTPS helper for apt (your system may already have it):
3. Install the HTTPS helper for apt (your system may already have it):
```bash
$ sudo apt-get update && sudo apt-get install apt-transport-https
```
4. Install additional virtual drivers not in the base image.
4. Install additional virtual drivers not in the base image.
```bash
$ sudo apt-get install -y linux-image-extra-virtual
@ -246,7 +246,7 @@ Use these instructions to update APT-based systems.
You may need to reboot your server after updating the LTS kernel.
5. Add the repository for the new version:
5. Add the repository for the new version:
```bash
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
@ -266,7 +266,7 @@ Use these instructions to update APT-based systems.
* ubuntu-wily (Ubuntu 15.10)
6. Install the upgraded package:
6. Install the upgraded package:
```bash
$ sudo apt-get upgrade docker-engine

View File

@ -18,11 +18,8 @@ Examples will highlight develop, build, and run workflows in several languages,
For now, if you want get started experimenting with the Beta apps and Docker Compose (which is installed automatically with Docker Desktop Editions), have a look at these example applications in the Compose documentation. You should be able to run these with Docker for Mac and Docker for Windows.
<a href=https://docs.docker.com/compose/django/ target="_blank">Quickstart: Compose and Django</a>
<a href=https://docs.docker.com/compose/rails/ target="_blank">Quickstart: Compose and Rails</a>
<a href=https://docs.docker.com/compose/wordpress/ target="_blank">Quickstart: Compose and WordPress</a>
- [Quickstart: Compose and Django](/compose/django/)
- [Quickstart: Compose and Rails](/compose/rails/)
- [Quickstart: Compose and WordPress](/compose/wordpress/)
See also [learn by example](/engine/tutorials/index.md) tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.

View File

@ -18,11 +18,8 @@ Examples will highlight develop, build, and run workflows in several languages,
For now, if you want get started experimenting with the Beta apps and Docker Compose (which is installed automatically with Docker Desktop Editions), have a look at these example applications in the Compose documentation. You should be able to run these with Docker for Mac and Docker for Windows.
<a href=https://docs.docker.com/compose/django/ target="_blank">Quickstart: Compose and Django</a>
<a href=https://docs.docker.com/compose/rails/ target="_blank">Quickstart: Compose and Rails</a>
<a href=https://docs.docker.com/compose/wordpress/ target="_blank">Quickstart: Compose and WordPress</a>
See also [learn by example](/engine/tutorials/index.md) tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.
- [Quickstart: Compose and Django](/compose/django/)
- [Quickstart: Compose and Rails](/compose/rails/)
- [Quickstart: Compose and WordPress](/compose/wordpress/)
See also [learn by example](/engine/tutorials/) tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.

View File

@ -24,7 +24,6 @@ Here is information about how to diagnose and troubleshoot problems, send logs a
If you encounter problems for which you do not find solutions in this documentation or on the [Docker for Windows forum](https://forums.docker.com/c/docker-for-windows), we can help you troubleshoot the log data. See [Diagnose and Feedback](index.md#diagnose-and-feedback) in the Getting Started topic.
<a name="logs"></a>
## Checking the Logs
In addition to using the diagnose and feedback option to submit logs, you can browse the logs yourself.
@ -38,7 +37,6 @@ To view Docker for Windows latest log, click on the `Diagnose & Feedback` menu e
If you encounter an issue and the suggested troubleshoot procedures outlined below don't fix it you can generate a diagnostics report. Click on the `Diagnose & Feedback` menu entry in the systray and then on the `Upload diagnostic...` link. This will upload diagnostics to our server and provide you with a unique ID you can use in email or the forum to reference the upload.
<a name="troubleshoot"></a>
## Troubleshooting
### inotify on shared drives does not work
@ -104,7 +102,7 @@ Docker 1.12.0 RC3 release introduces a backward incompatible change from RC2 to
You may get the following error when you try to start a container created with pre-Beta 18 Docker for Windows applications.
Error response from daemon: Unknown runtime specified default
Error response from daemon: Unknown runtime specified default
You can fix this by either [recreating](troubleshoot.md#recreate-your-containers) or [updating](troubleshoot.md#update-your-containers) your containers.
@ -114,32 +112,34 @@ If you get the error message shown above, we recommend recreating them.
To recreate your containers, use Docker Compose.
docker-compose down && docker-compose up
docker-compose down && docker-compose up
#### Update your containers
To fix existing containers, follow these steps.
1. Run this command.
1. Run this command.
$ docker run --rm -v /var/lib/docker:/docker cpuguy83/docker112rc3-runtimefix:rc3
```bash
$ docker run --rm -v /var/lib/docker:/docker cpuguy83/docker112rc3-runtimefix:rc3
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
91e7f9981d55: Pull complete
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
91e7f9981d55: Pull complete
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
```
2. Quit Docker.
@ -147,10 +147,12 @@ To fix existing containers, follow these steps.
> **Note:** Be sure to quit and then restart Docker for Windows before attempting to start containers.
4. Try to start the container again:
4. Try to start the container again:
$ docker start old-container
old-container
```bash
$ docker start old-container
old-container
```
### Hyper-V
Docker for Windows requires a Hyper-V as well as the Hyper-V Module for Windows Powershell to be installed and enabled. See [these instructions](https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/quick_start/walkthrough_install) to install Hyper-V manually. A reboot is *required*. If you install Hyper-V without the reboot, Docker for Windows will not work correctly. On some systems, Virtualization needs to be enabled in the BIOS. The steps to do so are Vendor specific, but typically the BIOS option is called `Virtualization Technology (VTx)` or similar.
@ -189,8 +191,8 @@ You might have stale NAT configurations on the system. You should remove them wi
You might have stale Network Adapters on the system. You should remove them with the following commands on an elevated Powershell prompt:
$vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "Broken Docker Adapter"
$vmNetAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName DockerNAT
Get-NetAdapter "vEthernet (DockerNAT)" | ? { $_.DeviceID -ne $vmNetAdapter.DeviceID } | Disable-NetAdapter -Confirm:$False -PassThru | Rename-NetAdapter -NewName "Broken Docker Adapter"
Then you can remove them manually via the `devmgmt.msc` (aka Device Manager). You should see them as disabled Hyper-V Virtual Ethernet Adapter under the Network Adapter section. A right-click and selecting **uninstall** should remove the adapter.

View File

@ -22,7 +22,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 to 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)
@ -78,15 +78,15 @@ Make sure Docker is running. On Docker for Mac and Docker for Windows, this is i
-----
\
\
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
The first time you run a software image, the `docker` command looks for it
on your local system. If the image isn't there, then `docker` gets it from
@ -120,15 +120,15 @@ Make sure Docker is running. On Docker for Mac and Docker for Windows, this is i
---------
\
\
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
\
## .
## ## ## ==
## ## ## ## ===
/""""""""""""""""___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\______/
## Where to go next

View File

@ -50,13 +50,13 @@ which also installs via the `yum` package manager.
1. Log into your machine as a user with `sudo` or `root` privileges.
2. Make sure your existing packages are up-to-date.
2. Make sure your existing packages are up-to-date.
```bash
$ sudo yum update
```
3. Add the `yum` repo.
3. Add the `yum` repo.
```bash
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
@ -69,19 +69,19 @@ which also installs via the `yum` package manager.
EOF
```
4. Install the Docker package.
4. Install the Docker package.
```bash
$ sudo yum install docker-engine
```
5. Enable the service.
5. Enable the service.
```bash
$ sudo systemctl enable docker.service
```
6. Start the Docker daemon.
6. Start the Docker daemon.
```bash
$ sudo systemctl start docker
@ -125,13 +125,13 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
1. Log into your machine as a user with `sudo` or `root` privileges.
2. Make sure your existing packages are up-to-date.
2. Make sure your existing packages are up-to-date.
```bash
$ sudo yum update
```
3. Run the Docker installation script.
3. Run the Docker installation script.
```bash
$ curl -fsSL https://get.docker.com/ | sh
@ -139,19 +139,19 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
This script adds the `docker.repo` repository and installs Docker.
4. Enable the service.
4. Enable the service.
```bash
$ sudo systemctl enable docker.service
```
5. Start the Docker daemon.
5. Start the Docker daemon.
```bash
$ sudo systemctl start docker
```
6. Verify `docker` is installed correctly by running a test image in a container.
6. Verify `docker` is installed correctly by running a test image in a container.
```bash
$ sudo docker run hello-world
@ -179,23 +179,23 @@ To create the `docker` group and add your user:
1. Log into your machine as a user with `sudo` or `root` privileges.
2. Create the `docker` group.
2. Create the `docker` group.
```bash
$ sudo groupadd docker
```
3. Add your user to `docker` group.
3. Add your user to `docker` group.
```bash
$ sudo usermod -aG docker your_username`
```
4. Log out and log back in.
4. Log out and log back in.
This ensures your user is running with the correct permissions.
5. Verify that your user is in the docker group by running `docker` without `sudo`.
5. Verify that your user is in the docker group by running `docker` without `sudo`.
```bash
$ docker run hello-world
@ -213,7 +213,7 @@ $ sudo systemctl enable docker
You can uninstall the Docker software with `yum`.
1. List the installed Docker packages.
1. List the installed Docker packages.
```bash
$ yum list installed | grep docker
@ -221,7 +221,7 @@ You can uninstall the Docker software with `yum`.
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
```
2. Remove the package.
2. Remove the package.
```bash
$ sudo yum -y remove docker-engine.x86_64
@ -230,7 +230,7 @@ You can uninstall the Docker software with `yum`.
This command does not remove images, containers, volumes, or user-created
configuration files on your host.
3. To delete all images, containers, and volumes, run the following command:
3. To delete all images, containers, and volumes, run the following command:
```bash
$ rm -rf /var/lib/docker

View File

@ -48,13 +48,13 @@ which also installs via the `dnf` package manager.
1. Log into your machine as a user with `sudo` or `root` privileges.
2. Make sure your existing packages are up-to-date.
2. Make sure your existing packages are up-to-date.
```bash
$ sudo dnf update
```
3. Add the `yum` repo.
3. Add the `yum` repo.
```bash
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
@ -67,19 +67,19 @@ which also installs via the `dnf` package manager.
EOF
```
4. Install the Docker package.
4. Install the Docker package.
```bash
$ sudo dnf install docker-engine
```
5. Enable the service.
5. Enable the service.
```bash
$ sudo systemctl enable docker.service
```
6. Start the Docker daemon.
6. Start the Docker daemon.
```bash
$ sudo systemctl start docker
@ -125,13 +125,13 @@ You use the same installation procedure for all versions of Fedora.
1. Log into your machine as a user with `sudo` or `root` privileges.
2. Make sure your existing packages are up-to-date.
2. Make sure your existing packages are up-to-date.
```bash
$ sudo dnf update
```
3. Run the Docker installation script.
3. Run the Docker installation script.
```bash
$ curl -fsSL https://get.docker.com/ | sh
@ -139,19 +139,19 @@ You use the same installation procedure for all versions of Fedora.
This script adds the `docker.repo` repository and installs Docker.
4. Enable the service.
4. Enable the service.
```bash
$ sudo systemctl enable docker.service
```
5. Start the Docker daemon.
5. Start the Docker daemon.
```bash
$ sudo systemctl start docker
```
6. Verify `docker` is installed correctly by running a test image in a container.
6. Verify `docker` is installed correctly by running a test image in a container.
```bash
$ sudo docker run hello-world
@ -179,13 +179,13 @@ To create the `docker` group and add your user:
1. Log into your machine as a user with `sudo` or `root` privileges.
2. Create the `docker` group.
2. Create the `docker` group.
```bash
$ sudo groupadd docker
```
3. Add your user to `docker` group.
3. Add your user to `docker` group.
```bash
$ sudo usermod -aG docker your_username`
@ -195,7 +195,7 @@ To create the `docker` group and add your user:
This ensures your user is running with the correct permissions.
5. Verify that your user is in the docker group by running `docker` without `sudo`.
5. Verify that your user is in the docker group by running `docker` without `sudo`.
```bash
$ docker run hello-world
@ -232,7 +232,7 @@ This configuration allows IP forwarding from the container as expected.
You can uninstall the Docker software with `dnf`.
1. List the installed Docker packages.
1. List the installed Docker packages.
```bash
$ dnf list installed | grep docker
@ -240,7 +240,7 @@ You can uninstall the Docker software with `dnf`.
docker-engine.x86_64 1.7.1-0.1.fc21 @/docker-engine-1.7.1-0.1.fc21.el7.x86_64
```
2. Remove the package.
2. Remove the package.
```bash
$ sudo dnf -y remove docker-engine.x86_64
@ -249,7 +249,7 @@ You can uninstall the Docker software with `dnf`.
This command does not remove images, containers, volumes, or user-created
configuration files on your host.
3. To delete all images, containers, and volumes, run the following command:
3. To delete all images, containers, and volumes, run the following command:
```bash
$ rm -rf /var/lib/docker

View File

@ -60,7 +60,7 @@ creating an os-provided bundled certificate chain.
## Creating the client certificates
You will use OpenSSL's `genrsa` and `req` commands to first generate an RSA
key and then use the key to create the certificate.
key and then use the key to create the certificate.
$ openssl genrsa -out client.key 4096
$ openssl req -new -x509 -text -key client.key -out client.cert
@ -72,7 +72,7 @@ key and then use the key to create the certificate.
## Troubleshooting tips
The Docker daemon interprets ``.crt` files as CA certificates and `.cert` files
The Docker daemon interprets `.crt` files as CA certificates and `.cert` files
as client certificates. If a CA certificate is accidentally given the extension
`.cert` instead of the correct `.crt` extension, the Docker daemon logs the
following error message:

View File

@ -138,8 +138,8 @@ Swarm mode lets you network services in a couple of ways:
### Publish ports externally to the swarm
You publish service ports externally to the swarm using the `--publish
<TARGET-PORT>:<SERVICE-PORT>` flag. When you publish a service port, the swarm
You publish service ports externally to the swarm using the `--publish<TARGET-PORT>:<SERVICE-PORT>`
flag. When you publish a service port, the swarm
makes the service accessible at the target port on every node regardless if
there is a task for the service running on the node.

View File

@ -18,7 +18,7 @@ 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`.
2. Run the command produced by the `docker swarm init` output from the
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
@ -45,7 +45,7 @@ This tutorial uses the name `worker1`.
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
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:
@ -57,7 +57,7 @@ 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
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

View File

@ -19,17 +19,17 @@ machines.
1. Open a terminal and ssh into the machine where you want to run your manager
node. For example, the tutorial uses a machine named `manager1`.
2. Run the following command to create a new swarm:
2. Run the following command to create a new swarm:
```bash
docker swarm init --advertise-addr <MANAGER-IP>
```
>**Note:** If you are using Docker for Mac or Docker for Windows to test
single-node swarm, simply run `docker swarm init` with no arguments. There is no
need to specify ` --advertise-addr` in this case. To learn more, see the topic
on how to [Use Docker for Mac or Docker for
Windows](index.md#use-docker-for-mac-or-docker-for-windows) with Swarm.
single-node swarm, simply run `docker swarm init` with no arguments. There is no
need to specify `--advertise-addr` in this case. To learn more, see the topic
on how to [Use Docker for Mac or Docker for
Windows](index.md#use-docker-for-mac-or-docker-for-windows) with Swarm.
In the tutorial, the following command creates a swarm on the `manager1`
machine:
@ -55,7 +55,7 @@ Windows](index.md#use-docker-for-mac-or-docker-for-windows) with Swarm.
join as managers or workers depending on the value for the `--token`
flag.
2. Run `docker info` to view the current state of the swarm:
2. Run `docker info` to view the current state of the swarm:
```bash
$ docker info
@ -73,7 +73,7 @@ Windows](index.md#use-docker-for-mac-or-docker-for-windows) with Swarm.
...snip...
```
3. Run the `docker node ls` command to view information about nodes:
3. Run the `docker node ls` command to view information about nodes:
```bash
$ docker node ls

View File

@ -19,7 +19,7 @@ you can delete the service from the swarm.
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.
```
$ docker service rm helloworld
@ -27,7 +27,7 @@ run your manager node. For example, the tutorial uses a machine named
helloworld
```
3. Run `docker service inspect <SERVICE-ID>` to verify that the swarm manager
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:
```

View File

@ -19,7 +19,7 @@ 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`.
2. Run the the following command:
2. Run the the following command:
```bash
$ docker service create --replicas 1 --name helloworld alpine ping docker.com
@ -33,7 +33,7 @@ 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:
```
$ docker service ls

View File

@ -25,7 +25,7 @@ node and launches replica tasks on a node with `ACTIVE` availability.
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
@ -36,7 +36,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
@ -45,7 +45,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
@ -60,7 +60,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
@ -69,7 +69,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
@ -84,7 +84,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
@ -101,7 +101,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
@ -110,18 +110,18 @@ 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:
ID: 38ciaotwjuritcdtn9npbnkuz
Hostname: worker1
Status:
State: Ready
Availability: Active
...snip...
```
...snip...
```
When you set the node back to `Active` availability, it can receive new tasks:

View File

@ -19,7 +19,7 @@ the Docker CLI to see details about the service running in the swarm.
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
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:
@ -42,7 +42,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.
```
```json
$ docker service inspect helloworld
[
{
@ -91,7 +91,7 @@ about a service in an easily readable format.
]
```
4. Run `docker service ps <SERVICE-ID>` to see which nodes are running the
4. Run `docker service ps <SERVICE-ID>` to see which nodes are running the
service:
```
@ -109,7 +109,7 @@ 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
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,

View File

@ -21,7 +21,7 @@ Redis 3.0.7 container image using rolling updates.
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
2. Deploy Redis 3.0.6 to the swarm and configure the swarm with a 10 second
update delay:
```bash
@ -52,7 +52,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
@ -71,7 +71,7 @@ update delay:
Resources:
```
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
@ -89,7 +89,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
@ -133,7 +133,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

@ -20,7 +20,7 @@ the swarm.
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
2. Run the following command to change the desired state of the
service running in the swarm:
```bash
@ -35,7 +35,7 @@ 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:
```
$ docker service ps helloworld
@ -52,7 +52,7 @@ 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
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`:
```