Windows安装docker
若打开报错:
×Docker Desktop
Docker Desktop - Windows Hypervisor is not present
Docker Desktop is unable to detect a Hypervisor.
Hardware assisted virtualization and data execution protection must be enabled inthe BlOS.See https://docs.docker.com/desktop/troubleshoot/topics/#virtualization
则:
先检查 启动或关闭Windows功能 ---> Hyper-V 有没有勾选上
如果找不到Hyper-V:Windows自动隐藏了该功能,设置开启Hyper-V。
桌面新建一个记事本文件,将它的后缀改成cmd或bat,复制下面的代码:
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
然后,右键选择:以管理员身份运行。代码执行结束后,重启电脑就可以了。
若重启后还报错:
管理员身份打开 cmd 窗口,执行:
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
执行后重启电脑
若重启后还是报错:
管理员身份打开 cmd 窗口,执行:
bcdedit /set hypervisorlaunchtype auto
执行后重启电脑,最后应该就可以了
标签:容器,01,sudo,apt,笔记,Docker,安装,docker From: https://www.cnblogs.com/xishiyuyuan/p/18298451