前言
Docker Desktop是一款適用于Windows和Mac電腦的桌面應(yīng)用程序,它為用戶提供了一個(gè)方便的方式來使用Docker容器技術(shù)。通過Docker Desktop,您可以輕松地創(chuàng)建、管理和運(yùn)行Docker容器,以及構(gòu)建和發(fā)布自己的Docker鏡像。
Docker Desktop包括以下組件:
Docker引擎:Docker容器技術(shù)的核心組件,負(fù)責(zé)管理和運(yùn)行容器。
Docker CLI:命令行界面,用于與Docker引擎進(jìn)行交互。
Docker Compose:用于定義和運(yùn)行多個(gè)容器的工具。
Kubernetes:容器編排工具,用于管理大規(guī)模容器集群。
Docker Desktop為用戶提供了一個(gè)簡單的UI,以便于啟動(dòng)、停止和管理Docker容器和鏡像。此外,它還支持直接在編輯器中進(jìn)行代碼調(diào)試,以加速開發(fā)流程。
總之,Docker Desktop是一個(gè)非常有用的工具,特別適合那些需要頻繁使用Docker容器的開發(fā)者和系統(tǒng)管理員。
本文將介紹Windows安裝 Docker Desktop出現(xiàn)的報(bào)錯(cuò)及解決方案。
報(bào)錯(cuò)一 Update the WSL kernel by running “wsl --update” or follow instructions at https://docs.microsoft.com/windows/wsl/wsl2-kernel.
解決:
管理員運(yùn)行CMD,執(zhí)行
wsl --update
C:\Program Files\Docker\Docker>wsl --update
正在檢查更新...
正在下載更新...
正在安裝更新...
此更改將在 WSL 下次完全重啟時(shí)生效。若要強(qiáng)制重啟,請(qǐng)運(yùn)行“wsl --shutdown”。
內(nèi)核版本: 5.10.102.1
再啟動(dòng)服務(wù)正常
報(bào)錯(cuò)二: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/images/json”: open //./pipe/docker_engine: The system cannot find the file specified.
C:\Windows\system32>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/images/json": open //./pipe/docker_engine: The system cannot find the file specified.
解決:
管理員運(yùn)行CMD,執(zhí)行
DockerCli.exe -SwitchDaemon
若還不行,執(zhí)行wsl --update
報(bào)錯(cuò)三:Error response from daemon: open \.\pipe\docker_engine_linux: The system cannot find the file specified.
C:\Program Files\Docker\Docker>docker images
Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified.
解決:
管理員運(yùn)行CMD,執(zhí)行如下命令
Net stop com.docker.service
Net start com.docker.service
演示:
C:\Program Files\Docker\Docker>Net stop com.docker.service
Docker Desktop Service 服務(wù)正在停止.
Docker Desktop Service 服務(wù)已成功停止。
C:\Program Files\Docker\Docker>Net start com.docker.service
Docker Desktop Service 服務(wù)正在啟動(dòng) .
Docker Desktop Service 服務(wù)已經(jīng)啟動(dòng)成功。
報(bào)錯(cuò)四:docker for windows requires windows 10 pro or enterprise version 14393 to run
解決:
該錯(cuò)誤意味著您需要Windows 10專業(yè)版或企業(yè)版版本14393才能運(yùn)行Docker for Windows。
切換到Windows的高級(jí)版本即可。如果您正在使用家庭版或低于專業(yè)版的版本,則無法安裝Docker for Windows。
報(bào)錯(cuò)五:Unable to start: The running command stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer ‘localhost’ because the object was not found. The object might have been deleted.
解決方案:
確保已啟用Hyper-V,并且計(jì)算機(jī)已重啟。
如果有,禁用任何錯(cuò)誤的虛擬交換機(jī)。
在運(yùn)行的命令中使用“–debug”選項(xiàng)以獲得更多詳細(xì)信息。
報(bào)錯(cuò)六:Docker Desktop requires server version ‘18.06.0+’ or ‘API version 1.38’ to run.
解決方案:
的Docker Desktop版本過舊,需要升級(jí)。
請(qǐng)按照以下步驟進(jìn)行操作:
打開Docker Desktop。
單擊“ Docker”菜單并選擇“ Settings”。
在左側(cè)面板中,選擇“ General”。
將Docker Desktop升級(jí)到最新版本。
報(bào)錯(cuò)七:Failed to initialize Docker: Error with pre-create check: “Hyper-V is not available on this version of Windows. (Virtual machine ID 4D7C8B02-881B-491A-9FBF-3D8EA2CF0CEA)”
解決方案:
確保您的計(jì)算機(jī)支持Hyper-V。
確保已啟用Hyper-V,并且計(jì)算機(jī)已重啟。
如果有,禁用任何錯(cuò)誤的虛擬交換機(jī)。
如果MobyLinuxVM沒有正確配置,請(qǐng)嘗試卸載和重新安裝Docker。文章來源:http://www.zghlxwxcb.cn/news/detail-421078.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-421078.html
到了這里,關(guān)于Windows安裝 Docker Desktop報(bào)錯(cuò)解決大全的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!