安装Docker
- 查看linux发行版,内核
[root@docker~]# cat /etc/redhat-release #查看版本号
- 替换阿里云yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo #下载阿里源
yum makecache #生成仓库缓存
- 安装docker
yum install docker -y
- 启动docker
systemctl start docker #启动docker
systemctl enable docker #开机启动docker
systemctl status docker #查看docker状态
- DaoCloud加速器 是广受欢迎的 Docker 工具,解决了国内用户访问 Docker Hub 缓慢的问题。DaoCloud 加速器结合国内的 CDN 服务与协议层优化,成倍的提升了下载速度。(或者使用阿里云加速镜像)
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
- 设置好加速镜像重启docker
systemctl restart docker