docker desktop 运行一直转
问题截图
(1)打开cmd,运行docker images报
error during connect: in the default daemon configuration on windows, the docker client must be run with elevated privileges to connect.: get "http://%2f%2f.%2fpipe%2fdocker_engine/v1.24/containers/json": open //./pipe/docker_engine: the system cannot find the file specified.
(2)运行docker desktop报错
system.invalidoperationexception: failed to set version to docker-desktop: exit code: -1
解决方案
(1)以管理员身份运行cmd,先运行cd c:\program files\docker\docker(docker安装目录),再运行dockercli.exe -switchdaemon(个人尝试没啥用)
(2)运行docker ps(个人尝试也没啥用)
(3)重启docker服务,将docker desktop恢复出厂设置(个人尝试还是没啥用)
(4)cmd运行 dism.exe /online /enable-feature
- /featurename:microsoft-windows-subsystem-linux /all
- /norestart,然后运行dism.exe /online /enable-feature
- /featurename:virtualmachineplatform /all
- /norestart,再将电脑重启(不知道哪看的,但个人尝试好像没啥用)
(5)cmd运行netsh winsock reset(终于解决了,但之前排雷太多导致自己的镜像全没了
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
发表评论