Installing Docker on AlmaLinux 8

Hello,

In this week’s feature highlight, we look at How to Install Docker on AlmaLinux 8

What is Docker?

Docker is basically a container engine which uses the Linux Kernel in order to create the containers on top of an operating system. Which is use to create, deploy and run the applications.

First, check and install any pending system updates.

yum update 

Adding Docker repository

Enable the Docker CE repository by running the following command.

dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Output:

[root@vps ~]# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo

Installing Docker-ce package

Install Docker-ce package on AlmaLinux 8 by running the following command.

dnf -y  install docker-ce --nobest

Output:

[root@vps ~]# dnf -y  install docker-ce --nobest
Docker CE Stable - x86_64                       147 kB/s |  11 kB     00:00
Dependencies resolved.
================================================================================
 Package                      Arch   Version             Repository        Size
================================================================================
Installing:
 docker-ce                    x86_64 3:20.10.5-3.el8     docker-ce-stable  27 M
Installing dependencies:
 checkpolicy                  x86_64 2.9-1.el8           baseos           347 k
 container-selinux            noarch 2:2.155.0-1.module_el8.3.0+2046+68fb1526
                                                         appstream         50 k
 containerd.io                x86_64 1.4.4-3.1.el8       docker-ce-stable  33 M
 docker-ce-cli                x86_64 1:20.10.5-3.el8     docker-ce-stable  33 M

Enable the Docker service.

systemctl enable --now docker

Output:

[root@vps ~]# systemctl enable --now docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.

Checking the Docker service

To verify the Docker service by running the following command.

systemctl status  docker

Output:

[root@vps ~]# systemctl status  docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor pres>
   Active: active (running) since Thu 2021-03-18 15:10:09 GMT; 25s ago
     Docs: https://docs.docker.com
 Main PID: 7649 (dockerd)
    Tasks: 9
   Memory: 44.3M
   CGroup: /system.slice/docker.service
           └─7649 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/contai>

Mar 18 15:10:07 vps.server.com dockerd[7649]: time="2021-03-18T15:10:07.8416726>
Mar 18 15:10:07 vps.server.com dockerd[7649]: time="2021-03-18T15:10:07.8417156> 

Done!

(Visited 369 times, 1 visits today)