1.检查Centos内核版本
```
[root@shs ~]# uname -r
```
Docker 要求 CentOS 系统的内核版本高于 3.10
2.安装Docker
```
[root@shs ~]# yum update #更新yum源
[root@shs ~]# yum -y install docker
```
3.启动Docker
```
[root@shs ~]# service docker start
Redirecting to /bin/systemctl start docker.service
```
4.查看Docker版本
```
[root@shs ~]# docker version
```
5.测试Docker
```
[root@shs ~]# docker run hello-world
```
由于本地没有hello-world这个镜像,所以会下载一个hello-world的镜像,并在容器内运行。
---
> 参考:
>http://www.runoob.com/docker/centos-docker-install.html
网友评论