How To Install & Setup Docker On RHEL 7.X / CentOS 7.X

Share it:

Docker is free and an open-source software for developing and running user application, It runs the user applications in an isolated environment called the container.
Containers are lightweight and it can be able to run one or multiple on the host.you can also run Docker containers within host machines which are actually VM's.

This tutorial shows how to install, setup and use Docker to create your first container.

How To Install Docker on Centos 7.X / RHEL 7.X

Step 1: Remove older version of Docker & Install the required packages
sudo yum remove docker* && sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Step 2: Add the docker CE repo
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker.repo
Step 3: Install Docker
sudo yum install docker


How To Start, stop, restart & Enable Docker Service

sudo systemctl start docker.service
sudo systemctl stop docker.service
sudo systemctl restart docker.service
sudo systemctl enable docker.service
Step 4: view Docker version
docker version

Test Your Docker Installation


After successful installation, you can test the docker using the below command
docker run hello-world
Share it:

Post A Comment: