docker命令报错error during connect: Get http://2F2F.2Fpipe2Fdocker_engine/v1.36/containers/json: open//.

时间:2024-04-11 18:38:48

执行docker ps报错
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.36/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命令报错error during connect: Get http://2F2F.2Fpipe2Fdocker_engine/v1.36/containers/json: open//.

解决方法

1.执行命令:docker-machine env default
docker命令报错error during connect: Get http://2F2F.2Fpipe2Fdocker_engine/v1.36/containers/json: open//.
2.将显示的命令复制出来进行执行
docker命令报错error during connect: Get http://2F2F.2Fpipe2Fdocker_engine/v1.36/containers/json: open//.发现执行完后,运行docker命令报错:
could not read CA certificate “C:\Users\Administrator\.docker\machine\machines\de\ca.pem”: open C:\Users\Administrator.docker\machine\machines\de\ca.pem: The system cannot find the path specified.
3. 将最后一句 REM @FOR /f “tokens=*” %i IN (‘docker-machine env default’) DO @%i 命令去掉REM进行执行,使配置生效
docker命令报错error during connect: Get http://2F2F.2Fpipe2Fdocker_engine/v1.36/containers/json: open//.
执行完后,docker命令就可以正常使用了