免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 33788 | 回复: 1

用Hello World校验Docker的安装 [复制链接]

论坛徽章:
32
CU大牛徽章
日期:2013-05-20 10:45:13每日论坛发贴之星
日期:2015-09-07 06:20:00每日论坛发贴之星
日期:2015-09-07 06:20:00数据库技术版块每日发帖之星
日期:2015-12-13 06:20:0015-16赛季CBA联赛之江苏
日期:2016-03-03 11:56:13IT运维版块每日发帖之星
日期:2016-03-06 06:20:00fulanqi
日期:2016-06-17 17:54:25IT运维版块每日发帖之星
日期:2016-07-23 06:20:0015-16赛季CBA联赛之佛山
日期:2016-08-11 18:06:41JAVA
日期:2016-10-25 16:09:072017金鸡报晓
日期:2017-01-10 15:13:292017金鸡报晓
日期:2017-02-08 10:33:21
发表于 2015-09-05 14:22 |显示全部楼层
用Hello World校验Docker的安装


用Docker运行Hello World镜像,命令如下:
  1. # docker run hello-world
  2. Unable to find image 'hello-world:latest' locally
  3. latest: Pulling from hello-world
  4. 535020c3e8ad: Pull complete
  5. af340544ed62: Pull complete
  6. Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c
  7. Status: Downloaded newer image for hello-world:latest

  8. Hello from Docker.
  9. This message shows that your installation appears to be working correctly.

  10. To generate this message, Docker took the following steps:
  11. 1. The Docker client contacted the Docker daemon.
  12. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
  13. 3. The Docker daemon created a new container from that image which runs the
  14.     executable that produces the output you are currently reading.
  15. 4. The Docker daemon streamed that output to the Docker client, which sent it
  16.     to your terminal.

  17. To try something more ambitious, you can run an Ubuntu container with:
  18. $ docker run -it ubuntu bash

  19. Share images, automate workflows, and more with a free Docker Hub account:
  20. https://hub.docker.com

  21. For more examples and ideas, visit:
  22. https://docs.docker.com/userguide/
复制代码
可见,Docker注册服务器从Docker Hub获取到最新的Hello World镜像,下载到了本地。可以再次运行Hello World镜像。
  1. # docker run hello-world

  2. Hello from Docker.
  3. This message shows that your installation appears to be working correctly.

  4. To generate this message, Docker took the following steps:
  5. 1. The Docker client contacted the Docker daemon.
  6. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
  7. 3. The Docker daemon created a new container from that image which runs the
  8.     executable that produces the output you are currently reading.
  9. 4. The Docker daemon streamed that output to the Docker client, which sent it
  10.     to your terminal.

  11. To try something more ambitious, you can run an Ubuntu container with:
  12. $ docker run -it ubuntu bash

  13. Share images, automate workflows, and more with a free Docker Hub account:
  14. https://hub.docker.com

  15. For more examples and ideas, visit:
  16. https://docs.docker.com/userguide/
复制代码
可见,Hello World镜像运行成功,Docker的安装也没有问题。

论坛徽章:
0
发表于 2015-09-13 15:11 |显示全部楼层
谢谢楼主分享。来支持你了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP