You can Watch all our Tutorials and Training Videos on our YouTube Channel for Free! Subscribe Now! & Free Web Tools available on

How to Install Docker on CentOS 7 / RHEL 7

how to install docker on linux, docker tutorial, docker installation on linux, install docker docker on centos rhel, docker install command on linux
This post will help you with How to Install Docker on CentOS 7 / RHEL 7 with step by step procedure. End of this post, you will be able to understand how to install docker on Linux.

How to Install Docker on CentOS 7 / RHEL 7

Lets get started.

Also Watch this "Docker Installation and Docker CLI Usages" Tutorial video demo on our YouTube Channel.

1. How to enable repository for docker?

On CentOS 7:

Docker packages are available in Centos 'Extras' repository itself. Make sure that this extras repository is enabled or not.

[root@docker-server ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base:
* extras:
* updates:
repo id                                            repo name                                                                   status
base/7/x86_64                                      CentOS-7 - Base                                                               9,591
extras/7/x86_64                                    CentOS-7 - Extras                                                               448
media                                              CentOS 7.2 - 64 Bit DVD                                                       3,723
updates/7/x86_64                                   CentOS-7 - Updates                                                              731

If it is not enabled, change "enabled=0" to "enabled=1" in the /etc/yum.repos.d/CentOS-Base.repo. It must looks like below content on extras section.

#additional packages that may be useful
name=CentOS-$releasever - Extras

On RHEL 7:

subscription-manager repos --enable=rhel-7-server-rpms
subscription-manager repos --enable=rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-optional-rpms

Once you have enabled the required repositories, lets start the docker installation.

2. How to Install Docker using Yum command?

Use "yum" command to install docker with required dependencies automatically.

[root@docker-server ~] yum -y install docker

3. How to Start and Enable the Docker service?

[root@docker-server ~] systemctl start docker
[root@docker-server ~] systemctl enable docker

4. How to Verify Docker information?

Use below docker command with "-v" option to know the docker package version with build release information.

[root@docker-server ~]# docker -v
Docker version 1.13.1, build 774336d/1.13.1

Also use "version" argument along with docker command to know the relevant information about the docker package.

[root@docker-server ~]# docker version
Version:         1.13.1
API version:     1.26
Package version: <unknown>
Go version:      go1.8.3
Git commit:      774336d/1.13.1
Built:           Wed Mar  7 17:06:16 2018
OS/Arch:         linux/amd64
Version:         1.13.1
API version:     1.26 (minimum version 1.12)
Package version: <unknown>
Go version:      go1.8.3
Git commit:      774336d/1.13.1
Built:           Wed Mar  7 17:06:16 2018
OS/Arch:         linux/amd64
Experimental:    false

That's all about the Installation of Docker on Linux servers, Its pretty straight forward. Going forward, we will play more with docker tool.
Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.