How to Install Docker on CentOS 7 / RHEL 7

docker linux, install docker, how to install docker, installing docker, docker install, docker installation, install docker on linux, install docker on centos

This post shows you 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.

Steps involved in this Docker Installation,
1. How to enable repository for docker?
2. How to Install Docker using Yum command?
3. How to Start and Enable the Docker service?
4. How to Verify Docker information?

How to Install Docker on CentOS 7 / RHEL 7

In the previous posts, already we have explained the below topics. Refer those links to understand this topic from basics.

What is Docker - Get Started from Basics - Docker Tutorial
What is Container, What is Docker on Container - Get Started
How to Install Docker on CentOS 7 / RHEL 7
Docker Images Explained with Examples - Docker Tutorial
Dockerfile Instructions Explained with Examples
How to Write Dockerfile To Build Your Own Docker Images
Docker ONBUILD Command Explained with Examples
Docker ARG vs ENV Command Differences Explained in Detail
Docker CMD & ENTRYPOINT Differences Explained in Detail

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: mirror.steadfast.net
 * extras: centos.eecs.wsu.edu
 * updates: mirror.compevo.com
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.
[ads-post]
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
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
Client:
 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
Server:
 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. docker, install docker, how to install docker, what is docker, installing docker, docker install, docker installation, install docker on linux, install docker on centos, install docker on redhat, install docker on rhel 7, how to install docker on linux.
Also refer other articles,

What is Docker - Get Started from Basics - Docker Tutorial
What is Container, What is Docker on Container - Get Started
How to Install Docker on CentOS 7 / RHEL 7
Docker Images Explained with Examples - Docker Tutorial
Dockerfile Instructions Explained with Examples
How to Write Dockerfile To Build Your Own Docker Images
Docker ONBUILD Command Explained with Examples
Docker ARG vs ENV Command Differences Explained in Detail
Docker CMD & ENTRYPOINT Differences Explained in Detail

Support Us: Share with your friends and groups.
how to install docker on centos, install docker linux, install docker centos, install docker redhat, install docker rhel 7, download docker, how to download docker
Stay connected with us on social networking sites, Thank you.
YouTube | Facebook | Twitter | Pinterest | Rss docker tutorial, docker install linux, docker install centos, docker install redhat, step by step docker install, how to install docker on centos 7, how to install docker on rhel 7, install docker centos 7, installing docker
May 03, 2018

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget