error during connect

啓動docker完畢,執行docker  ps 時報錯

-  error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

 

大意就是docker的守護進程沒有運行。google查了下。有兩種解決方案。我的docker是windows 版本,信息如下

 

or during connect: Get http://FpipeFdocker_engine/v1.40/containers/json: open //./pipe

Client: Docker Engine - Community
 Version:           19.03.1
 API version:       1.40
 Go version:        go1.12.5
 Git commit:        74b1e89
 Built:             Thu Jul 25 21:17:08 2019
 OS/Arch:           windows/amd64
 Experimental:      false

 

一種解決方案爲:

cd "C:\Program Files\Docker\Docker"
DockerCli.exe -SwitchDaemon

到你C盤的docker文件夾下,執行第二行的命令。更換守護進程,不過我本人試了下,並不管用。

 

第二種方案。在你的docker desktop的小圖標上右鍵,找到Setting--> General-->勾選Expose daemon on tcp localhost那個選項。重啓

 

PS:分享下我的解決方案,從英文意思感覺是get不到一個鏈接上的config.json文件,所以我掛了個梯子,你們懂得,過了一會,執行了第一個方法,重啓之後就可以了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章