Serverspace Black Friday
JT
June 26, 2024
Updated July 12, 2024

Installation Docker on Rocky Linux

Linux Maintenance

To work with the Docker containerisation platform, you need to perform a number of actions to prepare the server for work and install the application itself with the kernel-level virtualisation mechanism. To work with servers, you mainly use components within Docker Engine + Docker CLI as a kernel and client to work with. In this tutorial we will cover their installation!

How do I install Docker on an RPM-like OS?

All steps in the tutorial can be performed on powerful cloud servers. Serverspace provides isolated VPS / VDS servers for common and virtualize usage.

Create Server
Screenshot №1 — Create Server

It will take some time to deploy server capacity. After that you can connect in any of the convenient ways!

Let's move on to configuring the server itself, firstly install the necessary dependencies and update the packages on the OS:

dnf update -y
Update packages
Screenshot №2 — Update packages

To install Docker, go to the repositories directory and add a new one with the command:

nano /etc/yum.repos.d/docker-ce.repo

After which we will write the appropriate syntax:

[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/rhel/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/rhel/gpg
Configure repository
Screenshot №3 — Configure repository

Explicitly specified the name, a link to the repository with the stored data. The Enabled item indicates that the repository should be included in the list of utility searches, enabled gpg checking, and also provided a URL link to the key itself for checking incoming packages. Let's try to install the utilities to check if they work:

dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Result of installation
Screenshot №4 — Result of installation

After that it is necessary to specify the installation by entering the Y value and wait for the end of the installation, for starting we need to execute a command:

systemctl start docker

But what if a wrong version has been installed or you just need to uninstall the container manager?

To install a specific version of Docker packages, specify the required version in the line after each package, for example dnf install docker-ce VERSION_STRING.

How do I uninstall Docker from Linux?

You can also use a package manager and a special mask to uninstall:

dnf remove docker* podman containerd.io

And also it is necessary to remove the remaining packages on the machine:

sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd

After that the files from the operating system will be deleted, to reinstall the necessary packages use the dnf reinstall command.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
33145 North Miami, FL 2520 Coral Way apt 2-135
+1 302 425-97-76
700 300
ITGLOBAL.COM CORP
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.