CentOs 7 安装 Docker
 Docker 是一个开源的应用容器引擎,是一个轻量级容器技术,Docker 支持将软件编译成一个镜像,然后在镜像中对各种软件做好配置,将镜像发布出去,使用者们都可以直接使用这个镜像、
 运行中的这个镜像被称为容器,容器的启动是非常快速的,下面我们就来介绍如何在 CentOS 7 系统中安装 Docker
准备工作
    首先,Docker 官方要求 Linux 内核版本必须在3.8以上,建议3.10以上,我们可以使用uname -a指令来查看内核版本
| 1 | [stephen@localhost ~]$ uname -a | 
    我这里已经是3.10以上的版本了,如果不是的话,我们需要使用sudo yum update指令来更新软件包及内核
| 1 | [stephen@localhost ~]$ sudo yum update | 
 接下来我们就可以安装 Docker 了
安装 Docker
    检测过内核版本后,我们就可以使用yum install docker命令安装 Docker,我们需要使用 root 权限来操作
| 1 | [stephen@localhost ~]$ su root | 
启动 Docker
    上述步骤执行结束并出现完毕!字样,说明我们已经在 CentOS 系统上成功安装了 Docker,我们通过执行systemctl start docker启动 Docker 并使用docker -v查看我们 Docker 的版本
| 1 | [root@localhost stephen]# systemctl start docker | 
 到这里,我们的 Docker 就已经成功的安装在 CentOS 操作系统中了,但是我们没此重启操作系统都要重启 Docker
设置 Docker 的自启动
    通过使用systemctl enable docker可以设置 Docker 的开机自启动
| 1 | [root@localhost stephen]# systemctl enable docker | 
关闭 Docker
    使用systemctl stop docker命令可以关闭 Docker
| 1 | [root@localhost stephen]# systemctl stop docker |