Merge pull request #21384 from thaJeztah/sync_install

engine/install: sync between distros, use `dnf` for RHEL and CentOS, and some touch-ups
This commit is contained in:
David Karlsson 2024-11-08 14:44:14 +01:00 committed by GitHub
commit cf534658d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 150 additions and 132 deletions

View File

@ -76,6 +76,7 @@ Jamf
JFrog JFrog
JetBrains JetBrains
Kerberos Kerberos
[Kk]eyrings?
Kitematic Kitematic
Kubernetes Kubernetes
LTS LTS

View File

@ -1,7 +1,7 @@
--- ---
description: Learn how to install Docker Engine on CentOS. These instructions cover description: Learn how to install Docker Engine on CentOS. These instructions cover
the different installation methods, how to uninstall, and next steps. 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 title: Install Docker Engine on CentOS
linkTitle: CentOS linkTitle: CentOS
weight: 60 weight: 60
@ -36,12 +36,14 @@ default. If you have disabled it, you need to re-enable it.
### Uninstall old versions ### Uninstall old versions
Older versions of Docker went by `docker` or `docker-engine`. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Uninstall any such older versions before attempting to install a new version,
along with associated dependencies. 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 ```console
$ sudo yum remove docker \ $ sudo dnf remove docker \
docker-client \ docker-client \
docker-client-latest \ docker-client-latest \
docker-common \ docker-common \
@ -51,7 +53,7 @@ $ sudo yum remove docker \
docker-engine 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 Images, containers, volumes, and networks stored in `/var/lib/docker/` aren't
automatically removed when you uninstall Docker. automatically removed when you uninstall Docker.
@ -81,17 +83,17 @@ Docker from the repository.
#### Set up the repository #### Set up the repository
Install the `yum-utils` package (which provides the `yum-config-manager` Install the `dnf-plugins-core` package (which provides the commands to manage
utility) and set up the repository. your DNF repositories) and set up the repository.
```console ```console
$ sudo yum install -y yum-utils $ sudo dnf -y install dnf-plugins-core
$ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo $ sudo dnf config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo
``` ```
#### Install Docker Engine #### Install Docker Engine
1. Install Docker Engine, containerd, and Docker Compose: 1. Install the Docker packages.
{{< tabs >}} {{< tabs >}}
{{< tab name="Latest" >}} {{< tab name="Latest" >}}
@ -99,7 +101,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
To install the latest version, run: To install the latest version, run:
```console ```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 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
the repository: the repository:
```console ```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.1-1.el9 docker-ce-stable
docker-ce.x86_64 3:27.3.0-1.el9 docker-ce-stable 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
command to install: command to install:
```console ```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 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
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
2. Start Docker. 2. Start Docker Engine.
```console ```console
$ sudo systemctl enable --now docker $ sudo systemctl enable --now docker
@ -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 boot your system. If you don't want Docker to start automatically, use `sudo
systemctl start docker` instead. systemctl start docker` instead.
3. Verify that the Docker Engine installation is successful by running the 3. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image.
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -186,20 +187,23 @@ download a new file each time you want to upgrade Docker Engine.
the Docker package. the Docker package.
```console ```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 Docker is installed but not started. The `docker` group is created, but no
users are added to the group. users are added to the group.
3. Start Docker. 3. Start Docker Engine.
```console ```console
$ sudo systemctl start docker $ sudo systemctl enable --now docker
``` ```
4. Verify that the Docker Engine installation is successful by running the This configures the Docker systemd service to start automatically when you
`hello-world` image. 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 ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -215,8 +219,8 @@ You have now successfully installed and started Docker Engine.
#### Upgrade Docker Engine #### Upgrade Docker Engine
To upgrade Docker Engine, download the newer package files and repeat the To upgrade Docker Engine, download the newer package files and repeat the
[installation procedure](#install-from-a-package), using `yum -y upgrade` [installation procedure](#install-from-a-package), using `dnf upgrade`
instead of `yum -y install`, and point to the new files. instead of `dnf install`, and point to the new files.
{{< include "install-script.md" >}} {{< include "install-script.md" >}}
@ -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: 1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
```console ```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 2. Images, containers, volumes, or custom configuration files on your host

View File

@ -52,9 +52,9 @@ and ppc64le (ppc64el) architectures.
Before you can install Docker Engine, you need to uninstall any conflicting packages. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Distro maintainers provide unofficial distributions of Docker packages in Your Linux distribution may provide unofficial Docker packages, which may conflict
their repositories. You must uninstall these packages before you can install the with the official packages provided by Docker. You must uninstall these packages
official version of Docker Engine. before you install the official version of Docker Engine.
The unofficial packages to uninstall are: The unofficial packages to uninstall are:
@ -170,8 +170,7 @@ Docker from the repository.
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
3. Verify that the installation is successful by running the `hello-world` 3. Verify that the installation is successful by running the `hello-world` image:
image:
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -226,8 +225,7 @@ download a new file each time you want to upgrade Docker Engine.
The Docker daemon starts automatically. The Docker daemon starts automatically.
6. Verify that the Docker Engine installation is successful by running the 6. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image:
```console ```console
$ sudo service docker start $ sudo service docker start

View File

@ -1,7 +1,7 @@
--- ---
description: Learn how to install Docker Engine on Fedora. These instructions cover description: Learn how to install Docker Engine on Fedora. These instructions cover
the different installation methods, how to uninstall, and next steps. 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 update
title: Install Docker Engine on Fedora title: Install Docker Engine on Fedora
linkTitle: Fedora linkTitle: Fedora
@ -31,9 +31,11 @@ Fedora versions:
### Uninstall old versions ### Uninstall old versions
Older versions of Docker went by `docker` or `docker-engine`. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Uninstall any such older versions before attempting to install a new version,
along with associated dependencies. 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 ```console
$ sudo dnf remove docker \ $ sudo dnf remove docker \
@ -88,7 +90,7 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker-
#### Install Docker Engine #### Install Docker Engine
1. Install Docker Engine, containerd, and Docker Compose: 1. Install the Docker packages.
{{< tabs >}} {{< tabs >}}
{{< tab name="Latest" >}} {{< tab name="Latest" >}}
@ -139,7 +141,7 @@ $ sudo dnf-3 config-manager --add-repo {{% param "download-url-base" %}}/docker-
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
2. Start Docker. 2. Start Docker Engine.
```console ```console
$ sudo systemctl enable --now docker $ sudo systemctl enable --now docker
@ -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 boot your system. If you don't want Docker to start automatically, use `sudo
systemctl start docker` instead. systemctl start docker` instead.
3. Verify that the Docker Engine installation is successful by running the 3. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image.
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -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 Docker is installed but not started. The `docker` group is created, but no
users are added to the group. users are added to the group.
3. Start Docker. 3. Start Docker Engine.
```console ```console
$ sudo systemctl start docker $ sudo systemctl enable --now docker
``` ```
4. Make Docker start automatically after reboot. 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.
```console 4. Verify that the installation is successful by running the `hello-world` image:
$ sudo systemctl enable docker
```
5. Verify that the Docker Engine installation is successful by running the
`hello-world` image.
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world

View File

@ -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. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Distro maintainers provide an unofficial distributions of Docker packages in Your Linux distribution may provide unofficial Docker packages, which may conflict
APT. You must uninstall these packages before you can install the official with the official packages provided by Docker. You must uninstall these packages
version of Docker Engine. before you install the official version of Docker Engine.
The unofficial packages to uninstall are: The unofficial packages to uninstall are:
@ -158,8 +158,7 @@ Docker from the repository.
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
3. Verify that the installation is successful by running the `hello-world` 3. Verify that the installation is successful by running the `hello-world` image:
image:
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -214,8 +213,7 @@ download a new file each time you want to upgrade Docker Engine.
The Docker daemon starts automatically. The Docker daemon starts automatically.
6. Verify that the Docker Engine installation is successful by running the 6. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image:
```console ```console
$ sudo service docker start $ sudo service docker start
@ -252,6 +250,13 @@ To upgrade Docker Engine, download the newer package files and repeat the
$ sudo rm -rf /var/lib/containerd $ sudo rm -rf /var/lib/containerd
``` ```
3. Remove source list and keyrings
```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. You have to delete any edited configuration files manually.
## Next steps ## Next steps

View File

@ -1,7 +1,7 @@
--- ---
description: Learn how to install Docker Engine on RHEL. These instructions cover description: Learn how to install Docker Engine on RHEL. These instructions cover
the different installation methods, how to uninstall, and next steps. the different installation methods, how to uninstall, and next steps.
keywords: requirements, apt, installation, rhel, rpm, install, install docker engine, uninstall, upgrade, keywords: requirements, dnf, installation, rhel, rpm, install, install docker engine, uninstall, upgrade,
update update
title: Install Docker Engine on RHEL title: Install Docker Engine on RHEL
linkTitle: RHEL linkTitle: RHEL
@ -34,13 +34,14 @@ RHEL versions:
### Uninstall old versions ### Uninstall old versions
Older versions of Docker went by `docker` or `docker-engine`. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Uninstall any such older versions before attempting to install a new version,
along with associated dependencies. Also uninstall `Podman` and the associated Your Linux distribution may provide unofficial Docker packages, which may conflict
dependencies if installed already: with the official packages provided by Docker. You must uninstall these packages
before you install the official version of Docker Engine.
```console ```console
$ sudo yum remove docker \ $ sudo dnf remove docker \
docker-client \ docker-client \
docker-client-latest \ docker-client-latest \
docker-common \ docker-common \
@ -52,7 +53,7 @@ $ sudo yum remove docker \
runc runc
``` ```
`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 Images, containers, volumes, and networks stored in `/var/lib/docker/` aren't
automatically removed when you uninstall Docker. automatically removed when you uninstall Docker.
@ -82,17 +83,17 @@ Docker from the repository.
#### Set up the repository #### Set up the repository
Install the `yum-utils` package (which provides the `yum-config-manager` Install the `dnf-plugins-core` package (which provides the commands to manage
utility) and set up the repository. your DNF repositories) and set up the repository.
```console ```console
$ sudo yum install -y yum-utils $ sudo dnf -y install dnf-plugins-core
$ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo $ sudo dnf config-manager --add-repo {{% param "download-url-base" %}}/docker-ce.repo
``` ```
#### Install Docker Engine #### Install Docker Engine
1. Install Docker Engine, containerd, and Docker Compose: 1. Install the Docker packages.
{{< tabs >}} {{< tabs >}}
{{< tab name="Latest" >}} {{< tab name="Latest" >}}
@ -100,7 +101,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
To install the latest version, run: To install the latest version, run:
```console ```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 If prompted to accept the GPG key, verify that the fingerprint matches
@ -116,7 +117,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
the repository: the repository:
```console ```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.1-1.el9 docker-ce-stable
docker-ce.x86_64 3:27.3.0-1.el9 docker-ce-stable docker-ce.x86_64 3:27.3.0-1.el9 docker-ce-stable
@ -134,7 +135,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
command to install: command to install:
```console ```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 This command installs Docker, but it doesn't start Docker. It also creates a
@ -143,7 +144,7 @@ $ sudo yum-config-manager --add-repo {{% param "download-url-base" %}}/docker-ce
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
2. Start Docker. 2. Start Docker Engine.
```console ```console
$ sudo systemctl enable --now docker $ sudo systemctl enable --now docker
@ -153,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 boot your system. If you don't want Docker to start automatically, use `sudo
systemctl start docker` instead. systemctl start docker` instead.
3. Verify that the Docker Engine installation is successful by running the 3. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image.
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -199,7 +199,7 @@ download a new file each time you want to upgrade Docker Engine.
the packages. the packages.
```console ```console
$ sudo yum install ./containerd.io-<version>.<arch>.rpm \ $ sudo dnf install ./containerd.io-<version>.<arch>.rpm \
./docker-ce-<version>.<arch>.rpm \ ./docker-ce-<version>.<arch>.rpm \
./docker-ce-cli-<version>.<arch>.rpm \ ./docker-ce-cli-<version>.<arch>.rpm \
./docker-buildx-plugin-<version>.<arch>.rpm \ ./docker-buildx-plugin-<version>.<arch>.rpm \
@ -209,14 +209,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 Docker is installed but not started. The `docker` group is created, but no
users are added to the group. users are added to the group.
6. Start Docker. 6. Start Docker Engine.
```console ```console
$ sudo systemctl start docker $ sudo systemctl enable --now docker
``` ```
7. Verify that the Docker Engine installation is successful by running the This configures the Docker systemd service to start automatically when you
`hello-world` image. boot your system. If you don't want Docker to start automatically, use `sudo
systemctl start docker` instead.
7. Verify that the installation is successful by running the `hello-world` image:
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -232,8 +235,8 @@ You have now successfully installed and started Docker Engine.
#### Upgrade Docker Engine #### Upgrade Docker Engine
To upgrade Docker Engine, download the newer package files and repeat the To upgrade Docker Engine, download the newer package files and repeat the
[installation procedure](#install-from-a-package), using `yum -y upgrade` [installation procedure](#install-from-a-package), using `dnf upgrade`
instead of `yum -y install`, and point to the new files. instead of `dnf install`, and point to the new files.
{{< include "install-script.md" >}} {{< include "install-script.md" >}}
@ -242,7 +245,7 @@ instead of `yum -y install`, and point to the new files.
1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages: 1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:
```console ```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 2. Images, containers, volumes, or custom configuration files on your host

View File

@ -58,9 +58,11 @@ $ sudo zypper addrepo $opensuse_repo
### Uninstall old versions ### Uninstall old versions
Older versions of Docker went by `docker` or `docker-engine`. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Uninstall any such older versions before attempting to install a new version,
along with associated dependencies. 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 ```console
$ sudo zypper remove docker \ $ sudo zypper remove docker \
@ -112,7 +114,7 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo
#### Install Docker Engine #### Install Docker Engine
1. Install Docker Engine, containerd, and Docker Compose: 1. Install the Docker packages.
{{< tabs >}} {{< tabs >}}
{{< tab name="Latest" >}} {{< tab name="Latest" >}}
@ -162,7 +164,7 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
2. Start Docker. 2. Start Docker Engine.
```console ```console
$ sudo systemctl enable --now docker $ sudo systemctl enable --now docker
@ -172,8 +174,7 @@ $ sudo zypper addrepo {{% param "download-url-base" %}}/docker-ce.repo
boot your system. If you don't want Docker to start automatically, use `sudo boot your system. If you don't want Docker to start automatically, use `sudo
systemctl start docker` instead. systemctl start docker` instead.
3. Verify that the Docker Engine installation is successful by running the 3. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image.
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -212,14 +213,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 Docker is installed but not started. The `docker` group is created, but no
users are added to the group. users are added to the group.
3. Start Docker. 3. Start Docker Engine.
```console ```console
$ sudo systemctl start docker $ sudo systemctl enable --now docker
``` ```
4. Verify that the Docker Engine installation is successful by running the This configures the Docker systemd service to start automatically when you
`hello-world` image. 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 ```console
$ sudo docker run hello-world $ sudo docker run hello-world

View File

@ -62,9 +62,9 @@ s390x, and ppc64le (ppc64el) architectures.
Before you can install Docker Engine, you need to uninstall any conflicting packages. Before you can install Docker Engine, you need to uninstall any conflicting packages.
Distro maintainers provide unofficial distributions of Docker packages in Your Linux distribution may provide unofficial Docker packages, which may conflict
APT. You must uninstall these packages before you can install the official with the official packages provided by Docker. You must uninstall these packages
version of Docker Engine. before you install the official version of Docker Engine.
The unofficial packages to uninstall are: The unofficial packages to uninstall are:
@ -111,7 +111,7 @@ You can install Docker Engine in different ways, depending on your needs:
### Install using the `apt` repository {#install-using-the-repository} ### Install using the `apt` repository {#install-using-the-repository}
Before you install Docker Engine for the first time on a new host machine, you Before you install Docker Engine for the first time on a new host machine, you
need to set up the Docker repository. Afterward, you can install and update need to set up the Docker `apt` repository. Afterward, you can install and update
Docker from the repository. Docker from the repository.
1. Set up Docker's `apt` repository. 1. Set up Docker's `apt` repository.
@ -166,15 +166,14 @@ Docker from the repository.
Select the desired version and install: Select the desired version and install:
```console ```console
$ VERSION_STRING=5:27.1.1-1~ubuntu.24.04~noble $ VERSION_STRING=5:27.3.1-1~ubuntu.24.04~noble
$ sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin $ sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
``` ```
{{< /tab >}} {{< /tab >}}
{{< /tabs >}} {{< /tabs >}}
3. Verify that the Docker Engine installation is successful by running the 3. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image.
```console ```console
$ sudo docker run hello-world $ sudo docker run hello-world
@ -229,8 +228,7 @@ download a new file each time you want to upgrade Docker Engine.
The Docker daemon starts automatically. The Docker daemon starts automatically.
6. Verify that the Docker Engine installation is successful by running the 6. Verify that the installation is successful by running the `hello-world` image:
`hello-world` image.
```console ```console
$ sudo service docker start $ sudo service docker start
@ -267,6 +265,13 @@ To upgrade Docker Engine, download the newer package files and repeat the
$ sudo rm -rf /var/lib/containerd $ sudo rm -rf /var/lib/containerd
``` ```
3. Remove source list and keyrings
```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. You have to delete any edited configuration files manually.
## Next steps ## Next steps