现象
- 运行
Docker Quickstart Terminal
启动docker machine 成功
- 运行
docker images
抛出如下错误:
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/images/json: open //./pipe/docker_engine: The system cannot find the file specified.
原因
-
docker machine
相关的系统环境变量没有添加成功
解决
- 运行
docker-machine env default
输出
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\admin\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)