Loading

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):

  1. Download Docker Desktop and follow the installation instructions.

  2. 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".
    Docker Desktop dashboard icon

  3. Ensure that "Use the WSL 2 based engine" is checked in Settings > General.
    Docker Desktop general settings

  4. Select from your installed WSL 2 distributions which you want to enable Docker integration on by going to: Settings > Resources > WSL Integration.
    Docker Desktop resource settings

  5. 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

  6. Test that your installation works correctly by running a simple built-in Docker image using: docker run hello-world

posted @ 2022-04-28 10:13  ZXYFrank  阅读(296)  评论(0编辑  收藏  举报