Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (2.3k points)
how to install docker on centos?

1 Answer

0 votes
by (6.9k points)


  • You must have the "centos-extras" repository enabled. 
  • You must have Super-user access ( sudo )
  • You will the need the "yum" package installer
Installation Steps:
Step 0: ( optional )
Uninstall any old versions of docker you may have using the below command:
$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
Step 1: 
Allow for the docker package database to be up to date.
$ sudo yum check-update

Step 2:

Install all of the necessary packages:

$ sudo yum install -y yum-utils \
  device-mapper-persistent-data \

Step 3:

Setup a stable repository for docker, this is so that you can later update docker from this repository when needed:

$ sudo yum-config-manager \
    --add-repo \

 Step 4:

Now go ahead an install docker properly using the below command, it will install all the important docker components:

$ sudo yum install docker-ce docker-ce-cli

You may be asked validate the installation by giving you a GPG key, It should look something like this:

060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35 

You have now successfully installed Docker. The END. 

Hope this helped :)

Anyhow if you are new to docker or are looking to become more proficient in docker try out docker training course.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Apr 1, 2020 in DevOps and Agile by chandra (29.3k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

30.5k questions

32.5k answers


108k users

Browse Categories