You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get started with Docker Engine on CentOS, make sure you
22
-
[meet the prerequisites](#prerequisites), and then follow the
22
+
[meet the prerequisites](#prerequisites), and follow the
23
23
[installation steps](#installation-methods).
24
24
25
25
## Prerequisites
@@ -31,16 +31,17 @@ CentOS versions:
31
31
32
32
- CentOS 9 (stream)
33
33
34
-
The `centos-extras` repository must be enabled. This repository is enabled by
35
-
default. If you have disabled it, you need to re-enable it.
34
+
> [!NOTE]
35
+
> The `centos-extras` repository must be enabled. This repository is enabled by default.
36
+
> If you have disabled it, re-enable it before proceeding.
36
37
37
38
### Uninstall old versions
38
39
39
-
Before you can install Docker Engine, you need to uninstall any conflicting packages.
40
+
Before you install Docker Engine, uninstall any conflicting packages.
40
41
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.
42
+
Your Linux distribution may provide unofficial Docker packages, which can
43
+
conflict with the official packages provided by Docker. Uninstall these packages
44
+
before installing the official version.
44
45
45
46
```console
46
47
$ sudo dnf remove docker \
@@ -55,36 +56,25 @@ $ sudo dnf remove docker \
55
56
56
57
`dnf` might report that you have none of these packages installed.
57
58
58
-
Images, containers, volumes, and networks stored in `/var/lib/docker/` aren't
59
-
automatically removed when you uninstall Docker.
59
+
> [!NOTE]
60
+
> Images, containers, volumes, and networks stored in `/var/lib/docker/` are
61
+
> not automatically removed when you uninstall Docker.
60
62
61
63
## Installation methods
62
64
63
-
You can install Docker Engine in different ways, depending on your needs:
65
+
You can install Docker Engine in different ways:
64
66
65
-
- You can
66
-
[set up Docker's repositories](#install-using-the-repository) and install
67
-
from them, for ease of installation and upgrade tasks. This is the
68
-
recommended approach.
69
-
70
-
- You can download the RPM package,
71
-
[install it manually](#install-from-a-package), and manage
72
-
upgrades completely manually. This is useful in situations such as installing
73
-
Docker on air-gapped systems with no access to the internet.
74
-
75
-
- In testing and development environments, you can use automated
76
-
[convenience scripts](#install-using-the-convenience-script) to install Docker.
67
+
- Recommended: [Set up Docker's repositories](#install-using-the-repository) and install from them for easy installation and upgrades.
68
+
- Manual: [Download the RPM package](#install-from-a-package) and install it manually. Useful for air-gapped systems.
69
+
- Development/testing: Use [convenience scripts](#install-using-the-convenience-script) for quick setup.
77
70
78
71
### Install using the rpm repository {#install-using-the-repository}
79
72
80
-
Before you install Docker Engine for the first time on a new host machine, you
81
-
need to set up the Docker repository. Afterward, you can install and update
82
-
Docker from the repository.
73
+
Before installing Docker Engine for the first time on a new host, set up the Docker repository. Afterward, you can install and update Docker from the repository.
83
74
84
75
#### Set up the repository
85
76
86
-
Install the `dnf-plugins-core` package (which provides the commands to manage
87
-
your DNF repositories) and set up the repository.
77
+
Install the `dnf-plugins-core` package (provides commands to manage DNF repositories) and set up the repository.
boot your system. If you don't want Docker to start automatically, use `sudo
155
140
systemctl start docker` instead.
156
141
157
-
3. Verify that the installation is successful by running the `hello-world` image:
142
+
1. Verify the installation by running the `hello-world` image:
158
143
159
144
```console
160
145
$ sudo docker run hello-world
161
146
```
162
147
163
-
This command downloads a test image and runs it in a container. When the
164
-
container runs, it prints a confirmation message and exits.
148
+
This downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.
165
149
166
-
You have now successfully installed and started Docker Engine.
150
+
You have now installed and started Docker Engine.
167
151
168
152
{{% include "root-errors.md" %}}
169
153
@@ -174,9 +158,7 @@ choosing the new version you want to install.
174
158
175
159
### Install from a package
176
160
177
-
If you can't use Docker's `rpm` repository to install Docker Engine, you can
178
-
download the `.rpm` file for your release and install it manually. You need to
179
-
download a new file each time you want to upgrade Docker Engine.
161
+
If you cannot use Docker's `rpm` repository, download the `.rpm` file for your release and install it manually. Download a new file each time you want to upgrade Docker Engine.
180
162
181
163
<!-- markdownlint-disable-next-line -->
182
164
1. Go to [{{% param "download-url-base" %}}/]({{% param "download-url-base" %}}/)
@@ -190,10 +172,10 @@ download a new file each time you want to upgrade Docker Engine.
190
172
$ sudo dnf install /path/to/package.rpm
191
173
```
192
174
193
-
Docker is installed but not started. The `docker` group is created, but no
194
-
users are added to the group.
175
+
Docker is installed but not started. The `docker` group
176
+
is created, but no users are added to the group.
195
177
196
-
3. Start Docker Engine.
178
+
3. Start Docker Engine:
197
179
198
180
```console
199
181
$ sudo systemctl enable --now docker
@@ -232,7 +214,7 @@ instead of `dnf install`, and point to the new files.
0 commit comments