# 1、下载rpm源文件
* rpm下载不了的文件可以到[rpm官方](http://rpm.pbone.net/)进行下载
# 2、执行rpm文件
* 1、以下的rpm文件是有依赖,需要安装顺序进行执行.
* 2、执行policycoreutils-python-2.5-29.el7.x86_64.rpm发现报 错误:依赖检测失败: policycoreutils = 2.5-22.el7 被 policycoreutils-python-2.5-22.el7.x86_64 需要 去rpm官方网找了一个`policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm`最新的安装包执行安装
* 3、python-kitchen-1.1.1-5.el7.noarch.rpm可以不需要安装
```
rpm -ivh libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
rpm -ivh audit-libs-python-2.8.4-4.el7.x86_64.rpm
rpm -ivh libcgroup-0.41-20.el7.x86_64.rpm
rpm -ivh libsemanage-python-2.5-14.el7.x86_64.rpm
rpm -ivh checkpolicy-2.5-8.el7.x86_64.rpm
rpm -ivh python-IPy-0.75-6.el7.noarch.rpm
rpm -ivh setools-libs-3.3.8-4.el7.x86_64.rpm
rpm -ivh policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm
rpm -ivh container-selinux-2.74-1.el7.noarch.rpm
rpm -ivh libseccomp-2.3.1-3.el7.x86_64.rpm
rpm -ivh containerd.io-1.2.0-3.el7.x86_64.rpm
rpm -ivh docker-ce-cli-18.09.0-3.el7.x86_64.rpm
rpm -ivh docker-ce-18.09.0-3.el7.x86_64.rpm
```
# 3、启动docker
```
systemctl daemon-reload && systemctl restart docker
```
# 4、设置开机启动
* Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
```
systemctl enable docker.service
```
# 5、验证docker
```
docker version
```
# 参考文章
* [CentOS 7.5离线安装Docker 18.09.3软件](https://jingyan.baidu.com/article/fb48e8becf31a16e632e145f.html)