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,645評論 0 17
  • # Python 資源大全中文版 我想很多程序員應該記得 GitHub 上有一個 Awesome - XXX 系列...
    aimaile閱讀 26,594評論 6 427
  • Docker 是一個劃時代的開源項目,降低了云計算資源供應的成本,同時讓應用的部署、測試和分發都變得前所未有的高效...
    andy0898閱讀 893評論 0 0
  • 風車的夢 是彩色的 他被微風欺騙 徒勞地追趕夕陽 像折翼天使的翅膀 墮入四下無人的街 受盡這人間的冰冷滄涼
    大魏魔族閱讀 298評論 0 3
  • 閱讀時間:2015年11月10日 閱讀筆記: 邏輯學有三大源流,它們分別是古代中國的名學(辯學)、古希臘的分析學和...
    文魁大腦馬帥閱讀 191評論 0 0