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 @   ZXYFrank  阅读(306)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
点击右上角即可分享
微信分享提示
主题色彩