Docker不能在Mac上安装正确的

我有一个非常新鲜的Macbook Pro。 刚刚下载了Docker安装程序并运行它。 然后我打开了快速入门的应用程序,它有一些错误。

我会告诉你它说了什么,但不会在第二次出现同样的错误。 以下是我第二次打开快速入门应用程序时显示的内容:

Machine default already exists in VirtualBox. Starting machine default... exit status 1 Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. Setting environment variables for machine default... ## . ## ## ## == ## ## ## ## ## === /"""""""""""""""""\___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\_______/ host is not running docker is configured to use the default machine with IP For help getting started, check out the docs at https://docs.docker.com default is not running. Please start this with docker-machine start default bash-3.2$ docker-machine env Error: Expected either one machine name, or -u flag to unset the variables in the arguments. 

以下是我尝试运行docker时发生的情况:

 docker run hello-world Post http:///var/run/docker.sock/v1.20/containers/create: dial unix /var/run/docker.sock: no such file or directory. * Are you trying to connect to a TLS-enabled daemon without TLS? * Is your docker daemon up and running? 

我以为Docker应该是非常棒的(每个人似乎都喜欢它),但是这真是令人困惑,我遵循了所有的指示。

编辑:我使用Mac OS 10.10.3和VirtualBox 5.0.3

从你的shell中运行:

 eval $(docker-machine env default) 

或者你可以在你的.bash_profile文件中设置。

你可以看到envvariables,如果你只运行docker-machine env default命令:

 $ docker-machine env default export DOCKER_TLS_VERIFY="1" export DOCKER_HOST="tcp://192.168.99.100:2376" export DOCKER_CERT_PATH="/Users/user/.docker/machine/machines/default" export DOCKER_MACHINE_NAME="default" # Run this command to configure your shell: # eval "$(docker-machine env default)" 

不要忘了启动docker docker-machine (aka boot2docker)

 $ docker-machine start default 

您也可以在此检出docker-machine子命令参考