I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

How to install Docker CE on Rocky Linux 8

Hello, friends. In this post, you will learn how to install Docker CE on Rocky Linux 8. The process is simple, and we will be able to install the latest stable version of the tool.

Docker is a technology that allows us to deploy applications and operating systems in containers that are distributed in images.

Many blogs have commented on Docker, including ours. That is why this technology is so popular and so widely used worldwide.

As we know, CentOS 8 came to an end on December 31 of last year, so we have to migrate to alternatives such as Rocky Linux or Alma Linux.

So let’s go for it.

Installing Docker CE on Rocky Linux 8

Docker has a dedicated CentOS repository that we can apply to Rocky Linux. So, the ideal would be to add it to the system and install it from there.

First access your server via SSH or, if you are using Rocky Linux from the desktop, open a terminal.

Now install the yum-utils package.

sudo dnf install yum-utils

With this package installed, we can add the Docker repository.

sudo yum-config-manager --add-repo


Adding repo from:

If you want to check if the repository has been successfully added, you can run

sudo dnf repolist
1.- Rocky Linux repos
1.- Rocky Linux repos

Thereafter, you can install Docker CE and its packages on the system.

sudo dnf install docker-ce docker-ce-cli
2.- Installing Docker on Rocky Linux 8
2.- Installing Docker on Rocky Linux 8

With this process, Docker is already installed, but its service is not started.

To start the Docker service, run

sudo systemctl start docker

It is convenient that the service starts with the system, to do this

sudo systemctl enable docker


Created symlink /etc/systemd/system/ → /usr/lib/systemd/system/system/docker.service

Finally, you can check the status of the service

sudo systemctl status docker
3.- Docker status
3.- Docker status

In conclusion, Docker is installed correctly.

First steps with Docker CE on Rocky Linux

Using Docker requires root permissions. This can be a problem for many people, so a real option would be to add the user to the docker group.

To complete this, run the following command

sudo usermod -aG docker $USER

Now, you can run Docker and for this you can use the test image.

docker run hello-world
4.- Docker running properly
4.- Docker running properly

In case you get permissions error, just restart the terminal or the SSH session.

So, you will get an output screen similar to this one.

Indicating that Docker has been successfully installed on the system.


In this post, you have learned how to install Docker CE on Rocky Linux 8, I hope it has helped you. Don’t forget to share the post.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook