根据docker-machine ls
的使用情况,我会得到不同的结果,具体取决于我在Windows中使用的是哪种Shell-它似乎只能在Docker Quickstart Terminal(我正在使用Docker Toolbox)中工作。我在docker-machine env
的响应中添加了更多详细信息。
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default * virtualbox Running tcp://192.168.99.100:2376 v18.09.0
$ docker-machine env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="D:\Developer\Docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)
PS > docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Running Unknown ssh command error:
command : ip addr show
err : exit status 255
output :
PS > docker-machine env
Error checking TLS connection: ssh command error:
command : ip addr show
err : exit status 255
output :
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
$ docker-machine env
Error checking TLS connection: Host is not running
所以,我的问题是,为什么它只能在Docker Quickstart Terminal中运行?为什么Powershell / cmd中的SSH命令错误?为什么在Git Bash中超时?