Installing Docker on Centos 8


In opposite to Centos 7, the next version does not have the package in main repositories, which is required to have the Docker. To install Docker on Centos 8, we have to first add Docker repository to our system.

Adding GitLab repository

Fortunatelly, Docker provides third party repository with all required packages. To add the repository, execute the following: sudo dnf config-manager --add-repo= Now dnf should be able to install docker-ce package.

Installing Docker

Finally we can install docker package.

sudo dnf install docker-ce

[taciaka@leszy yum.repos.d]$ sudo dnf install docker-ce
Last metadata expiration check: 0:00:29 ago on Wed 09 Dec 2020 11:54:23 PM CET.
Package docker-ce-3:19.03.14-3.el8.x86_64 is already installed.
Dependencies resolved.
 Package                           Architecture   Version                                        Repository                Size
Upgrading:                     x86_64         1.4.3-3.1.el8                                  docker-ce-stable          33 M
 docker-ce                         x86_64         3:20.10.0-3.el8                                docker-ce-stable          27 M
Installing dependencies:
 docker-ce-rootless-extras         x86_64         20.10.0-3.el8                                  docker-ce-stable         9.1 M
 fuse-overlayfs                    x86_64         1.1.2-3.module_el8.3.0+507+aa0970ae            AppStream                 67 k
 fuse3-libs                        x86_64         3.2.1-12.el8                                   BaseOS                    94 k
 libslirp                          x86_64         4.3.1-1.module_el8.3.0+475+c50ce30b            AppStream                 69 k
 slirp4netns                       x86_64         1.1.4-2.module_el8.3.0+475+c50ce30b            AppStream                 50 k

Transaction Summary
Install  5 Packages
Upgrade  2 Packages

Total download size: 69 M
Is this ok [y/N]:

As you can notice, some packages come from new, docker-ce repository.