1、查看linux发行版,内核
[root@docker~]# cat /etc/redhat-release #查看版本号
CentOS Linux release 7.1.1503 (Core)
[root@docker ~]# uname -r #查看Linux内核
c3.10.0-229.el7.x86_64
2、替换阿里云yum源
1.wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo #下载阿里yum源2
2.yum makecache #生成仓库缓存
3、安装docker
yum install docker -y
4、启动docker
systemctl start docker #启动docker
systemctl enable docker #开机启动docker
systemctl status docker #查看docker状态
docker version #查看docker 版本
5、配置daocloud(DaoCloud 加速器 是广受欢迎的 Docker 工具,解决了国内用户访问 Docker Hub 缓慢的问题。DaoCloud 加速器结合国内的 CDN 服务与协议层优化,成倍的提升了下载速度。
使用前请先确保您的 Docker 版本在 1.8 或更高版本,否则无法使用加速)
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
#事后重启docker
systemctl restart docker