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.
Recent Comments