今天在我的一台 WIN10 電腦上又遇到了 error during connect 的問題,真是煩人精。
C:\Users\Administrator>docker ps
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.
重點是 the docker client must be run with elevated privileges to connect.
,Docker 客戶端必須以特權連接!
以管理員身份運行
接着你再輸入docker ps
命令就可以正常訪問了:
PS:網上很多文章都說讓切換到 Windows Container,個人不太認同這種做法,因為這可能會導致 docker search
找不到某些鏡像。因為鏡像還和 Windows 或者 Linux 環境有關系。
參考博客
docker client must be run with elevated privileges to connect 閱讀