How to install Docker CE on CentOS.
To install docker from official repository, you should remove any previous installed version.
yum remove docker \
docker-common \
container-selinux \
docker-selinux \
docker-engine \
docker-engine-selinux
Add the official repository
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Maybe you shoud install yum-utils
first
yum install -y yum-utils
And other required packages
yum install -y device-mapper-persistent-data lvm2
Now you would be able to install docker-ce
yum install -y docker-ce
Enable and start Docker
systemctl enable docker
systemctl start docker
Run hello-world
docker run hello-world