Skip to content

Commit

Permalink
Merge pull request docker#21384 from thaJeztah/sync_install
Browse files Browse the repository at this point in the history
engine/install: sync between distros, use `dnf` for RHEL and CentOS, and some touch-ups
  • Loading branch information
dvdksn authored Nov 8, 2024
2 parents b6fb15b + 898aa4d commit cf53465
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 132 deletions.
1 change: 1 addition & 0 deletions _vale/config/vocabularies/Docker/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Jamf
JFrog
JetBrains
Kerberos
[Kk]eyrings?
Kitematic
Kubernetes
LTS
Expand Down
54 changes: 29 additions & 25 deletions content/manuals/engine/install/centos.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Learn how to install Docker Engine on CentOS. These instructions cover
the different installation methods, how to uninstall, and next steps.
keywords: requirements, yum, installation, centos, install, uninstall, docker engine, upgrade, update
keywords: requirements, dnf, yum, installation, centos, install, uninstall, docker engine, upgrade, update
title: Install Docker Engine on CentOS
linkTitle: CentOS
weight: 60
Expand Down Expand Up @@ -36,12 +36,14 @@ default. If you have disabled it, you need to re-enable it.

### Uninstall old versions

Older versions of Docker went by `docker` or `docker-engine`.
Uninstall any such older versions before attempting to install a new version,
along with associated dependencies.
Before you can install Docker Engine, you need to uninstall any conflicting packages.

Your Linux distribution may provide unofficial Docker packages, which may conflict
with the official packages provided by Docker. You must uninstall these packages
before you install the official version of Docker Engine.

```console
$ sudo yum remove docker \
$ sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
Expand All @@ -51,7 +53,7 @@ $ sudo yum remove docker \
docker-engine
```

`yum` might report that you have none of these packages installed.
`dnf` might report that you have none of these packages installed.

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

#### Set up the repository

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

```console
$ sudo yum install -y yum-utils
$ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo
$ sudo dnf -y install dnf-plugins-core
$ sudo dnf config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo
```

#### Install Docker Engine

1. Install Docker Engine, containerd, and Docker Compose:
1. Install the Docker packages.

{{< tabs >}}
{{< tab name="Latest" >}}

To install the latest version, run:

```console
$ sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
$ sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

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

```console
$ yum list docker-ce --showduplicates | sort -r
$ dnf list docker-ce --showduplicates | sort -r

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

```console
$ sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin
$ sudo dnf install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io docker-buildx-plugin docker-compose-plugin
```

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

2. Start Docker.
2. Start Docker Engine.

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

3. Verify that the Docker Engine installation is successful by running the
`hello-world` image.
3. Verify that the installation is successful by running the `hello-world` image:

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

```console
$ sudo yum install /path/to/package.rpm
$ sudo dnf install /path/to/package.rpm
```

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

3. Start Docker.
3. Start Docker Engine.

```console
$ sudo systemctl start docker
$ sudo systemctl enable --now docker
```

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

4. Verify that the installation is successful by running the `hello-world` image:

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

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

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

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

```console
$ sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
$ sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
```

2. Images, containers, volumes, or custom configuration files on your host
Expand Down
42 changes: 20 additions & 22 deletions content/manuals/engine/install/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ and ppc64le (ppc64el) architectures.

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

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

The unofficial packages to uninstall are:

Expand Down Expand Up @@ -170,8 +170,7 @@ Docker from the repository.
{{< /tab >}}
{{< /tabs >}}

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

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

The Docker daemon starts automatically.

6. Verify that the Docker Engine installation is successful by running the
`hello-world` image:
6. Verify that the installation is successful by running the `hello-world` image:

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

## Uninstall Docker Engine

1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:

```console
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
```
```console
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
```

2. Images, containers, volumes, or custom configuration files on your host
aren't automatically removed. To delete all images, containers, and volumes:
2. Images, containers, volumes, or custom configuration files on your host
aren't automatically removed. To delete all images, containers, and volumes:

```console
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd
```
```console
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd
```

3. Remove source list and keyrings
3. Remove source list and keyrings

```console
$ sudo rm /etc/apt/sources.list.d/docker.list
$ sudo rm /etc/apt/keyrings/docker.asc
```
```console
$ sudo rm /etc/apt/sources.list.d/docker.list
$ sudo rm /etc/apt/keyrings/docker.asc
```

You have to delete any edited configuration files manually.

Expand Down
36 changes: 17 additions & 19 deletions content/manuals/engine/install/fedora.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Learn how to install Docker Engine on Fedora. These instructions cover
the different installation methods, how to uninstall, and next steps.
keywords: requirements, apt, installation, fedora, install fedora, install docker engine, rpm, install, uninstall, upgrade,
keywords: requirements, dnf, installation, fedora, install fedora, install docker engine, rpm, install, uninstall, upgrade,
update
title: Install Docker Engine on Fedora
linkTitle: Fedora
Expand Down Expand Up @@ -31,9 +31,11 @@ Fedora versions:

### Uninstall old versions

Older versions of Docker went by `docker` or `docker-engine`.
Uninstall any such older versions before attempting to install a new version,
along with associated dependencies.
Before you can install Docker Engine, you need to uninstall any conflicting packages.

Your Linux distribution may provide unofficial Docker packages, which may conflict
with the official packages provided by Docker. You must uninstall these packages
before you install the official version of Docker Engine.

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

#### Install Docker Engine

1. Install Docker Engine, containerd, and Docker Compose:
1. Install the Docker packages.

{{< tabs >}}
{{< tab name="Latest" >}}

To install the latest version, run:

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

This command installs Docker, but it doesn't start Docker. It also creates a
`docker` group, however, it doesn't add any users to the group by default.

{{< /tab >}}
{{< /tabs >}}

2. Start Docker.
2. Start Docker Engine.

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

3. Verify that the Docker Engine installation is successful by running the
`hello-world` image.
3. Verify that the installation is successful by running the `hello-world` image:

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

3. Start Docker.
3. Start Docker Engine.

```console
$ sudo systemctl start docker
$ sudo systemctl enable --now docker
```

4. Make Docker start automatically after reboot.

```console
$ sudo systemctl enable docker
```
This configures the Docker systemd service to start automatically when you
boot your system. If you don't want Docker to start automatically, use `sudo
systemctl start docker` instead.

5. Verify that the Docker Engine installation is successful by running the
`hello-world` image.
4. Verify that the installation is successful by running the `hello-world` image:

```console
$ sudo docker run hello-world
Expand Down
39 changes: 22 additions & 17 deletions content/manuals/engine/install/raspberry-pi-os.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ To install Docker Engine, you need one of the following OS versions:

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

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

The unofficial packages to uninstall are:

Expand Down Expand Up @@ -158,8 +158,7 @@ Docker from the repository.
{{< /tab >}}
{{< /tabs >}}

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

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

The Docker daemon starts automatically.

6. Verify that the Docker Engine installation is successful by running the
`hello-world` image:
6. Verify that the installation is successful by running the `hello-world` image:

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

## Uninstall Docker Engine

1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:

```console
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
```
```console
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
```

2. Images, containers, volumes, or custom configuration files on your host
aren't automatically removed. To delete all images, containers, and volumes:

```console
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd
```

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

```console
$ sudo rm -rf /var/lib/docker
$ sudo rm -rf /var/lib/containerd
```
```console
$ sudo rm /etc/apt/sources.list.d/docker.list
$ sudo rm /etc/apt/keyrings/docker.asc
```

You have to delete any edited configuration files manually.

Expand Down
Loading

0 comments on commit cf53465

Please sign in to comment.