1.打开启动或关闭windows功能
2.勾选Hyper-V、适用于Linux的Windows子系统,虚拟机平台三项
若没有Hyper-V,以管理员身份执行以下文件
创建Hyper-V Installer.cmd
,然后写入
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 /ALL
3.如果进入docker后一直转圈圈
执行wsl --update
更新后重启
4. 更改docker engine镜像
{"registry-mirrors": ["http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn","https://registry.docker-cn.com"]
}
5.相关命令
docker system --help
帮助
docker system df
查看docker缓存情况
docker build prune
清缓存