當前位置:
首頁 > 知識 > Windows Install Docker

Windows Install Docker

win7、win8

win7、win8 等需要利用 docker toolbox 來安裝,國內可以使用阿里雲的鏡像來下載,下載地址:http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/

docker toolbox 是一個工具集,它主要包含以下一些內容:

Docker CLI 客戶端,用來運行docker引擎創建鏡像和容器

Docker Machine. 可以讓你在windows的命令行中運行docker引擎命令

Docker Compose. 用來運行docker-compose命令

Kitematic. 這是Docker的GUI版本

Docker QuickStart shell. 這是一個已經配置好Docker的命令行環境

Oracle VM Virtualbox. 虛擬機

下載完成之後直接點擊安裝,安裝成功後,桌邊會出現三個圖標,入下圖所示:

點擊 Docker QuickStart 圖標來啟動 Docker Toolbox 終端。

如果系統顯示 User Account Control 窗口來運行 VirtualBox 修改你的電腦,選擇 Yes。

$ 符號那你可以輸入以下命令來執行。

$ docker run hello-world Unable to find image "hello-world:latest" locally Pulling repository hello-world 91c95931e552: Download complete a8219747be10: Download complete 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 Engine CLI client contacted the Docker Engine daemon. 2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub. (Assuming it was not already locally available.) 3. The Docker Engine daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it to your terminal.

To try something more ambitious, you can run an Ubuntu container with:

$ docker run -it ubuntu bash

For more examples and ideas, visit:

https://docs.docker.com/userguide/

Win10 系統

現在 Docker 有專門的 Win10 專業版系統的安裝包,需要開啟Hyper-V。

開啟 Hyper-V

程序和功能、啟用或關閉Windows功能、選中Hyper-V

安裝 Toolbox

最新版 Toolbox 下載地址: https://www.docker.com/get-docker

點擊 Get Docker Community Edition,並下載 Windows 的版本:

運行安裝文件

雙擊下載的 Docker for Windows Installe 安裝文件,一路 Next,點擊 Finish 完成安裝。

安裝完成後,Docker 會自動啟動。通知欄上會出現個小鯨魚的圖標,這表示 Docker 正在運行。

桌邊也會出現三個圖標,入下圖所示:

我們可以在命令行執行 docker version 來查看版本號,docker run hello-world 來載入測試鏡像測試。

如果沒啟動,你可以在 Windows 搜索 Docker 來啟動:

啟動後,也可以在通知欄上看到小鯨魚圖標:

鏡像加速

鑒於國內網路問題,後續拉取 Docker 鏡像十分緩慢,我們可以需要配置加速器來解決,我使用的是網易的鏡像地址:http://hub-mirror.c.163.com。

新版的 Docker 使用 /etc/docker/daemon.json(Linux) 或者 %programdata%dockerconfigdaemon.json(Windows) 來配置 Daemon。

請在該配置文件中加入(沒有該文件的話,請先建一個):

{ "registry-mirrors": ["http://hub-mirror.c.163.com"]}


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 Linux資訊速推 的精彩文章:

我來告訴你怎麼有興趣的學習Linux
研究人員警告現代計算機都易受冷啟動攻擊

TAG:Linux資訊速推 |