This guide explains installing docker 1.8.x on CentOS 7
First fully update your machine, so that you get the latest version of all packages especially the Linux kernel. Run the below commands using either root or with sudo privilege.
# yum -y upgrade
Incase you got a new kernel in the above update just reboot the machine so that the new kernel becomes active.
At the time of writing this document the latest kernel version I have installed is
Now to install Docker 1.8 from the Docker’s official repository we should add the yum repo configurations.For that create the file
/etc/yum.repos.d/docker.repo and add the following content to it.
# file: /etc/yum.repos.d/docker.repo [docker] name=Docker Inc Yum repository baseurl=http://yum.dockerproject.org/repo/main/centos/7/ enabled=1 gpgkey=http://yum.dockerproject.org/gpg
Now install docker. The package name is docker-engine. Please note installing docker-selinux is very important if you want docker and firewalld work without any issues. This is a bug in docker version 1.8.x https://github.com/docker/docker/issues/15498.
# yum -y install docker-engine docker-selinux
Now start and enable the Docker service.
# systemctl start docker.service # systemctl enable docker.service
Now you are good to go. You can start using Docker