How to install Docker CE on CentOS 8

What you'll need 

The only things you'll need are: 

  • A working instance of CentOS 8, you can order one real quick here
  • A user with sudo privileges

How to add the necessary Docker repository 

We're going to be using the dnf config-manager utility to add the Docker repository. To do this, open a terminal window and issue the command: 

sudo dnf config-manager --add-repo=

How to locate an installable version of Docker CE

As of now, Red Hat has blocked the installation of docker-ce, so if you attempt to run the command sudo dnf install docker-ce, it will fail. Instead, you must install a specific version of Docker. To find out which versions are available, issue the command: 

dnf list docker-ce --showduplicates | sort -r

From that list, we can see version docker-ce-3:18.09.1-3.el7 is available for installation

How to install Docker CE 

To install that version, issue the command: 

sudo dnf install docker-ce-3:18.09.1-3.el7

In order to force DNS resolution to work within Docker containers, the firewalld must be disabled. To do that, issue the command: 

sudo systemctl disable firewalld

Next we'll start and enable the docker daemon with the command: 

sudo systemctl enable --now docker

Finally, add your user to the docker group with the command: 

sudo usermod -aG docker $USER


Congratulations, you now have Docker CE running and ready to work on CentOS 8. Begin deploying those containerized applications.

  • centos 8, docker ce, linux
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to change maximum upload size in php.ini

  There are a few common errors that occur in Wordpress and other PHP-based programs that use...

How to change the primary IP address of a cPanel server

Steps in WHM: Log into WHM and go to Basic cPanel & WHM Setup Change the Primary IP here...

How to install WordPress with Docker on Ubuntu 16.04

Before we start, it is necessary to install Docker and Docker Compose. On Ubuntu 16.04, this can...

How to Upgrade Kernel to Latest Version in Ubuntu

It is important to keep your systems up-to-date, here we'll show you how to upgrade your kenerl...

How to configure SQL server in Linux

Problem You installed SQL Server on Linux and need to customize the default installation, for...