Win10 安装 Docker (WSL2)
升级WSL2
如果是WSL1,需要升级WSL2
https://docs.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2
wsl -l -v
wsl --set-version Ubuntu-XXX(YOUR_VERSION) 2
以下参考这个链接
安装Docker Desktop并设置
官网安装即可
然后重启电脑
To install Docker (after already installing WSL):
-
Download Docker Desktop and follow the installation instructions.
-
Once installed, start Docker Desktop from the Windows Start menu, then select the Docker icon from the hidden icons menu of your taskbar. Right-click the icon to display the Docker commands menu and select "Settings".
-
Ensure that "Use the WSL 2 based engine" is checked in Settings > General.
-
Select from your installed WSL 2 distributions which you want to enable Docker integration on by going to: Settings > Resources > WSL Integration.
-
To confirm that Docker has been installed, open a WSL distribution (e.g. Ubuntu) and display the version and build number by entering:
docker --version
-
Test that your installation works correctly by running a simple built-in Docker image using:
docker run hello-world
本文来自博客园,作者:ZXYFrank,转载请注明原文链接:https://www.cnblogs.com/zxyfrank/p/16201781.html