windows安装docker

以管理员身份运行cmd

wsl --install
image.png
wsl --set-default-version 2
image.png
"D:\Downloads\Docker Desktop Installer.exe"  install --installation-dir="D:\Docker\Docker" --windows-containers-default-data-root="D:\Docker\Docker\data" --wsl-default-data-root="D:\Docker\Docker\wsl"

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
 "registry-mirrors": [
        "https://registry.docker-cn.com",
        "http://hub-mirror.c.163.com",
        "https://mirror.baidubce.com",
        "https://docker.mirrors.ustc.edu.cn",
        "https://cr.console.aliyun.com",
        "https://mirror.ccs.tencentyun.com"
    ],
  "experimental": false
}

启用功能

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

设置默认版本

wsl --set-default-version 2

手动下载分发版本

https://learn.microsoft.com/zh-cn/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容