Skip to content

Commit b0a57ca

Browse files
author
Misty Stanley-Jones
authored
Installation guide improvements (docker#3977)
1 parent f7d0ed1 commit b0a57ca

File tree

15 files changed

+192
-93
lines changed

15 files changed

+192
-93
lines changed

_data/toc.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ guides:
5252
title: Fedora
5353
- path: /engine/installation/linux/docker-ce/binaries/
5454
title: Binaries
55+
- sectiontitle: Platforms supporting Docker EE and Docker CE
56+
section:
57+
- path: /engine/installation/linux/centos/
58+
title: CentOS
59+
- path: /engine/installation/linux/ubuntu/
60+
title: Ubuntu
5561
- path: /engine/installation/linux/linux-postinstall/
5662
title: Optional Linux post-installation steps
5763
- sectiontitle: Docker Edge

_includes/docker_platform_matrix.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{% assign green-check = '![yes](/engine/installation/images/green-check.svg){: style="height: 14px; margin: 0 auto"}' %}
22
{% assign install-prefix = '/engine/installation/linux' %}
3-
| Platform | Docker CE x86_64 | Docker CE ARM | Docker EE |
4-
|:---------------------------------------------------------------------------|:--------------------------------------------------------------|:--------------------------------------------------------------|:---------------------------------------------------------------|
5-
| [CentOS]({{ install-prefix }}/centos.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/centos.md) | | [{{ green-check }}]({{ install-prefix }}/docker-ee/centos.md) |
6-
| [Debian]({{ install-prefix }}/docker-ce/debian.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/debian.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/debian.md) | |
7-
| [Fedora]({{ install-prefix }}/docker-ce/fedora.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/fedora.md) | | |
8-
| [Microsoft Windows Server 2016](/engine/installation/windows/docker-ee.md) | | | [{{ green-check }}](/engine/installation/windows/docker-ee.md) |
9-
| [Oracle Linux]({{ install-prefix }}/docker-ee/oracle.md) | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/oracle.md) |
10-
| [Red Hat Enterprise Linux]({{ install-prefix }}/docker-ee/rhel.md) | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/rhel.md) |
11-
| [SUSE Linux Enterprise Server]({{ install-prefix }}/docker-ee/suse.md) | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/suse.md) |
12-
| [Ubuntu]({{ install-prefix }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ee/ubuntu.md) |
3+
| Platform | Docker CE x86_64 | Docker CE ARM | Docker CE System Z (s390x) | Docker EE |
4+
|:---------------------------------------------------------------------------|:--------------------------------------------------------------|:--------------------------------------------------------------|:--------------------------------------------------------------|:---------------------------------------------------------------|
5+
| [CentOS]({{ install-prefix }}/centos.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/centos.md) | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/centos.md) |
6+
| [Debian]({{ install-prefix }}/docker-ce/debian.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/debian.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/debian.md) | | |
7+
| [Fedora]({{ install-prefix }}/docker-ce/fedora.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/fedora.md) | | | |
8+
| [Microsoft Windows Server 2016](/engine/installation/windows/docker-ee.md) | | | | [{{ green-check }}](/engine/installation/windows/docker-ee.md) |
9+
| [Oracle Linux]({{ install-prefix }}/docker-ee/oracle.md) | | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/oracle.md) |
10+
| [Red Hat Enterprise Linux]({{ install-prefix }}/docker-ee/rhel.md) | | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/rhel.md) |
11+
| [SUSE Linux Enterprise Server]({{ install-prefix }}/docker-ee/suse.md) | | | | [{{ green-check }}]({{ install-prefix }}/docker-ee/suse.md) |
12+
| [Ubuntu]({{ install-prefix }}/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ce/ubuntu.md) | [{{ green-check }}]({{ install-prefix }}/docker-ee/ubuntu.md) |

_includes/install-script.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!-- This file is included in Docker CE or EE installation docs for Linux. -->
2+
3+
### Install using the convenience script
4+
5+
Docker provides convenience scripts at [get.docker.com](https://get.docker.com/)
6+
and [test.docker.com](https://test.docker.com/) for installing stable and
7+
testing versions of Docker CE into development environments quickly and
8+
non-interactively. The source code for the scripts is in the
9+
[`docker-install` repository](https://github.com/docker/docker-install).
10+
**Using these scripts is not recommended for production
11+
environments**, and you should understand the potential risks before you use
12+
them:
13+
14+
- The scripts require `root` or `sudo` privileges in order to run. Therefore,
15+
you should carefully examine and audit the scripts before running them.
16+
- The scripts attempt to detect your Linux distribution and version and
17+
configure your package management system for you. In addition, the scripts do
18+
not allow you to customize any installation parameters. This may lead to an
19+
unsupported configuration, either from Docker's point of view or from your own
20+
organization's guidelines and standards.
21+
- The scripts install all dependencies and recommendations of the package
22+
manager without asking for confirmation. This may install a large number of
23+
packages, depending on the current configuration of your host machine.
24+
- Do not use the convenience script if Docker has already been installed on the
25+
host machine using another mechanism.
26+
27+
This example uses the script at [get.docker.com](https://get.docker.com/) to
28+
install the latest stable release of Docker CE on Linux. To install the latest
29+
testing version, use [test.docker.com](https://test.docker.com/) instead. In
30+
each of the commands below, replace each occurrence of `get` with `test`.
31+
32+
> **Warning**: Always examine scripts downloaded from the internet before
33+
> running them locally.
34+
{:.warning-vanilla}
35+
36+
```bash
37+
$ curl -fsSL get.docker.com -o get-docker.sh
38+
$ sudo sh get-docker.sh
39+
40+
<output truncated>
41+
42+
If you would like to use Docker as a non-root user, you should now consider
43+
adding your user to the "docker" group with something like:
44+
45+
sudo usermod -aG docker your-user
46+
47+
Remember that you will have to log out and back in for this to take effect!
48+
49+
WARNING: Adding a user to the "docker" group will grant the ability to run
50+
containers which can be used to obtain root privileges on the
51+
docker host.
52+
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
53+
for more information.
54+
```
55+
56+
Docker CE is installed. It starts automatically on `DEB`-based distributions. On
57+
`RPM`-based distributions, you need to start it manually using the appropriate
58+
`systemctl` or `service` command. As the message indicates, non-root users are
59+
not able to run Docker commands by default.
60+
61+
#### Upgrade Docker after using the convenience script
62+
63+
If you installed Docker using the convenience script, you should upgrade Docker
64+
using your package manager directly. There is no advantage to re-running the
65+
convenience script, and it can cause issues if it attempts to re-add
66+
repositories which have already been added to the host machine.

engine/installation/linux/centos.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ title: Choose Docker CE or Docker EE on CentOS
44
---
55

66
The instructions for installing Docker on CentOS depend on whether you are using
7-
Docker EE or Docker CE.
7+
Docker Enterprise Edition (Docker EE) or Docker Community Edition (Docker CE).
8+
[Learn more about Docker EE and Docker CE](/engine/installation/).
89

910
- [Install Docker EE on CentOS](/engine/installation/linux/docker-ee/centos.md)
1011
- [Install Docker CE on CentOS](/engine/installation/linux/docker-ce/centos.md)

engine/installation/linux/docker-ce/binaries.md

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,19 @@ instructions for enabling and configuring AppArmor or SELinux.
7272

7373
### Install static binaries
7474

75-
1. Download the static binary archive. You can download either the latest
76-
release binaries or a specific version. To find the download link, see the
77-
[release notes](https://github.com/moby/moby/releases) for the version
78-
of Docker you want to install. You can choose a `tar.gz` archive or `zip`
79-
archive.
75+
1. Download the static binary archive. Go to
76+
[https://download.docker.com/linux/static/stable/](https://download.docker.com/linux/static/stable/x86_64/)
77+
(or change `stable` to `edge` or `test`),
78+
choose your hardware platform, and download the `.tgz` file relating to the
79+
version of Docker CE you want to install.
8080

81-
2. Extract the archive using `tar` or `unzip`, depending on the format you
82-
downloaded. The `dockerd` and `docker` binaries are extracted.
81+
2. Extract the archive using the `tar` utility. The `dockerd` and `docker`
82+
binaries are extracted.
8383

8484
```bash
8585
$ tar xzvf /path/to/<FILE>.tar.gz
8686
```
8787

88-
```bash
89-
$ unzip /path/to/<FILE>.zip
90-
```
91-
9288
3. **Optional**: Move the binaries to a directory on your executable path, such
9389
as `/usr/bin/`. If you skip this step, you must provide the path to the
9490
executable when you invoke `docker` or `dockerd` commands.
@@ -104,7 +100,8 @@ instructions for enabling and configuring AppArmor or SELinux.
104100
```
105101

106102
If you need to start the daemon with additional options, modify the above
107-
command accordingly.
103+
command accordingly or create and edit the file `/etc/docker/daemon.json`
104+
to add the custom configuration options.
108105

109106
5. Verify that Docker is installed correctly by running the `hello-world`
110107
image.
@@ -127,23 +124,20 @@ instructions for enabling and configuring AppArmor or SELinux.
127124
The macOS binary includes the Docker client only. It does not include the
128125
`dockerd` daemon.
129126

130-
1. Download the static binary archive. You can download either the latest
131-
release binaries or a specific version. To find the download link, see the
132-
[release notes](https://github.com/moby/moby/releases) for the version
133-
of Docker you want to install. You can choose a `tar.gz` archive or
134-
`zip` archive.
127+
1. Download the static binary archive. Go to
128+
[https://download.docker.com/mac/static/stable/x86_64/](https://download.docker.com/mac/static/stable/x86_64/),
129+
(or change `stable` to `edge` or `test`),
130+
and download the `.tgz` file relating to the version of Docker CE you want
131+
to install.
135132

136-
2. Extract the archive using `tar` or `unzip`, depending on the format you
137-
downloaded. The `docker` binary is extracted.
133+
2. Extract the archive using the `tar` utility. The `docker` binary is
134+
extracted.
138135

139136
```bash
140137
$ tar xzvf /path/to/<FILE>.tar.gz
141138
```
142139

143-
```bash
144-
$ unzip /path/to/<FILE>.zip
145-
```
146-
3. **Optional**: Move the binaries to a directory on your executable path, such
140+
3. **Optional**: Move the binary to a directory on your executable path, such
147141
as `/usr/local/bin/`. If you skip this step, you must provide the path to the
148142
executable when you invoke `docker` or `dockerd` commands.
149143

@@ -152,7 +146,8 @@ The macOS binary includes the Docker client only. It does not include the
152146
```
153147

154148
4. Verify that Docker is installed correctly by running the `hello-world`
155-
image.
149+
image. The value of `<hostname>` is a hostname or IP address running the
150+
Docker daemon and accessible to the client.
156151

157152
```bash
158153
$ sudo docker -H <hostname> run hello-world
@@ -164,43 +159,40 @@ The macOS binary includes the Docker client only. It does not include the
164159

165160
## Install server and client binaries on Windows
166161

167-
You can install Docker from binaries on Windows Server 2016 or Windows 10.
168-
169-
- To install both client and server binaries, download the 64-bit binary. The
170-
archive includes `x86_64` in the path.
171-
172-
- To install the client only, download the 32-bit binary. The archive includes
173-
`i386` in the path.
162+
You can install Docker from binaries on Windows Server 2016 or Windows 10. Both
163+
the `dockerd.exe` and `docker.exe` binaries are included.
174164

175165
1. Use the following PowerShell commands to install and start Docker:
176166

177167
```none
178-
Invoke-WebRequest https://get.docker.com/builds/Windows/x86_64/docker-{{ minor-version }}.0-ce.zip -UseBasicParsing -OutFile docker.zip
179-
Expand-Archive docker.zip -DestinationPath $Env:ProgramFiles
180-
Remove-Item -Force docker.zip
168+
PS C:\> Invoke-WebRequest https://download.docker.com/win/static/stable/x86_64//docker-{{ minor-version }}.0-ce.zip -UseBasicParsing -OutFile docker.zip
169+
170+
PS C:\> Expand-Archive docker.zip -DestinationPath $Env:ProgramFiles
171+
172+
PS C:\> Remove-Item -Force docker.zip
181173
182-
dockerd --register-service
174+
PS C:\> dockerd --register-service
183175
184-
Start-Service docker
176+
PS C:\> Start-Service docker
185177
```
186178

187179
2. Verify that Docker is installed correctly by running the `hello-world`
188180
image.
189181

190182

191183
```none
192-
docker run hello-world:nanoserver
184+
PS C:\> docker run hello-world:nanoserver
193185
```
194186

195187
This command downloads a test image and runs it in a container. When the
196188
container runs, it prints an informational message and exits.
197189

198190
## Upgrade static binaries
199191

200-
To upgrade your manual installation of Docker Engine on Linux, first stop any
201-
`dockerd` processes running locally, then follow the
202-
[regular installation steps](#get-the-linux-binaries), overwriting any existing
203-
`dockerd` or `docker` binaries with the newer versions.
192+
To upgrade your manual installation of Docker CE, first stop any
193+
`dockerd` or `dockerd.exe` processes running locally, then follow the
194+
regular installation steps to install the new version on top of the existing
195+
version.
204196

205197
## Next steps
206198

engine/installation/linux/docker-ce/centos.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ You can install Docker CE in different ways, depending on your needs:
5353
from them, for ease of installation and upgrade tasks. This is the
5454
recommended approach.
5555

56-
- Some users download the RPM package and install it manually and manage
56+
- Some users download the RPM package and
57+
[install it manually](#install-from-a-package) and manage
5758
upgrades completely manually. This is useful in situations such as installing
5859
Docker on air-gapped systems with no access to the internet.
5960

61+
- In testing and development environments, some users choose to use automated
62+
[convenience scripts](#install-using-the-convenience-script) to install Docker.
63+
6064
### Install using the repository
6165

6266
Before you install Docker CE for the first time on a new host machine, you need
@@ -135,6 +139,7 @@ from the repository.
135139
> or updating without specifying a version in the `yum install` or
136140
> `yum update` command will always install the highest possible version,
137141
> which may not be appropriate for your stability needs.
142+
{:.warning-vanilla}
138143
139144
3. On production systems, you should install a specific version of Docker CE
140145
instead of always using the latest. List the available versions. This
@@ -237,6 +242,8 @@ To upgrade Docker CE, download the newer package file and repeat the
237242
[installation procedure](#install-from-a-package), using `yum -y upgrade`
238243
instead of `yum -y install`, and pointing to the new file.
239244

245+
{% include install-script.md %}
246+
240247
## Uninstall Docker CE
241248

242249
1. Uninstall the Docker package:

engine/installation/linux/docker-ce/debian.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,14 @@ You can install Docker CE in different ways, depending on your needs:
7171
from them, for ease of installation and upgrade tasks. This is the
7272
recommended approach.
7373

74-
- Some users download the DEB package and install it manually and manage
74+
- Some users download the DEB package and
75+
[install it manually](#install-from-a-package) and manage
7576
upgrades completely manually. This is useful in situations such as installing
7677
Docker on air-gapped systems with no access to the internet.
7778

79+
- In testing and development environments, some users choose to use automated
80+
[convenience scripts](#install-using-the-convenience-script) to install Docker.
81+
7882
### Install using the repository
7983

8084
Before you install Docker CE for the first time on a new host machine, you need
@@ -356,7 +360,7 @@ a new file each time you want to upgrade Docker.
356360
container runs, it prints an informational message and exits.
357361
358362
Docker CE is installed and running. You need to use `sudo` to run Docker
359-
commands. Continue to [Post-installation steps for Linux](linux-postinstall.md)
363+
commands. Continue to [Post-installation steps for Linux](/engine/installation/linux/linux-postinstall.md)
360364
to allow non-privileged users to run Docker commands and for other optional
361365
configuration steps.
362366
@@ -365,6 +369,8 @@ configuration steps.
365369
To upgrade Docker, download the newer package file and repeat the
366370
[installation procedure](#install-from-a-package), pointing to the new file.
367371
372+
{% include install-script.md %}
373+
368374
## Uninstall Docker CE
369375
370376
1. Uninstall the Docker CE package:

0 commit comments

Comments
 (0)