win10 docker安裝

win10家庭版安裝Docker

1.創建hyper-v.txt 並將以下內容copy進去,修改後綴名爲.cmd 即修改爲hyper-v.cmd

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt

for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"

del hyper-v.txt

Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

2.以管理員身份運行hyper-v.cmd 重啓電腦生效或者win+r 搜explorer 執行explorer.exe生效(建議重啓)
3.win+r 輸入regedit 打開註冊表 查找
計算機\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
將EditionID 的值改爲Professional
4.cmd管理員身份運行

REG ADD "HKEY_LOCAL_MACHINE\software\Microsoft\Windows NT\CurrentVersion" /v EditionId /T REG_EXPAND_SZ /d Professional /F

5.下載docker for windows(版本號–2.0.5)
docker for window

6.安裝 Docker Desktop Installer.exe 默認即可
7. 雙擊運行Docker Desktop 狀態欄內右擊選擇setting --> Daemon 添加鏡像加速
8.如何添加鏡像加速及使用參考

docker教程

docker官方文檔

如果安裝成功依舊運行失敗
1.可能是版本問題請下載匹配的版本
2. 依舊無法啓動試下激活win10系統修改祕鑰爲專業版(祕鑰請百度)

注意–你可能想使用其他虛擬機而後悔安裝了hyper-v,你可以這麼做:
1.** hyper-v常規關閉和開啓:

bcdedit /set hypervisorlaunchtype off
bcdedit / set hypervisorlaunchtype auto

2.** win10家庭版無法生效,可執行以下命令徹底卸載

bcdedit /copy {current} /d “Windows10 no Hyper-V”

將命令運行後出現在{}裏的序列號替換到下面{}裏的“XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX”

bcdedit /set {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} hypervisorlaunchtype OFF
發佈了42 篇原創文章 · 獲贊 20 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章