【问题标题】:Cannot run docker 4.14.1 WSL2 on Windows11无法在 Windows 11 上运行 docker 4.14.1 WSL2
【发布时间】:2022-12-22 03:00:11
【问题描述】:

我正在尝试 tom 在设置后运行 docker 并按照步骤 here 也按照 Enable virtualization on Windows 11/BIOS 的步骤

单击开始后,服务显示正在运行,然后停止并关闭桌面 docker。

我在下面收到这些错误:

泊坞窗版本

C:\Windows\system32>docker version
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/version": open //./pipe/docker_engine: The system cannot find the file specified.
Client:
 Cloud integration: v1.0.29
 Version:           20.10.21
 API version:       1.41
 Go version:        go1.18.7
 Git commit:        baeda1f
 Built:             Tue Oct 25 18:08:16 2022
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

泊坞信息

C:\Windows\system32>docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc., v0.9.1)
  compose: Docker Compose (Docker Inc., v2.12.2)
  dev: Docker Dev Environments (Docker Inc., v0.0.3)
  extension: Manages Docker extensions (Docker Inc., v0.2.13)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
ERROR: 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/info": open //./pipe/docker_engine: The system cannot find the file specified.
errors pretty printing info

我尝试了以下解决方案:

1- 以管理员身份打开 Powershell 启动命令: & 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon

2- 删除配置文件 AppData/Roaming/Docker 并启动 Docker Desktop

3-Net停止com.docker.service 接着 网络启动com.docker.service

C:\Windows\system32>Net start com.docker.service
System error 5 has occurred.
Access is denied.

信息

C:\Windows\system32>wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-20.04    Running         2

【问题讨论】:

    标签: docker wsl-2 windows-11


    【解决方案1】:

    我通过打开 docker file >> properties > security > advanced 解决了这个问题

    (笔记: 检查所有者:您的 Windows 帐户赋予它完全控制权,有时 Windows 会重置这些访问权限(发生在我身上,因为 Windows Defender)。

    然后单击添加 >> 选择主体 >> 高级

    并添加安全性(如果不起作用,也可以添加服务)然后应用更改。

    link 检查可以帮助您了解如何查看错误和其他解决方案

    【讨论】:

      猜你喜欢
      • 2021-03-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-22
      • 1970-01-01
      • 2021-12-11
      • 2020-11-10
      相关资源
      最近更新 更多