Skip to content

Commit cf53465

Browse files
authored
Merge pull request #21384 from thaJeztah/sync_install
engine/install: sync between distros, use `dnf` for RHEL and CentOS, and some touch-ups
2 parents b6fb15b + 898aa4d commit cf53465

File tree

8 files changed

+150
-132
lines changed

8 files changed

+150
-132
lines changed

_vale/config/vocabularies/Docker/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Jamf
7676
JFrog
7777
JetBrains
7878
Kerberos
79+
[Kk]eyrings?
7980
Kitematic
8081
Kubernetes
8182
LTS

content/manuals/engine/install/centos.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Learn how to install Docker Engine on CentOS. These instructions cover
33
the different installation methods, how to uninstall, and next steps.
4-
keywords: requirements, yum, installation, centos, install, uninstall, docker engine, upgrade, update
4+
keywords: requirements, dnf, yum, installation, centos, install, uninstall, docker engine, upgrade, update
55
title: Install Docker Engine on CentOS
66
linkTitle: CentOS
77
weight: 60
@@ -36,12 +36,14 @@ default. If you have disabled it, you need to re-enable it.
3636

3737
### Uninstall old versions
3838

39-
Older versions of Docker went by `docker` or `docker-engine`.
40-
Uninstall any such older versions before attempting to install a new version,
41-
along with associated dependencies.
39+
Before you can install Docker Engine, you need to uninstall any conflicting packages.
40+
41+
Your Linux distribution may provide unofficial Docker packages, which may conflict
42+
with the official packages provided by Docker. You must uninstall these packages
43+
before you install the official version of Docker Engine.
4244

4345
```console
44-
$ sudo yum remove docker \
46+
$ sudo dnf remove docker \
4547
docker-client \
4648
docker-client-latest \
4749
docker-common \
@@ -51,7 +53,7 @@ $ sudo yum remove docker \
5153
docker-engine
5254
```
5355

54-
`yum` might report that you have none of these packages installed.
56+
`dnf` might report that you have none of these packages installed.
5557

5658
Images, containers, volumes, and networks stored in `/var/lib/docker/` aren't
5759
automatically removed when you uninstall Docker.
@@ -81,25 +83,25 @@ Docker from the repository.
8183

8284
#### Set up the repository
8385

84-
Install the `yum-utils` package (which provides the `yum-config-manager`
85-
utility) and set up the repository.
86+
Install the `dnf-plugins-core` package (which provides the commands to manage
87+
your DNF repositories) and set up the repository.
8688

8789
```console
88-
$ sudo yum install -y yum-utils
89-
$ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo
90+
$ sudo dnf -y install dnf-plugins-core
91+
$ sudo dnf config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo
9092
```
9193

9294
#### Install Docker Engine
9395

94-
1. Install Docker Engine, containerd, and Docker Compose:
96+
1. Install the Docker packages.
9597

9698
{{< tabs >}}
9799
{{< tab name="Latest" >}}
98100

99101
To install the latest version, run:
100102

101103
```console
102-
$ sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
104+
$ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
103105
```
104106

105107
If prompted to accept the GPG key, verify that the fingerprint matches
@@ -115,7 +117,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
115117
the repository:
116118

117119
```console
118-
$ yum list docker-ce --showduplicates | sort -r
120+
$ dnf list docker-ce --showduplicates | sort -r
119121

120122
docker-ce.x86_64 3:27.3.1-1.el9 docker-ce-stable
121123
docker-ce.x86_64 3:27.3.0-1.el9 docker-ce-stable
@@ -133,7 +135,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
133135
command to install:
134136

135137
```console
136-
$ sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin
138+
$ sudo dnf install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin
137139
```
138140

139141
This command installs Docker, but it doesn't start Docker. It also creates a
@@ -142,7 +144,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
142144
{{< /tab >}}
143145
{{< /tabs >}}
144146

145-
2. Start Docker.
147+
2. Start Docker Engine.
146148

147149
```console
148150
$ sudo systemctl enable --now docker
@@ -152,8 +154,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
152154
boot your system. If you don't want Docker to start automatically, use `sudo
153155
systemctl start docker` instead.
154156

155-
3. Verify that the Docker Engine installation is successful by running the
156-
`hello-world` image.
157+
3. Verify that the installation is successful by running the `hello-world` image:
157158

158159
```console
159160
$ sudo docker run hello-world
@@ -186,20 +187,23 @@ download a new file each time you want to upgrade Docker Engine.
186187
the Docker package.
187188

188189
```console
189-
$ sudo yum install /path/to/package.rpm
190+
$ sudo dnf install /path/to/package.rpm
190191
```
191192

192193
Docker is installed but not started. The `docker` group is created, but no
193194
users are added to the group.
194195

195-
3. Start Docker.
196+
3. Start Docker Engine.
196197

197198
```console
198-
$ sudo systemctl start docker
199+
$ sudo systemctl enable --now docker
199200
```
200201

201-
4. Verify that the Docker Engine installation is successful by running the
202-
`hello-world` image.
202+
This configures the Docker systemd service to start automatically when you
203+
boot your system. If you don't want Docker to start automatically, use `sudo
204+
systemctl start docker` instead.
205+
206+
4. Verify that the installation is successful by running the `hello-world` image:
203207

204208
```console
205209
$ sudo docker run hello-world
@@ -215,8 +219,8 @@ You have now successfully installed and started Docker Engine.
215219
#### Upgrade Docker Engine
216220

217221
To upgrade Docker Engine, download the newer package files and repeat the
218-
[installation procedure](#install-from-a-package), using `yum -y upgrade`
219-
instead of `yum -y install`, and point to the new files.
222+
[installation procedure](#install-from-a-package), using `dnf upgrade`
223+
instead of `dnf install`, and point to the new files.
220224

221225
{{< include "install-script.md" >}}
222226

@@ -225,7 +229,7 @@ instead of `yum -y install`, and point to the new files.
225229
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
226230

227231
```console
228-
$ sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
232+
$ sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
229233
```
230234

231235
2. Images, containers, volumes, or custom configuration files on your host

content/manuals/engine/install/debian.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ and ppc64le (ppc64el) architectures.
5252

5353
Before you can install Docker Engine, you need to uninstall any conflicting packages.
5454

55-
Distro maintainers provide unofficial distributions of Docker packages in
56-
their repositories. You must uninstall these packages before you can install the
57-
official version of Docker Engine.
55+
Your Linux distribution may provide unofficial Docker packages, which may conflict
56+
with the official packages provided by Docker. You must uninstall these packages
57+
before you install the official version of Docker Engine.
5858

5959
The unofficial packages to uninstall are:
6060

@@ -170,8 +170,7 @@ Docker from the repository.
170170
{{< /tab >}}
171171
{{< /tabs >}}
172172

173-
3. Verify that the installation is successful by running the `hello-world`
174-
image:
173+
3. Verify that the installation is successful by running the `hello-world` image:
175174

176175
```console
177176
$ sudo docker run hello-world
@@ -226,8 +225,7 @@ download a new file each time you want to upgrade Docker Engine.
226225

227226
The Docker daemon starts automatically.
228227

229-
6. Verify that the Docker Engine installation is successful by running the
230-
`hello-world` image:
228+
6. Verify that the installation is successful by running the `hello-world` image:
231229

232230
```console
233231
$ sudo service docker start
@@ -250,26 +248,26 @@ To upgrade Docker Engine, download the newer package files and repeat the
250248

251249
## Uninstall Docker Engine
252250

253-
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
251+
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
254252

255-
```console
256-
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
257-
```
253+
```console
254+
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
255+
```
258256

259-
2. Images, containers, volumes, or custom configuration files on your host
260-
aren't automatically removed. To delete all images, containers, and volumes:
257+
2. Images, containers, volumes, or custom configuration files on your host
258+
aren't automatically removed. To delete all images, containers, and volumes:
261259

262-
```console
263-
$ sudo rm -rf /var/lib/docker
264-
$ sudo rm -rf /var/lib/containerd
265-
```
260+
```console
261+
$ sudo rm -rf /var/lib/docker
262+
$ sudo rm -rf /var/lib/containerd
263+
```
266264

267-
3. Remove source list and keyrings
265+
3. Remove source list and keyrings
268266

269-
```console
270-
$ sudo rm /etc/apt/sources.list.d/docker.list
271-
$ sudo rm /etc/apt/keyrings/docker.asc
272-
```
267+
```console
268+
$ sudo rm /etc/apt/sources.list.d/docker.list
269+
$ sudo rm /etc/apt/keyrings/docker.asc
270+
```
273271

274272
You have to delete any edited configuration files manually.
275273

content/manuals/engine/install/fedora.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Learn how to install Docker Engine on Fedora. These instructions cover
33
the different installation methods, how to uninstall, and next steps.
4-
keywords: requirements, apt, installation, fedora, install fedora, install docker engine, rpm, install, uninstall, upgrade,
4+
keywords: requirements, dnf, installation, fedora, install fedora, install docker engine, rpm, install, uninstall, upgrade,
55
update
66
title: Install Docker Engine on Fedora
77
linkTitle: Fedora
@@ -31,9 +31,11 @@ Fedora versions:
3131

3232
### Uninstall old versions
3333

34-
Older versions of Docker went by `docker` or `docker-engine`.
35-
Uninstall any such older versions before attempting to install a new version,
36-
along with associated dependencies.
34+
Before you can install Docker Engine, you need to uninstall any conflicting packages.
35+
36+
Your Linux distribution may provide unofficial Docker packages, which may conflict
37+
with the official packages provided by Docker. You must uninstall these packages
38+
before you install the official version of Docker Engine.
3739

3840
```console
3941
$ sudo dnf remove docker \
@@ -88,11 +90,11 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker-
8890

8991
#### Install Docker Engine
9092

91-
1. Install Docker Engine, containerd, and Docker Compose:
93+
1. Install the Docker packages.
9294

9395
{{< tabs >}}
9496
{{< tab name="Latest" >}}
95-
97+
9698
To install the latest version, run:
9799

98100
```console
@@ -135,11 +137,11 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker-
135137

136138
This command installs Docker, but it doesn't start Docker. It also creates a
137139
`docker` group, however, it doesn't add any users to the group by default.
138-
140+
139141
{{< /tab >}}
140142
{{< /tabs >}}
141143

142-
2. Start Docker.
144+
2. Start Docker Engine.
143145

144146
```console
145147
$ sudo systemctl enable --now docker
@@ -149,8 +151,7 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker-
149151
boot your system. If you don't want Docker to start automatically, use `sudo
150152
systemctl start docker` instead.
151153

152-
3. Verify that the Docker Engine installation is successful by running the
153-
`hello-world` image.
154+
3. Verify that the installation is successful by running the `hello-world` image:
154155

155156
```console
156157
$ sudo docker run hello-world
@@ -189,20 +190,17 @@ download a new file each time you want to upgrade Docker Engine.
189190
Docker is installed but not started. The `docker` group is created, but no
190191
users are added to the group.
191192

192-
3. Start Docker.
193+
3. Start Docker Engine.
193194

194195
```console
195-
$ sudo systemctl start docker
196+
$ sudo systemctl enable --now docker
196197
```
197198

198-
4. Make Docker start automatically after reboot.
199-
200-
```console
201-
$ sudo systemctl enable docker
202-
```
199+
This configures the Docker systemd service to start automatically when you
200+
boot your system. If you don't want Docker to start automatically, use `sudo
201+
systemctl start docker` instead.
203202

204-
5. Verify that the Docker Engine installation is successful by running the
205-
`hello-world` image.
203+
4. Verify that the installation is successful by running the `hello-world` image:
206204

207205
```console
208206
$ sudo docker run hello-world

content/manuals/engine/install/raspberry-pi-os.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ To install Docker Engine, you need one of the following OS versions:
5353

5454
Before you can install Docker Engine, you need to uninstall any conflicting packages.
5555

56-
Distro maintainers provide an unofficial distributions of Docker packages in
57-
APT. You must uninstall these packages before you can install the official
58-
version of Docker Engine.
56+
Your Linux distribution may provide unofficial Docker packages, which may conflict
57+
with the official packages provided by Docker. You must uninstall these packages
58+
before you install the official version of Docker Engine.
5959

6060
The unofficial packages to uninstall are:
6161

@@ -158,8 +158,7 @@ Docker from the repository.
158158
{{< /tab >}}
159159
{{< /tabs >}}
160160

161-
3. Verify that the installation is successful by running the `hello-world`
162-
image:
161+
3. Verify that the installation is successful by running the `hello-world` image:
163162

164163
```console
165164
$ sudo docker run hello-world
@@ -214,8 +213,7 @@ download a new file each time you want to upgrade Docker Engine.
214213

215214
The Docker daemon starts automatically.
216215

217-
6. Verify that the Docker Engine installation is successful by running the
218-
`hello-world` image:
216+
6. Verify that the installation is successful by running the `hello-world` image:
219217

220218
```console
221219
$ sudo service docker start
@@ -238,19 +236,26 @@ To upgrade Docker Engine, download the newer package files and repeat the
238236

239237
## Uninstall Docker Engine
240238

241-
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
239+
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
242240

243-
```console
244-
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
245-
```
241+
```console
242+
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
243+
```
244+
245+
2. Images, containers, volumes, or custom configuration files on your host
246+
aren't automatically removed. To delete all images, containers, and volumes:
247+
248+
```console
249+
$ sudo rm -rf /var/lib/docker
250+
$ sudo rm -rf /var/lib/containerd
251+
```
246252

247-
2. Images, containers, volumes, or custom configuration files on your host
248-
aren't automatically removed. To delete all images, containers, and volumes:
253+
3. Remove source list and keyrings
249254

250-
```console
251-
$ sudo rm -rf /var/lib/docker
252-
$ sudo rm -rf /var/lib/containerd
253-
```
255+
```console
256+
$ sudo rm /etc/apt/sources.list.d/docker.list
257+
$ sudo rm /etc/apt/keyrings/docker.asc
258+
```
254259

255260
You have to delete any edited configuration files manually.
256261

0 commit comments

Comments
 (0)