个人笔记,仅供参考:
docker在centos上的安装方法,推荐使用centos7系统。
添加docker的yum源:
vi /etc/yum.repos.d/docker.repo

[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enable=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

yum update -y
#内核已更新,重启服务器

yum install -y docker-engine
systemctl start docker.service
systemctl enable docker.service

查看docker版本:

[root@localhost ~]# docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:25 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:06:25 2017
 OS/Arch:      linux/amd64
 Experimental: false

安装完成!