How to install Docker on CentOS 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.

  sudo yum update -y

Adding Docker repository

Enable the Docker CE repository by running the following command.

  sudo dnf config-manager --add-repo=


  Adding repo from:

Installing Docker-ce package

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

  sudo dnf -y  install docker-ce --nobest


    Verifying        :                                                                              10/12
    Verifying        : docker-ce-3:18.09.1-3.el7.x86_64                                                                              11/12
    Verifying        : docker-ce-cli-1:19.03.5-3.el7.x86_64                                                                          12/12

    docker-ce-3:18.09.1-3.el7.x86_64                        container-selinux-2:2.94-1.git1e99f1d.module_el8.0.0+58+91b614e7.noarch
    checkpolicy-2.8-2.el8.x86_64                            libcgroup-0.41-19.el8.x86_64
    policycoreutils-python-utils-2.8-16.1.el8.noarch        python3-audit-3.0-0.10.20180831git0047a6c.el8.x86_64
    python3-libsemanage-2.8-5.el8.x86_64                    python3-policycoreutils-2.8-16.1.el8.noarch
    python3-setools-4.2.0-2.el8.x86_64                      tar-2:1.30-4.el8.x86_64                        docker-ce-cli-1:19.03.5-3.el7.x86_64



Enable the Docker service.

  systemctl enable --now docker


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

Check the Docker service

To verify the Docker service by running the following command.

  systemctl status  docker


  ● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2019-11-30 05:45:17 EST; 15min ago
   Main PID: 31701 (dockerd)
      Tasks: 21
     Memory: 65.5M
     CGroup: /system.slice/docker.service
             ├─31701 /usr/bin/dockerd -H fd://
             └─31719 containerd --config /var/run/docker/containerd/containerd.toml --log-level info

  Nov 30 05:45:16 dockerd[31701]: time="2019-11-30T05:45:16.356748363-05:00" level=info msg="Graph migration to content-add>
  Nov 30 05:45:16 dockerd[31701]: time="2019-11-30T05:45:16.357870127-05:00" level=warning msg="Your kernel does not suppor>
  Nov 30 05:45:16 dockerd[31701]: time="2019-11-30T05:45:16.358182793-05:00" level=warning msg="Your kernel does not suppor>
  Nov 30 05:45:16 dockerd[31701]: time="2019-11-30T05:45:16.359440886-05:00" level=info msg="Loading containers: start."
  Nov 30 05:45:17 dockerd[31701]: time="2019-11-30T05:45:17.164195394-05:00" level=info msg="Default bridge (docker0) is as>
  Nov 30 05:45:17 dockerd[31701]: time="2019-11-30T05:45:17.642795447-05:00" level=info msg="Loading containers: done."
  Nov 30 05:45:17 dockerd[31701]: time="2019-11-30T05:45:17.759556269-05:00" level=info msg="Docker daemon" commit=4c52b90 >
  Nov 30 05:45:17 dockerd[31701]: time="2019-11-30T05:45:17.760971934-05:00" level=info msg="Daemon has completed initializ>
  Nov 30 05:45:17 dockerd[31701]: time="2019-11-30T05:45:17.790726821-05:00" level=info msg="API listen on /var/run/docker.>
  Nov 30 05:45:17 systemd[1]: Started Docker Application Container Engine.