April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Docker centos7

Introduction

In previous posts we have seen the installation and working of Docker. This post will explain the installation of the Docker Community Edition (CE) on CentOS. If you are looking for the Ubuntu installation you should check our this post.

 

Step 1 | Remove Old Versions

$ sudo yum remove docker docker-common docker-selinux docker-engine

Step 2 | Install Required Packages

$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2

Step 3 | Setup the Docker CE Repository

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

Step 4 | Update the Packages

$ sudo yum update

Step 5 |Install specific version (Production recommended)

$ sudo yum list docker-ce.x86_64  --showduplicates | sort -r

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
docker-ce.x86_64            17.06.0.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.2.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.1.ce-1.el7.centos             docker-ce-stable
docker-ce.x86_64            17.03.0.ce-1.el7.centos             docker-ce-stable
Available Packages

$ sudo yum install docker-ce-<VERSION>

Step 6 | Install through respository

$ sudo yum install docker-ce

Step 7 | Start Docker

$ sudo systemctl start docker

Step 8 | Verify the Installation

$ sudo docker run hello-world

This will install the Docker on CentOS.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>