![](/img/trans.png)
[英]How to run an iptables command for docker for windows when using WSL2
[英]Cannot run docker 4.14.1 WSL2 on Windows11
我正在嘗試 tom 在設置后運行 docker 並按照此處的步驟操作也按照在 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 stop com.docker.service 然后Net start 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 file >> properties > security > advanced 解決了這個問題
(注意:檢查所有者:您的 Windows 帳戶賦予它完全控制權,有時 Windows 會重置這些訪問權限(發生在我身上,因為 Windows Defender)。
然后單擊添加 >> 選擇主體 >> 高級
並添加安全性(如果不起作用,也可以添加服務)然后應用更改。
此鏈接檢查可以幫助您了解如何查看錯誤和其他解決方案
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.