1.docker简介

百度百科:Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。

优势:Docker技术可以以一种简单的方式,在服务压力增大时,快速加入软、硬件分担服务压力。

1.官网

https://www.docker.com/

文档

https://docs.docker.com/get-started/#setup

下载地址

https://docs.docker.com/engine/installation/

mac版下载连接

https://download.docker.com/mac/stable/Docker.dmg

例子

https://docs.docker.com/samples/#tutorial-labs

下载并安装后运行docker 等docker启动后状态变为绿色



2.启动后执行

docker run hello-world
控制台输出:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
5b0f327be733: Pull complete
Digest: sha256:07d5f7800dfe37b8c2196c7b1c524c33808ce2e0f74e7aa00e603295ca9a0972
Status: Downloaded newer image for hello-world:latest

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

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

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

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

3.查看版本

docker --version
控制台输出:
Docker version 17.09.0-ce, build afdb6d4

4.安装docker toolbox,使用swarm时会用到

https://docs.docker.com/toolbox/overview/

docker toolbox还集成了kitematic,Dokcer图形化管理工具

https://kitematic.com/

http://dockone.io/article/246

安装完毕,继续按照官网文档步骤前进

~

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 以下原文转载于(https://docs.docker.com/docker-for-mac/)(想找中文版的最新...
    Veekend阅读 7,681评论 0 17
  • # Python 资源大全中文版 我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列...
    aimaile阅读 26,634评论 6 427
  • Docker 是一个划时代的开源项目,降低了云计算资源供应的成本,同时让应用的部署、测试和分发都变得前所未有的高效...
    andy0898阅读 898评论 0 0
  • 风车的梦 是彩色的 他被微风欺骗 徒劳地追赶夕阳 像折翼天使的翅膀 堕入四下无人的街 受尽这人间的冰冷沧凉
    大魏魔族阅读 304评论 0 3
  • 阅读时间:2015年11月10日 阅读笔记: 逻辑学有三大源流,它们分别是古代中国的名学(辩学)、古希腊的分析学和...
    文魁大脑马帅阅读 202评论 0 0