>Andy , 2023/03/09 # 安裝Docker for Windows 以Windows安裝Docker分為兩個部分。 ## 安裝Docker Desktop 1. 至[Docker官方載點](https://www.docker.com/products/docker-desktop/)下載Docker Desktop。 2. 安裝完後重新啟動電腦。 ## 安裝WSL2(Windows Subsystem for Linux) WSL2是Windows下的Linux子作業系統,必須先安裝後才能使用Docker Desktop。 1. 首先以系統管理員身分打開PowerShell並執行下面的指令: ``` dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart ```  2. 啟用虛擬機器功能,以系統管理員身分打開PowerShell並執行下面的指令: ``` dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ```  3. 安裝wsl的指令: ``` wsl --install ``` 4. 下載Linux核心更新套件(64位元) 點擊連結下載[Linux核心更新套件](https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi),下載完成後執行安裝。 5. 將WSL2設定為預設版本 ``` wsl --set-default-version 2 ```  6. 打開HyperV功能 控制台->程式->程式與功能,開啟HyperV  7. 重新開機後,安裝流程就結束了  ###### tags: `Docker`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up