How To Install Docker On CentOS/RHEL 6/7 And Learn Docker HUB Registration
Docker Linux Tutorials

How To Install Docker On CentOS/RHEL 6/7 And Learn Docker HUB Registration

Docker can be installed easily and it is available for almost every Linux distro’s and other OS(s) like Windows or Mac. Docker can also be compiled on the local system itself with the use of source code present on GitHub. Also, there are pre-compiled packages for Docker. It can be installed on the Host Machine OS or on a Virtual Machine.

As I mentioned that Docker can be installed on the Host Machine OS or on a Virtual Machine so it’s up to you what you gonna do. But before moving further with installation process you may like read about Docker, its components, and benefits

Part 1: What Is Docker And Concept Of Containers With Virtualization?
Part 3A: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 A
Part 3B: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 B
Part 4: How To Perform Task Like Install, Run And Delete Applications Inside Docker Containers

So let’s start

Scenario :

Host OS: CentOS 7 x86_64
RAM: 4GB memory,
Network Port:  1GB/s
HDD: 1000GB of disk space.

Prerequisite:

  1. Disabled the SELinux and FirewallD services
  2. We will pull the Docker-relevant packages from the repo, so provide proxy details.

 Note: –  If the system is behind the proxy, then ensure that HTTP_PROXY and HTTPS_PROXY are defined in the configuration file /etc/sysconfig/docker

Note: This tutorial is for the scenario mentioned above but commands and steps for RHEL/CentOS 6/7 are same.

Step 1: Install EPEL Repository

For the installation of Docker, we required EPEL (Extra Packages for Enterprise Linux) repository pre-configured on CentOS/RHEL 6. But, If you are running a CentOS/RHEL 7 then you don’t need to install EPEL because CentOS 7 already have all packages required for Docker installation.

For RHEL/CentOS 6 32-64 Bit

For RHEL/CentOS 6 64-Bit

Step 2:  Perform Docker Installation

We have completed and finished our dependencies and now we can move forward with Docker installation with following commands

For CentOS/RHEL 7

For RHEL 6



Step 3: Start/Enable Docker Service

As we have successfully installed Docker and service, we need to start its service. For starting docker we need will use the following sets of command for CentOS/RHEL 6/7. Also we ill enable the service for current runlevel(s).

For RHEL/CentOS 7

For RHEL/CentOS 6

Step 4: Verify Installation

As we have a successful installation and a running service of Docker, we can verify its presence with two methods

1 . Checking Version 

2. Saying Hello 🙂 To Docker

If you could See this then Your Docker installation is a success and its verified.

Now if you want to pull images(CentOS, Ubuntu etc.) from the Docker Hub then you need to complete a registration process on Docker HUB.  After successful registration, those credentials will be used for several other purposes too, other just pulling images from HUB.

Once the registration is done, use the command docker login to log into the hub. (We will use this in Next Article)

But For Now A Quick Guide for  Docker Registration

Docker Hub is a registry service on the cloud that allows you to download Docker images that are built by other communities. You can also upload your own Docker built images to Docker hub.

Step 1: Follow the Link For Docker HUB  (https://hub.docker.com/) And Complete The Form

How to Install Docker on CentOS/RHEL 6/7 and Learn Docker HUB Registration

Step 2:- Active Your Account after clicking on the link you got in your Activation Email on your Email ID

Step 3: – After Logging in you Docker HUB Interface Be like this

How to Install Docker on CentOS/RHEL 6/7 and Learn Docker HUB Registration

We will continue to Docker command usage in next tutorials and we will create or own containers and images and try to explore more.


Read More:

Part 1: What Is Docker And Concept Of Containers With Virtualization?
Part 2: How To Install Docker On CentOS/RHEL 6/7? And Learn Docker HUB Registration
Part 3A: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 A
Part 3B: Getting Familiar With Docker Commands Docker Terms: Docker – Part 3 B
Part 4: How To Perform Task Like Install, Run And Delete Applications Inside Docker Containers

Kapendra
Love to write technical stuff with personal experience as I am working as a Sr. Linux Admin. and every day is a learning day and Trust me being tech geek is really cool.
http://kapendra.com

Leave a Reply