Install docker on Centos/Redhat – Part 1

What is Docker..?

install docker on centosIn this tutorial i will show you how to install docker on Centos Redhat & Fedora so firstly we need to know what is Docker..?

Docker is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of operating-system-level virtualization on Linux. Docker uses resource isolation features of the Linux kernel such as cgroups and kernel namespaces to allow independent “containers” to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.

The Linux kernel’s support for namespaces mostly isolates an application’s view of the operating environment, including process trees, network, user IDs and mounted file systems, while the kernel’s cgroups provide resource isolation, including the CPU, memory, block I/O and network. Since version 0.9, Docker includes the libcontainer library as its own way to directly use virtualization facilities provided by the Linux kernel, in addition to using abstracted virtualization interfaces via libvirt, LXC (Linux Containers) and systemd-nspawn.

source wikipedia

In Simple words Docker is a Process based Virtualization Software. It uses process instead of any hypervisors.

There are five of the docker tutorial:

Part 1 : Installation and Configuration of Docker in Centos/Redhat & Fedora

Part 2 : Installation and Configuration of Docker in Ubuntu

Part 3 : Basic Docker Commands

Part 4 : How to run Container in Docker

Part 5 : How to take Backup & Restore of Docker Container

Install Docker on Centos Redhat & Fedora

Step 1 : Prerequisite for docker

Install EPEL Repo for your Distribution use following command to install epel:

yum install epel-release

Step 2 : Install docker

yum install docker -y

Another Method for installing Docker by docker repo

Step 3 : Make a file in /etc/yum.repos.d with name docker.repo:

vim /etc/yum.repos.d/docker.repo

name=Docker repository

Step 4 : Install Docker

yum install docker-engine -y

Step 5 : Start service of docker

On Centos/Redhat 7

systemctl start docker
systemctl enable docker

On Centos/redhat 6

service start docker
chkconfig  docker on

Step 6 : Using Docker

Now docker is successfully installed you can start using docker

Use following command to check the available images

docker images

That is all about installing docker in Centos/Redhat & Fedora in our next tutorial we will learn how to install docker in ubuntu and use docker.

If you have any problem in using this tutorial feel free to comment below..

Leave a Reply

Your email address will not be published.


The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99