mirror of https://github.com/docker/docs.git
Rendering fixes, part 1 (up through cs-engine)
This commit is contained in:
parent
39055aeab4
commit
a0ee6c6004
|
@ -36,19 +36,19 @@ to update its RHEL kernel.
|
||||||
|
|
||||||
1. Log into the system as a user with root or sudo permissions.
|
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
|
```bash
|
||||||
$ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
|
$ 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
|
```bash
|
||||||
$ sudo yum install -y yum-utils
|
$ sudo yum install -y yum-utils
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Add the Docker repository:
|
4. Add the Docker repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
|
$ 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
|
This adds the repository of the latest version of CS Docker Engine. You can
|
||||||
customize the URL to install an older version.
|
customize the URL to install an older version.
|
||||||
|
|
||||||
5. Install Docker CS Engine:
|
5. Install Docker CS Engine:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum install docker-engine
|
$ 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
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ sudo systemctl enable docker.service
|
||||||
$ sudo systemctl start docker.service
|
$ sudo systemctl start docker.service
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Confirm the Docker daemon is running:
|
7. Confirm the Docker daemon is running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker info
|
$ 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.
|
to the `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -89,19 +89,19 @@ to the `docker` group.
|
||||||
|
|
||||||
1. Log into the system as a user with root or sudo permissions.
|
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
|
```bash
|
||||||
$ curl -s 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add --import
|
$ 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
|
```bash
|
||||||
$ sudo apt-get update && sudo apt-get install apt-transport-https
|
$ 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
|
```bash
|
||||||
$ sudo apt-get install -y linux-image-extra-virtual
|
$ 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.
|
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
|
```bash
|
||||||
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
|
$ 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-vivid (Ubuntu 15.04)
|
||||||
* ubuntu-wily (Ubuntu 15.10)
|
* 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:
|
dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -141,7 +141,7 @@ dependencies:
|
||||||
$ sudo docker info
|
$ 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.
|
user to the `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -155,14 +155,14 @@ user to the `docker` group.
|
||||||
|
|
||||||
1. Log into the system as a user with root or sudo permissions.
|
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:
|
are available:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo zypper ref
|
$ sudo zypper ref
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Add the Docker repository and public key:
|
3. Add the Docker repository and public key:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.12
|
$ 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
|
This adds the repository of the latest version of CS Docker Engine. You can
|
||||||
customize the URL to install an older version.
|
customize the URL to install an older version.
|
||||||
|
|
||||||
4. Install the Docker daemon package:
|
4. Install the Docker daemon package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo zypper install docker-engine
|
$ 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
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ sudo systemctl enable docker.service
|
||||||
$ sudo systemctl start docker.service
|
$ sudo systemctl start docker.service
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Confirm the Docker daemon is running:
|
6. Confirm the Docker daemon is running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker info
|
$ 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.
|
to the `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -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:
|
>**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
|
* 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:
|
For example, you see will failures such as:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
[root@dtr ~]# docker -v
|
[root@dtr ~]# docker -v
|
||||||
Docker version 1.6.0-cs2, build b8dd430
|
Docker version 1.6.0-cs2, build b8dd430
|
||||||
[root@dtr ~]# ping dtr.home.org.au
|
[root@dtr ~]# ping dtr.home.org.au
|
||||||
PING dtr.home.org.au (10.10.10.104) 56(84) bytes of data.
|
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
|
64 bytes from dtr.home.gateway (10.10.10.104): icmp_seq=1 ttl=64 time=0.663 ms
|
||||||
^C
|
^C
|
||||||
--- dtr.home.org.au ping statistics ---
|
--- dtr.home.org.au ping statistics ---
|
||||||
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
|
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
|
||||||
rtt min/avg/max/mdev = 0.078/0.370/0.663/0.293 ms
|
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
|
[root@dtr ~]# docker run --rm -it debian ping dtr.home.org.au
|
||||||
ping: unknown host
|
ping: unknown host
|
||||||
[root@dtr ~]# docker run --rm -it debian cat /etc/resolv.conf
|
[root@dtr ~]# docker run --rm -it debian cat /etc/resolv.conf
|
||||||
cat: /etc/resolv.conf: Permission denied
|
cat: /etc/resolv.conf: Permission denied
|
||||||
[root@dtr ~]# docker run --rm -it debian apt-get update
|
[root@dtr ~]# docker run --rm -it debian apt-get update
|
||||||
Err http://httpredir.debian.org jessie InRelease
|
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
|
Err http://security.debian.org jessie/updates Release.gpg
|
||||||
Could not resolve 'security.debian.org'
|
Could not resolve 'security.debian.org'
|
||||||
Err http://httpredir.debian.org jessie Release.gpg
|
Err http://httpredir.debian.org jessie Release.gpg
|
||||||
Could not resolve 'httpredir.debian.org'
|
Could not resolve 'httpredir.debian.org'
|
||||||
Err http://httpredir.debian.org jessie-updates Release.gpg
|
Err http://httpredir.debian.org jessie-updates Release.gpg
|
||||||
Could not resolve 'httpredir.debian.org'
|
Could not resolve 'httpredir.debian.org'
|
||||||
[output truncated]
|
[output truncated]
|
||||||
|
```
|
||||||
```
|
|
||||||
|
|
||||||
or when running a `docker build`:
|
or when running a `docker build`:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
[root@dtr ~]# docker build .
|
[root@dtr ~]# docker build .
|
||||||
Sending build context to Docker daemon 11.26 kB
|
Sending build context to Docker daemon 11.26 kB
|
||||||
Sending build context to Docker daemon
|
Sending build context to Docker daemon
|
||||||
Step 0 : FROM fedora
|
Step 0 : FROM fedora
|
||||||
---> e26efd418c48
|
---> e26efd418c48
|
||||||
Step 1 : RUN yum install httpd
|
Step 1 : RUN yum install httpd
|
||||||
---> Running in cf274900ea35
|
---> Running in cf274900ea35
|
||||||
|
|
||||||
One of the configured repositories failed (Fedora 21 - x86_64),
|
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
|
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:
|
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
|
**Affected Versions**: All previous versions of Docker Engine when SELinux is
|
||||||
enabled.
|
enabled.
|
||||||
|
@ -200,7 +199,7 @@ where SELinux is typically required.
|
||||||
|
|
||||||
The second option is to pass the following parameter in to `docker run`.
|
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.
|
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
|
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:
|
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
|
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
|
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
|
read-only into the container, do the following to create and test your
|
||||||
bind-mount:
|
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
|
For example, if your container is `bashful_curie`, open a shell on the
|
||||||
container:
|
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
|
```bash
|
||||||
the contents of foobar appear
|
$ cat /foobar.txt
|
||||||
|
the contents of foobar appear
|
||||||
|
```
|
||||||
|
|
||||||
If you see the file's contents, your mount succeeded. If you receive a
|
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
|
`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.
|
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.
|
Recheck your command line to make sure you passed in the `z` option.
|
||||||
|
|
||||||
|
|
|
@ -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
|
### CentOS 7.1 & RHEL 7.0/7.1
|
||||||
Use these instructions to upgrade YUM-based systems.
|
Use these instructions to upgrade YUM-based systems.
|
||||||
|
|
||||||
1. Update your docker-engine package:
|
1. Update your docker-engine package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum upgrade docker-engine
|
$ sudo yum upgrade docker-engine
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Check that the CS Docker Engine is running:
|
2. Check that the CS Docker Engine is running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker info
|
$ sudo docker info
|
||||||
|
@ -50,13 +50,13 @@ Use these instructions to upgrade YUM-based systems.
|
||||||
### Ubuntu 14.04 LTS
|
### Ubuntu 14.04 LTS
|
||||||
Use these instructions to upgrade APT-based systems.
|
Use these instructions to upgrade APT-based systems.
|
||||||
|
|
||||||
1. Update your docker-engine package:
|
1. Update your docker-engine package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo apt-get update && sudo apt-get upgrade docker-engine
|
$ 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
|
```bash
|
||||||
$ sudo docker info
|
$ sudo docker info
|
||||||
|
@ -64,13 +64,13 @@ Use these instructions to upgrade APT-based systems.
|
||||||
|
|
||||||
### SUSE Enterprise 12.3
|
### SUSE Enterprise 12.3
|
||||||
|
|
||||||
1. Update your docker-engine package:
|
1. Update your docker-engine package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo zypper upgrade docker-engine
|
$ sudo zypper upgrade docker-engine
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Check that the CS Docker Engine is running:
|
2. Check that the CS Docker Engine is running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker info
|
$ 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
|
### CentOS 7.1 & RHEL 7.0/7.1
|
||||||
Use these instructions to upgrade YUM-based systems.
|
Use these instructions to upgrade YUM-based systems.
|
||||||
|
|
||||||
1. Add the Docker Engine repository.
|
1. Add the Docker Engine repository.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
|
$ 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
|
This adds the repository of the latest version of CS Docker Engine. You can
|
||||||
customize the URL to install other versions.
|
customize the URL to install other versions.
|
||||||
|
|
||||||
2. Install the new package:
|
2. Install the new package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum update docker-engine
|
$ sudo yum update docker-engine
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Check that the CS Engine is running:
|
3. Check that the CS Engine is running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker info
|
$ sudo docker info
|
||||||
|
@ -111,7 +111,7 @@ Use these instructions to upgrade YUM-based systems.
|
||||||
Use these instructions to update APT-based systems.
|
Use these instructions to update APT-based systems.
|
||||||
|
|
||||||
|
|
||||||
1. Add the docker engine repository.
|
1. Add the docker engine repository.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
|
$ 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-vivid (Ubuntu 15.04)
|
||||||
* ubuntu-wily (Ubuntu 15.10)
|
* ubuntu-wily (Ubuntu 15.10)
|
||||||
|
|
||||||
2. Update your docker-engine package.
|
2. Update your docker-engine package.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo apt-get update && sudo apt-get upgrade docker-engine
|
$ 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
|
```bash
|
||||||
$ sudo docker info
|
$ sudo docker info
|
||||||
|
@ -144,22 +144,22 @@ Use these instructions to update APT-based systems.
|
||||||
|
|
||||||
#### SUSE Enterprise 12.3
|
#### SUSE Enterprise 12.3
|
||||||
|
|
||||||
1. Add the docker engine repository.
|
1. Add the docker engine repository.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.12
|
$ 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
|
This adds the repository of the latest version of CS Docker Engine. You
|
||||||
can customize the URL to install other versions.
|
can customize the URL to install other versions.
|
||||||
|
|
||||||
2. Install the new package:
|
2. Install the new package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo zypper update docker-engine
|
$ sudo zypper update docker-engine
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Check that the CS Engine is running:
|
3. Check that the CS Engine is running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo docker info
|
$ sudo docker info
|
||||||
|
@ -175,25 +175,25 @@ then install the latest version.
|
||||||
### CentOS 7.1 & RHEL 7.0/7.1
|
### CentOS 7.1 & RHEL 7.0/7.1
|
||||||
Use these instructions to upgrade YUM-based systems.
|
Use these instructions to upgrade YUM-based systems.
|
||||||
|
|
||||||
1. Remove the current CS Engine:
|
1. Remove the current CS Engine:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum remove docker-engine-cs
|
$ 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
|
```bash
|
||||||
$ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
|
$ 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
|
```bash
|
||||||
$ sudo yum install -y yum-utils
|
$ 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
|
```bash
|
||||||
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
|
$ 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
|
This adds the repository of the latest version of CS Docker Engine. You
|
||||||
can customize the URL to install other versions.
|
can customize the URL to install other versions.
|
||||||
|
|
||||||
5. Install the new package:
|
5. Install the new package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum install docker-engine
|
$ 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
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ 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.
|
Use these instructions to update APT-based systems.
|
||||||
|
|
||||||
|
|
||||||
1. Remove the current Engine:
|
1. Remove the current Engine:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo apt-get remove docker-engine-cs
|
$ 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
|
```bash
|
||||||
$ curl -s 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add --import
|
$ 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
|
```bash
|
||||||
$ sudo apt-get update && sudo apt-get install apt-transport-https
|
$ 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
|
```bash
|
||||||
$ sudo apt-get install -y linux-image-extra-virtual
|
$ 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.
|
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
|
```bash
|
||||||
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
|
$ 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)
|
* ubuntu-wily (Ubuntu 15.10)
|
||||||
|
|
||||||
|
|
||||||
6. Install the upgraded package:
|
6. Install the upgraded package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo apt-get upgrade docker-engine
|
$ sudo apt-get upgrade docker-engine
|
||||||
|
|
|
@ -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.
|
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>
|
- [Quickstart: Compose and Django](/compose/django/)
|
||||||
|
- [Quickstart: Compose and Rails](/compose/rails/)
|
||||||
<a href=https://docs.docker.com/compose/rails/ target="_blank">Quickstart: Compose and Rails</a>
|
- [Quickstart: Compose and WordPress](/compose/wordpress/)
|
||||||
|
|
||||||
<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.
|
See also [learn by example](/engine/tutorials/index.md) tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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>
|
- [Quickstart: Compose and Django](/compose/django/)
|
||||||
|
- [Quickstart: Compose and Rails](/compose/rails/)
|
||||||
<a href=https://docs.docker.com/compose/rails/ target="_blank">Quickstart: Compose and Rails</a>
|
- [Quickstart: Compose and WordPress](/compose/wordpress/)
|
||||||
|
|
||||||
<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.
|
|
||||||
|
|
||||||
|
See also [learn by example](/engine/tutorials/) tutorials on building images, running containers, networking, managing data, and storing images on Docker Hub.
|
||||||
|
|
|
@ -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.
|
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
|
## Checking the Logs
|
||||||
|
|
||||||
In addition to using the diagnose and feedback option to submit logs, you can browse the logs yourself.
|
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.
|
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
|
## Troubleshooting
|
||||||
|
|
||||||
### inotify on shared drives does not work
|
### 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.
|
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.
|
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.
|
To recreate your containers, use Docker Compose.
|
||||||
|
|
||||||
docker-compose down && docker-compose up
|
docker-compose down && docker-compose up
|
||||||
|
|
||||||
#### Update your containers
|
#### Update your containers
|
||||||
|
|
||||||
To fix existing containers, follow these steps.
|
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
|
Unable to find image 'cpuguy83/docker112rc3-runtimefix:rc3' locally
|
||||||
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
|
rc3: Pulling from cpuguy83/docker112rc3-runtimefix
|
||||||
91e7f9981d55: Pull complete
|
91e7f9981d55: Pull complete
|
||||||
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
|
Digest: sha256:96abed3f7a7a574774400ff20c6808aac37d37d787d1164d332675392675005c
|
||||||
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
|
Status: Downloaded newer image for cpuguy83/docker112rc3-runtimefix:rc3
|
||||||
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
|
proccessed 1648f773f92e8a4aad508a45088ca9137c3103457b48be1afb3fd8b4369e5140
|
||||||
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
|
skipping container '433ba7ead89ba645efe9b5fff578e674aabba95d6dcb3910c9ad7f1a5c6b4538': already fixed
|
||||||
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
|
proccessed 43df7f2ac8fc912046dfc48cf5d599018af8f60fee50eb7b09c1e10147758f06
|
||||||
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
|
proccessed 65204cfa00b1b6679536c6ac72cdde1dbb43049af208973030b6d91356166958
|
||||||
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
|
proccessed 66a72622e306450fd07f2b3a833355379884b7a6165b7527c10390c36536d82d
|
||||||
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
|
proccessed 9d196e78390eeb44d3b354d24e25225d045f33f1666243466b3ed42fe670245c
|
||||||
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
|
proccessed b9a0ecfe2ed9d561463251aa90fd1442299bcd9ea191a17055b01c6a00533b05
|
||||||
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
|
proccessed c129a775c3fa3b6337e13b50aea84e4977c1774994be1f50ff13cbe60de9ac76
|
||||||
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
|
proccessed dea73dc21126434f14c58b83140bf6470aa67e622daa85603a13bc48af7f8b04
|
||||||
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
|
proccessed dfa8f9278642ab0f3e82ee8e4ad029587aafef9571ff50190e83757c03b4216c
|
||||||
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
|
proccessed ee5bf706b6600a46e5d26327b13c3c1c5f7b261313438d47318702ff6ed8b30b
|
||||||
|
```
|
||||||
|
|
||||||
2. Quit Docker.
|
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.
|
> **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
|
```bash
|
||||||
old-container
|
$ docker start old-container
|
||||||
|
old-container
|
||||||
|
```
|
||||||
|
|
||||||
### Hyper-V
|
### 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.
|
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:
|
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
|
$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"
|
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.
|
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.
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ image you'll use in the rest of this getting started.
|
||||||
|
|
||||||
## Step 1: Locate the whalesay image
|
## 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).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -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
|
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
|
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
|
## Where to go next
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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
|
```bash
|
||||||
$ sudo yum update
|
$ sudo yum update
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Add the `yum` repo.
|
3. Add the `yum` repo.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||||
|
@ -69,19 +69,19 @@ which also installs via the `yum` package manager.
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Install the Docker package.
|
4. Install the Docker package.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo yum install docker-engine
|
$ sudo yum install docker-engine
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Enable the service.
|
5. Enable the service.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ sudo systemctl enable docker.service
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Start the Docker daemon.
|
6. Start the Docker daemon.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl start docker
|
$ 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.
|
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
|
```bash
|
||||||
$ sudo yum update
|
$ sudo yum update
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the Docker installation script.
|
3. Run the Docker installation script.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl -fsSL https://get.docker.com/ | sh
|
$ 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.
|
This script adds the `docker.repo` repository and installs Docker.
|
||||||
|
|
||||||
4. Enable the service.
|
4. Enable the service.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ sudo systemctl enable docker.service
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Start the Docker daemon.
|
5. Start the Docker daemon.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl start docker
|
$ 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
|
```bash
|
||||||
$ sudo docker run hello-world
|
$ 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.
|
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||||
|
|
||||||
2. Create the `docker` group.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo groupadd docker
|
$ sudo groupadd docker
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Add your user to `docker` group.
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo usermod -aG docker your_username`
|
$ 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.
|
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
|
```bash
|
||||||
$ docker run hello-world
|
$ docker run hello-world
|
||||||
|
@ -213,7 +213,7 @@ $ sudo systemctl enable docker
|
||||||
|
|
||||||
You can uninstall the Docker software with `yum`.
|
You can uninstall the Docker software with `yum`.
|
||||||
|
|
||||||
1. List the installed Docker packages.
|
1. List the installed Docker packages.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ yum list installed | grep docker
|
$ 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
|
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
|
```bash
|
||||||
$ sudo yum -y remove docker-engine.x86_64
|
$ 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
|
This command does not remove images, containers, volumes, or user-created
|
||||||
configuration files on your host.
|
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
|
```bash
|
||||||
$ rm -rf /var/lib/docker
|
$ rm -rf /var/lib/docker
|
||||||
|
|
|
@ -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.
|
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
|
```bash
|
||||||
$ sudo dnf update
|
$ sudo dnf update
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Add the `yum` repo.
|
3. Add the `yum` repo.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
|
||||||
|
@ -67,19 +67,19 @@ which also installs via the `dnf` package manager.
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Install the Docker package.
|
4. Install the Docker package.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo dnf install docker-engine
|
$ sudo dnf install docker-engine
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Enable the service.
|
5. Enable the service.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ sudo systemctl enable docker.service
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Start the Docker daemon.
|
6. Start the Docker daemon.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl start docker
|
$ 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.
|
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
|
```bash
|
||||||
$ sudo dnf update
|
$ sudo dnf update
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the Docker installation script.
|
3. Run the Docker installation script.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ curl -fsSL https://get.docker.com/ | sh
|
$ 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.
|
This script adds the `docker.repo` repository and installs Docker.
|
||||||
|
|
||||||
4. Enable the service.
|
4. Enable the service.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl enable docker.service
|
$ sudo systemctl enable docker.service
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Start the Docker daemon.
|
5. Start the Docker daemon.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo systemctl start docker
|
$ 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
|
```bash
|
||||||
$ sudo docker run hello-world
|
$ 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.
|
1. Log into your machine as a user with `sudo` or `root` privileges.
|
||||||
|
|
||||||
2. Create the `docker` group.
|
2. Create the `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo groupadd docker
|
$ sudo groupadd docker
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Add your user to `docker` group.
|
3. Add your user to `docker` group.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo usermod -aG docker your_username`
|
$ 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.
|
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
|
```bash
|
||||||
$ docker run hello-world
|
$ 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`.
|
You can uninstall the Docker software with `dnf`.
|
||||||
|
|
||||||
1. List the installed Docker packages.
|
1. List the installed Docker packages.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ dnf list installed | grep docker
|
$ 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
|
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
|
```bash
|
||||||
$ sudo dnf -y remove docker-engine.x86_64
|
$ 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
|
This command does not remove images, containers, volumes, or user-created
|
||||||
configuration files on your host.
|
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
|
```bash
|
||||||
$ rm -rf /var/lib/docker
|
$ rm -rf /var/lib/docker
|
||||||
|
|
|
@ -60,7 +60,7 @@ creating an os-provided bundled certificate chain.
|
||||||
## Creating the client certificates
|
## Creating the client certificates
|
||||||
|
|
||||||
You will use OpenSSL's `genrsa` and `req` commands to first generate an RSA
|
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 genrsa -out client.key 4096
|
||||||
$ openssl req -new -x509 -text -key client.key -out client.cert
|
$ 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
|
## 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
|
as client certificates. If a CA certificate is accidentally given the extension
|
||||||
`.cert` instead of the correct `.crt` extension, the Docker daemon logs the
|
`.cert` instead of the correct `.crt` extension, the Docker daemon logs the
|
||||||
following error message:
|
following error message:
|
||||||
|
|
|
@ -138,8 +138,8 @@ Swarm mode lets you network services in a couple of ways:
|
||||||
|
|
||||||
### Publish ports externally to the swarm
|
### Publish ports externally to the swarm
|
||||||
|
|
||||||
You publish service ports externally to the swarm using the `--publish
|
You publish service ports externally to the swarm using the `--publish<TARGET-PORT>:<SERVICE-PORT>`
|
||||||
<TARGET-PORT>:<SERVICE-PORT>` flag. When you publish a service port, the swarm
|
flag. When you publish a service port, the swarm
|
||||||
makes the service accessible at the target port on every node regardless if
|
makes the service accessible at the target port on every node regardless if
|
||||||
there is a task for the service running on the node.
|
there is a task for the service running on the node.
|
||||||
|
|
||||||
|
|
|
@ -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.
|
1. Open a terminal and ssh into the machine where you want to run a worker node.
|
||||||
This tutorial uses the name `worker1`.
|
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:
|
[Create a swarm](create-swarm.md) tutorial step to create a worker node joined to the existing swarm:
|
||||||
|
|
||||||
```bash
|
```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
|
3. Open a terminal and ssh into the machine where you want to run a second
|
||||||
worker node. This tutorial uses the name `worker2`.
|
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
|
[Create a swarm](create-swarm.md) tutorial step to create a second worker node
|
||||||
joined to the existing swarm:
|
joined to the existing swarm:
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ joined to the existing swarm:
|
||||||
This node joined a swarm as a worker.
|
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:
|
the `docker node ls` command to see the worker nodes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -19,17 +19,17 @@ machines.
|
||||||
1. Open a terminal and ssh into the machine where you want to run your manager
|
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`.
|
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
|
```bash
|
||||||
docker swarm init --advertise-addr <MANAGER-IP>
|
docker swarm init --advertise-addr <MANAGER-IP>
|
||||||
```
|
```
|
||||||
|
|
||||||
>**Note:** If you are using Docker for Mac or Docker for Windows to test
|
>**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
|
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
|
need to specify `--advertise-addr` in this case. To learn more, see the topic
|
||||||
on how to [Use Docker for Mac or Docker for
|
on how to [Use Docker for Mac or Docker for
|
||||||
Windows](index.md#use-docker-for-mac-or-docker-for-windows) with Swarm.
|
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`
|
In the tutorial, the following command creates a swarm on the `manager1`
|
||||||
machine:
|
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`
|
join as managers or workers depending on the value for the `--token`
|
||||||
flag.
|
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
|
```bash
|
||||||
$ docker info
|
$ docker info
|
||||||
|
@ -73,7 +73,7 @@ Windows](index.md#use-docker-for-mac-or-docker-for-windows) with Swarm.
|
||||||
...snip...
|
...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
|
```bash
|
||||||
$ docker node ls
|
$ docker node ls
|
||||||
|
|
|
@ -19,7 +19,7 @@ you can delete the service from the swarm.
|
||||||
run your manager node. For example, the tutorial uses a machine named
|
run your manager node. For example, the tutorial uses a machine named
|
||||||
`manager1`.
|
`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
|
$ docker service rm helloworld
|
||||||
|
@ -27,7 +27,7 @@ run your manager node. For example, the tutorial uses a machine named
|
||||||
helloworld
|
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:
|
removed the service. The CLI returns a message that the service is not found:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -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
|
1. Open a terminal and ssh into the machine where you run your manager node. For
|
||||||
example, the tutorial uses a machine named `manager1`.
|
example, the tutorial uses a machine named `manager1`.
|
||||||
|
|
||||||
2. Run the the following command:
|
2. Run the the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker service create --replicas 1 --name helloworld alpine ping docker.com
|
$ 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
|
* The arguments `alpine ping docker.com` define the service as an Alpine
|
||||||
Linux container that executes the command `ping docker.com`.
|
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
|
$ docker service ls
|
||||||
|
|
|
@ -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
|
run your manager node. For example, the tutorial uses a machine named
|
||||||
`manager1`.
|
`manager1`.
|
||||||
|
|
||||||
2. Verify that all your nodes are actively available.
|
2. Verify that all your nodes are actively available.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker node ls
|
$ docker node ls
|
||||||
|
@ -36,7 +36,7 @@ run your manager node. For example, the tutorial uses a machine named
|
||||||
e216jshn25ckzbvmwlnh5jr3g * manager1 Ready Active Leader
|
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:
|
update](rolling-update.md) tutorial, start it now:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -45,7 +45,7 @@ update](rolling-update.md) tutorial, start it now:
|
||||||
c5uo6kdmzpon37mgj9mwglcfw
|
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:
|
tasks to different nodes:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -60,7 +60,7 @@ tasks to different nodes:
|
||||||
In this case the swarm manager distributed one task to each node. You may
|
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.
|
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:
|
had a task assigned to it:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -69,7 +69,7 @@ had a task assigned to it:
|
||||||
worker1
|
worker1
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Inspect the node to check its availability:
|
6. Inspect the node to check its availability:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker node inspect --pretty worker1
|
$ docker node inspect --pretty worker1
|
||||||
|
@ -84,7 +84,7 @@ had a task assigned to it:
|
||||||
|
|
||||||
The drained node shows `Drain` for `AVAILABILITY`.
|
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:
|
task assignments for the `redis` service:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -101,7 +101,7 @@ task assignments for the `redis` service:
|
||||||
with `Drain` availability and creating a new task on a node with `Active`
|
with `Drain` availability and creating a new task on a node with `Active`
|
||||||
availability.
|
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:
|
drained node to an active state:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -110,18 +110,18 @@ drained node to an active state:
|
||||||
worker1
|
worker1
|
||||||
```
|
```
|
||||||
|
|
||||||
9. Inspect the node to see the updated state:
|
9. Inspect the node to see the updated state:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker node inspect --pretty worker1
|
$ docker node inspect --pretty worker1
|
||||||
|
|
||||||
ID: 38ciaotwjuritcdtn9npbnkuz
|
ID: 38ciaotwjuritcdtn9npbnkuz
|
||||||
Hostname: worker1
|
Hostname: worker1
|
||||||
Status:
|
Status:
|
||||||
State: Ready
|
State: Ready
|
||||||
Availability: Active
|
Availability: Active
|
||||||
...snip...
|
...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:
|
||||||
|
|
||||||
|
|
|
@ -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
|
run your manager node. For example, the tutorial uses a machine named
|
||||||
`manager1`.
|
`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.
|
about a service in an easily readable format.
|
||||||
|
|
||||||
To see the details on the `helloworld` service:
|
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
|
>**Tip**: To return the service details in json format, run the same command
|
||||||
without the `--pretty` flag.
|
without the `--pretty` flag.
|
||||||
|
|
||||||
```
|
```json
|
||||||
$ docker service inspect helloworld
|
$ 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:
|
service:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -109,7 +109,7 @@ service:
|
||||||
task so you can see if tasks are running according to the service
|
task so you can see if tasks are running according to the service
|
||||||
definition.
|
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.
|
the container for the task.
|
||||||
|
|
||||||
>**Tip**: If `helloworld` is running on a node other than your manager node,
|
>**Tip**: If `helloworld` is running on a node other than your manager node,
|
||||||
|
|
|
@ -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
|
run your manager node. For example, the tutorial uses a machine named
|
||||||
`manager1`.
|
`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:
|
update delay:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -52,7 +52,7 @@ update delay:
|
||||||
`--update-failure-action` flag for `docker service create` or
|
`--update-failure-action` flag for `docker service create` or
|
||||||
`docker service update`.
|
`docker service update`.
|
||||||
|
|
||||||
3. Inspect the `redis` service:
|
3. Inspect the `redis` service:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker service inspect --pretty redis
|
$ docker service inspect --pretty redis
|
||||||
|
@ -71,7 +71,7 @@ update delay:
|
||||||
Resources:
|
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:
|
applies the update to nodes according to the `UpdateConfig` policy:
|
||||||
|
|
||||||
```bash
|
```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
|
* If, at any time during the update, a task returns `FAILED`, pause the
|
||||||
update.
|
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:
|
desired state:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -133,7 +133,7 @@ desired state:
|
||||||
To avoid repeating certain update failures, you may need to reconfigure the
|
To avoid repeating certain update failures, you may need to reconfigure the
|
||||||
service by passing flags to `docker service update`.
|
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
|
```bash
|
||||||
$ docker service ps redis
|
$ docker service ps redis
|
||||||
|
|
|
@ -20,7 +20,7 @@ the swarm.
|
||||||
run your manager node. For example, the tutorial uses a machine named
|
run your manager node. For example, the tutorial uses a machine named
|
||||||
`manager1`.
|
`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:
|
service running in the swarm:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -35,7 +35,7 @@ service running in the swarm:
|
||||||
helloworld scaled to 5
|
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
|
$ docker service ps helloworld
|
||||||
|
@ -52,7 +52,7 @@ service running in the swarm:
|
||||||
running instances of Alpine Linux. The tasks are distributed between the
|
running instances of Alpine Linux. The tasks are distributed between the
|
||||||
three nodes of the swarm. One is running on `manager1`.
|
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`:
|
connected. The following example shows the tasks running on `manager1`:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue