Docker是一个开源的引擎,可以轻松的为任何应用创建一个轻量级的、可移植的、自给自足的容器。开发者在笔记本上编译测试通过的容器可以批量地在生产环境中部署,包括VMs(虚拟机)、bare metal、OpenStack 集群和其他的基础应用平台。
一:安装docker
- Centos7 默认的源中已经有了docker,使用
sudo yum install docker 安装即可
2.启动 systemctl start docker
3.查看docker版本信息 docker version
二:运行第一个docker hello-world
1.从远程仓库下载镜像 docker pull hello-world
![](https://images2018.cnblogs.com/blog/1220910/201804/1220910-20180423181057077-589702364.png)
2.查看 本地 docker中的镜像 docker images
![](https://images2018.cnblogs.com/blog/1220910/201804/1220910-20180423182142692-64414033.png)
3.运行 docker run hello-world
![](https://images2018.cnblogs.com/blog/1220910/201804/1220910-20180423182323169-825206880.png)