How To Install Docker On RHEL 7

How To Install Docker On RHEL 7:

update all your packagers

sudo yum update -y

it will update every currently installed package in your rhel 7.

Install the Dependencies  to install docker on rhel 7

sudo yum install lvm2 device-mapper device-mapper-event-libs device-mapper-event device-mapper-libs device-mapper-persistent-data -y

docker requires some dependecies to install docker on rhel 7/6. Lets install those dependencies.

Add the Docker yum repository

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Using above command we can add docker repo in rhel. After running this command repo file will be added in /etc/yum.repos.d/docker-ce.repo.

install container selinux 

To install docker on rhel 7/6 you need container selinux version minimum 2.10. So install container selinux greater tha 2.10.

Verify container selinux version in your server with below command.

[root@ip-10-0-0-20 ~]# rpm -qa |grep container
containerd.io-1.2.5-3.1.el7.x86_64
container-selinux-2.74-1.el7.noarch
[root@ip-10-0-0-20 ~]#

You can see that i have container selinux version 2.74. In your server if there is no container selinux install with below command.

yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.74-1.el7.noarch.rpm

Install Docker on RHEL 7

Install docker on rhel 7 by using below command.

sudo yum install docker-ce -y

 

  • install docker on rhel 7
  • install docker on rhel 6
  • docker install on rhel 7
  • rhel 7 install docker
  • how to install docker on rhel 7
  • how to install docker rhel 8

Leave a Reply

Your email address will not be published. Required fields are marked *