You have two options for in­stalling Docker on Red Hat En­ter­prise Linux 9. Although creating a repos­i­to­ry is rec­om­mend­ed, manual in­stal­la­tion is also possible.

How to install Docker on Red Hat 9

Docker’s open platform sim­pli­fies de­vel­op­ment across multiple locations or machines and fa­cil­i­tates seamless team col­lab­o­ra­tion. Because ap­pli­ca­tions and their de­pen­den­cies can be sent and executed together in Docker con­tain­ers, per­for­mance is also massively improved. A popular com­bi­na­tion is Docker with Red Hat En­ter­prise Linux 9. The pro­pri­etary Linux dis­tri­b­u­tion is now regarded as one of the most robust, secure and flexible solutions specif­i­cal­ly for companies. Its com­pat­i­bil­i­ty with numerous software packages also speaks in favor of the platform. We explain how to install Docker on Red Hat En­ter­prise Linux (RHEL).

Tip

In our Digital Guide you will also find com­pre­hen­sive in­struc­tions for in­stalling Docker on RHEL 8.

What re­quire­ments must be met?

To install Docker on RHEL 9, you need to take a few pre­lim­i­nary steps. First, ensure you have a virtual machine running the ap­pro­pri­ate version of Red Hat En­ter­prise Linux. Our Digital Guide provides in­struc­tions on how to install RHEL 9. You’ll also need ad­min­is­tra­tor priv­i­leges for this virtual machine. Ad­di­tion­al­ly, a stable internet con­nec­tion is essential for down­load­ing all the required packages. Once these con­di­tions are met, you can proceed with the in­stal­la­tion.

Steps for in­stalling Docker on Red Hat En­ter­prise Linux 9

The simplest way to install Docker on Red Hat En­ter­prise Linux 9 is through an rpm repos­i­to­ry. Begin by setting up this repos­i­to­ry and then proceed with the following steps. We recommend this approach, as it also sim­pli­fies future updates. Here’s the process:

Remove old versions of Docker

Before in­stalling a new version of Docker, it’s important to uninstall any older versions along with all related de­pen­den­cies. This process will also remove the package manager Podman. Afterward, you’ll use the YUM (Yellowdog Updater, Modified) package man­age­ment system for the necessary steps. The code for this process is as follows:

sudo yum remove docker \
    docker-client \
    docker-client-latest \
    docker-common \
    docker-latest \
    docker-latest-logrotate \
    docker-logrotate \
    docker-engine \
    podman \
    runc
bash

If no old versions can be found, YUM will inform you.

Update system

Before you carry out the in­stal­la­tion, it makes sense to update your entire system first. This will ensure that all files and de­pen­den­cies are up to date. This in­struc­tion can be used for this purpose:

yum update
bash

Create repos­i­to­ry

The in­stal­la­tion is carried out via a repos­i­to­ry. If you want to create this directory, you will need the yum-utils package, which contains the YUM con­fig­u­ra­tion manager. Use the following two command lines to install yum-utils, start the manager and create a new repos­i­to­ry for Docker on RHEL 9:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
bash

Install current version or any version

To install the latest version of Docker on Red Hat En­ter­prise Linux 9, use the following command. This will install the Docker engine along with the con­tain­erd runtime and the Docker Compose or­ches­tra­tion tool.

sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
bash

In some cases, you will be asked for the GPG key. Compare the stored key with this com­bi­na­tion of numbers. If both match, confirm that they are correct.

060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
bash

If you want to use a specific version of Docker for RHEL 9, you can view a list of all available options from the repos­i­to­ry and select the version that suits your needs. An example of such a list looks like this:

yum list docker-ce --showduplicates | sort -r
docker-ce.s390x    3:24.0.0-1.el8    docker-ce-stable
docker-ce.s390x    3:23.0.6-1.el8    docker-ce-stable
<...>
bash

Decide on the desired version and enter the full version name in the following command instead of the place­hold­er “version_name”. These names are always struc­tured according to the same principle: Name of the package (in this case “docker-ce”), then a hyphen and followed by the version number. For the first option from the list above, this would be the correct name: docker-ce-3:24.0.0-1.el8.

sudo yum install docker-ce-version_name docker-ce-cli-version_name containerd.io docker-buildx-plugin docker-compose-plugin
bash

Check Docker

To ensure that the in­stal­la­tion of Docker on Red Hat En­ter­prise Linux 9 was suc­cess­ful, start the platform with this command:

sudo systemctl start docker
bash

Then create the Docker image “hello-world”. If this works as expected, the in­stal­la­tion was suc­cess­ful.

sudo docker run hello-world
bash

How to install Docker on RHEL 9 manually

There is also the option of in­stalling Docker on RHEL 9 without creating a repos­i­to­ry.

Remove all old versions of Docker on RHEL 9

First, delete all old versions of Docker on Red Hat En­ter­prise Linux 9 and the package manager Podman. This code could be used for this:

sudo yum remove docker \
    docker-client \
    docker-client-latest \
    docker-common \
    docker-latest \
    docker-latest-logrotate \
    docker-logrotate \
    docker-engine \
    podman \
    runc
bash

Download rpm file

Go to the official Docker download page and download the desired rpm file.

Start in­stal­la­tion

To start the in­stal­la­tion of Docker on Red Hat En­ter­prise Linux 9, use the following command. Instead of the place­hold­er “path/to/your/package”, enter the location of the rpm file.

sudo yum install /path/to/your/package.rpm
bash

Check in­stal­la­tion

When the in­stal­la­tion is complete, start Docker with this command:

sudo systemctl start docker
bash

Create the “hello-world” Docker image. If this works, it means that the in­stal­la­tion was suc­cess­ful.

sudo docker run hello-world
bash
Compute Engine
The ideal IaaS for your workload
  • Cost-effective vCPUs and powerful dedicated cores
  • Flex­i­bil­i­ty with no minimum contract
  • 24/7 expert support included
Go to Main Menu