执行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.
报错信息如下:
解决方法
1.执行命令:docker-machine env default
2.将显示的命令复制出来进行执行
发现执行完后,运行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命令就可以正常使用了