-
確認windows10版本
- 必須為64位
- 必須為win10專業版/企業版,1067或之后的版本
-
開啟win10的Hyper-V和容器功能
- 打開windows功能
- 勾選Hyper-V和Containers
- 重啟
- 打開windows功能
-
下載docker for win10 安裝包
- 打開docker官網https://www.docker.com/, 並注冊登錄
- 點擊右上角的
Get Started
- 在打開的頁面中點擊
Download Desktop and Take a Tutorial
- 在打開的頁面中點擊
Get started with Docker Desktop
,選擇for Windows
下載
-
安裝啟動Docker
- 以管理身份運行下載的
Docker for Windows Installer.exe
安裝包 - 使用默認設置進行安裝,完成后,點擊桌面圖標
Docker Desktop
啟動.
- 以管理身份運行下載的
-
運行命令
-
以管理員身份打開CMD,執行命令
docker version
Client: Docker Engine - Community Version: 18.09.2 API version: 1.39 Go version: go1.10.8 Git commit: 6247962 Built: Sun Feb 10 04:12:31 2019 OS/Arch: windows/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.2 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 6247962 Built: Sun Feb 10 04:13:06 2019 OS/Arch: linux/amd64 Experimental: false
-
-
更換國內鏡像源--可選操作
-
在任務欄右下角右鍵點擊docker圖標,選擇Settings
-
在左側選擇
Daemon
欄 -
在右邊界面點擊
Basic
按鈕,切換到Advanced
模式 -
將以下內容粘貼到文本框中
{ "registry-mirrors": ["https://registry.docker-cn.com"], "insecure-registries": [], "debug": true, "experimental": false }
-
點擊
Apply
按鈕,等待重啟
-
-
更換本地鏡像存儲地址--可選操作
-
linux容器更換
https://blog.csdn.net/haojing8312/article/details/80790429 -
windows容器更換
``` { "registry-mirrors": ["https://registry.docker-cn.com"], "insecure-registries": [], "debug": true, "experimental": false, "graph": "D:\\docker\\images\\windows" } ```
-