刚做网站做什么网站好点,微信运营软件,seo的网站特征,wordpress怎样实现前台编辑1. 安装WSL
WSL 是什么#xff1a; WSL 是一个在 Windows 上运行 Linux 环境的轻量级工具#xff0c;它可以让用户在 Windows 系统中运行 Linux 工具和应用程序。Docker 为什么需要 WSL#xff1a; Docker 依赖 Linux 内核功能#xff0c;WSL 2 提供了一个高性能、轻量级的…1. 安装WSL
WSL 是什么 WSL 是一个在 Windows 上运行 Linux 环境的轻量级工具它可以让用户在 Windows 系统中运行 Linux 工具和应用程序。Docker 为什么需要 WSL Docker 依赖 Linux 内核功能WSL 2 提供了一个高性能、轻量级的 Linux 内核支持从而让 Docker 在 Windows 上运行更加高效。对用户的好处 无需安装笨重的虚拟机容器性能更好且与 Windows 主机无缝集成。
1.1 确认CPU已经启用虚拟化 1.2 管理员身份执行
wsl --install安装完毕后重启电脑安装Ubuntu,Windows系统要基于WSL的Linux子系统才能直接装docker这里ubuntu就是一个子系统。
wsl --install -d Ubuntu2. 安装Hyper-V
因为Windows11 家庭版上没有Hyper-V服务所以需要自行安装
1.1 cmd 输入 optionalfeatures 来查看Windows功能 2.2 创建一个text文本拷贝下文
pushd %~dp0
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum hyper-v.txt
for /f %%i in (findstr /i . hyper-v.txt 2^nul) do dism /online /norestart /add-package:%SystemRoot%\servicing\Packages\%%i
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL2.3 文件名改为hyper.bat以管理员身份运行等待安装完输入Y电脑重启
勾选三项
Hyper-V适用于Linux的Windows子系统虚拟机平台
3. 安装Docker Desktop
3.1 官网下载
Installer.exe 执行安装即可https://docs.docker.com/desktop/setup/install/windows-install/ 验证安装完成
docker version安装完毕登录,如果报错可能是上述安装没有重启生效重启即可。
3.2 配置阿里云镜像加速
替换并restart
{builder: {gc: {defaultKeepStorage: 20GB,enabled: true}},experimental: false,features: {buildkit: true},registry-mirrors: [https://registry.docker-cn.com,http://hub-mirror.c.163.com,https://docker.mirrors.ustc.edu.cn,https://cr.console.aliyun.com,https://mirror.ccs.tencentyun.com]
}