Digital Communication


Digital Communication

Install Docker on CentOS 7


Docker is an open source platform for building and running applications in so-called containers. A container is an isolated environment containing all Dependencies required by an application. Since Linux-based operating systems like CentOS are popular development platforms, they pair well with Docker. We show you how to install Docker quickly and easily on your CentOS 7 system and how to use it.

Required configuration

Since Docker is standard software, its hardware requirements are not too demanding. Its software configuration, however, is more specific, which is why we have listed all the system requirements:

  • 64-bit processor compatible with virtualization
  • 4 GB RAM
  • Office environment: Gnome, KDE or MATE
  • Compatibility with KVM virtualization
  • QEMU (version 5.2 minimum)
  • systemd

The appropriate server

Depending on the application, sometimes it may be optimal to run Docker on a server and not on your local computer. For this purpose, there are different types of servers suitable for different application scenarios.

With some virtualized servers, like the Cloud server or the VPS (Virtual Private Server) from IONOS, you benefit from constantly evolving resources. This means that when purchasing a server, you do not have to count on overhead costs: your server always has as many resources as necessary. The two types of servers are distinguished by billing. The Cloud server offers you a billing per minute while the VPS applies billing according to a fixed monthly price.

If a virtualized server is insufficient for your objectives, IONOS also offers a dedicated server whose resources are continuously reserved for you. The dedicated server works for this on the latest business hardware. This way you can be sure that your application always has maximum power. Like the Cloud server, the dedicated server also works according to the principle of per-minute billing.

Usage scenario Suitable type of servers
Server for developing your application; you only pay for the time you actually use the server to test your application. XL Cloud Server
Server for the development or deployment of an application which is very often or even constantly online. [VPS Linux XL]( “IONOS VPS Hosting”)
Enterprise server for deploying an application requiring a lot of resources; Rest assured that your application always runs on the most secure, high-performance hardware, and that you never have to share that hardware. Dedicated server

Installing via yum

As with most other systems, there are several ways to install software on Linux. Installation via a package manager is often the simplest method. The standard package manager for CentOS is called yum. Only a few steps are required to install Docker via yum.

Step 1: Refresh yum and all packages.

Firstly, you need to update your package manager, your installed packages and your Linux kernel. To do this, enter the following command in your shell:

Screen appearing after refreshing yum
Terminal screen after refreshing yum

If you have already used Docker on your system, you should remove all Docker components before its installation. To do this, enter the following command. If you have never installed Docker on your system, you can skip this step.

sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine


Step 2: Install dependencies

Depending on how often you refresh your software, the refresh may take several minutes. Once the refresh is complete, you need to enter the following command to install the dependencies required by Docker:

sudo yum install -y yum-utils device-mapper-persistent-data lvm2


Screen appearing once dependencies are installed
Terminal screen appearing after dependencies are installed

Step 3: Add the Docker directory.

You must now add the Docker directory of your package manager. To do this, enter the following command:

sudo yum-config-manager --add-repo


Screen appearing after adding directory
Terminal screen appearing after –add-repo

The above command adds the directory Docker Community Edition (CE) from your package manager. If you want to install Docker Enterprise Edition (EE)you need to replace the URL above with your Docker EE license URL.

Step 4: Install Docker.

Now it’s time to install Docker on your CentOS system. To complete the installation process, use this command:

sudo yum install docker-ce


Screen appearing after installing Docker on CentOS
Terminal screen after installing docker CE

Besides docker-ce (previously called Docker Engine), other Docker components are also often installed, such as Docker Compose, containerd and the CLI version of Docker CE. If you also want to install these components, use the following shell command and not the one mentioned above:
sudo yum install docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin

You can now test whether the installation was successful using the following command:

sudo systemctl start docker
sudo docker run hello-world


Verify Docker installation on CentOS
Terminal screen after verifying Docker installation

Manual installation

If you cannot or do not want to use the Docker directory, you can also manually install the Docker package. To do this, it is important to note that your Docker installation will not refresh automatically. You will have to do it yourself. Before starting the manual installation, you must follow steps 1 and 2 described previously.

Step 1: Download Docker.

Go to the Docker website and download the version you are looking for. We recommend downloading the current version starting with “docker-ce” (and not the “cli” or “rootless” versions). Remember the location where you save this file .rpm.

Step 2: Install the package.

In your shell, run the following command replacing “/paket.rpm” with the path to the Docker package you downloaded.

sudo yum install /paket.rpm


Check Manual Docker Installation on CentOS
Terminal screen after manual Docker installation is verified

Télécharger notre livre blanc

Comment construire une stratégie de marketing digital ?

Le guide indispensable pour promouvoir votre marque en ligne

En savoir plus

Souhaitez vous Booster votre Business?

écrivez-nous et restez en contact