百度搜到的不多,看了这一篇,测试可行
感谢
https://blog.csdn.net/weixin_41517074/article/details/128653118
$ErrorActionPreference = "SilentlyContinue"
kill -force -processname 'Docker for Windows', com.docker.db, vpnkit, com.docker.proxy, com.docker.9pdb, moby-diag-dl, dockerd
try {
./MobyLinux.ps1 -Destroy
} Catch {}
$service = Get-WmiObject -Class Win32_Service -Filter "Name='com.docker.service'"
if ($service) { $service.StopService() }
if ($service) { $service.Delete() }
Start-Sleep -s 5
Remove-Item -Recurse -Force "~/AppData/Local/Docker"
Remove-Item -Recurse -Force "~/AppData/Roaming/Docker"
if (Test-Path "C:ProgramDataDocker") { takeown.exe /F "C:ProgramDataDocker" /R /A /D Y }
if (Test-Path "C:ProgramDataDocker") { icacls "C:ProgramDataDocker" /T /C /grant Administrators:F }
Remove-Item -Recurse -Force "C:ProgramDataDocker"
Remove-Item -Recurse -Force "C:Program FilesDocker"
Remove-Item -Recurse -Force "C:ProgramDataMicrosoftWindowsStart MenuProgramsDocker"
Remove-Item -Force "C:UsersPublicDesktopDocker for Windows.lnk"
Get-ChildItem HKLM:softwaremicrosoftwindowscurrentversionuninstall | % {Get-ItemProperty $_.PSPath} | ? { $_.DisplayName -eq "Docker" } | Remove-Item -Recurse -Force
Get-ChildItem HKLM:softwareclassesinstallerproducts | % {Get-ItemProperty $_.pspath} | ? { $_.ProductName -eq "Docker" } | Remove-Item -Recurse -Force
Get-Item 'HKLM:softwareDocker Inc.' | Remove-Item -Recurse -Force
Get-ItemProperty HKCU:softwaremicrosoftwindowscurrentversionRun -name "Docker for Windows" | Remove-Item -Recurse -Force
#Get-ItemProperty HKCU:softwaremicrosoftwindowscurrentversionUFHSHC | ForEach-Object {Get-ItemProperty $_.PSPath} | Where-Object { $_.ToString().Contains("Docker for Windows.exe") } | Remove-Item -Recurse -Force $_.PSPath
#Get-ItemProperty HKCU:softwaremicrosoftwindowscurrentversionUFHSHC | Where-Object { $(Get-ItemPropertyValue $_) -Contains "Docker" }
管理员运行powershell,执行上面的代码
如果提示如下错误:
执行 set-executionpolicy remotesigned
参考
https://success.docker.com/article/how-to-completely-remove-docker-in-windows-10
https://blog.csdn.net/evils798/article/details/7196549
删除dockernat网络
进入hype-v
进入虚拟交换机管理