`docker-machine ls`命令根据我使用的shell显示不同的输出?

时间:2018-12-19 10:09:47

标签: bash powershell docker cmd

根据docker-machine ls的使用情况,我会得到不同的结果,具体取决于我在Windows中使用的是哪种Shell-它似乎只能在Docker Quickstart Terminal(我正在使用Docker Toolbox)中工作。我在docker-machine env的响应中添加了更多详细信息。

Docker QS终端: enter image description here

$ 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)

Powershell(cmd中的结果相同): enter image description here

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  :

Git Bash: enter image description here

$ 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中超时?

0 个答案:

没有答案