我有一台非常新的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。
docker
命令行界面需要docker-machine env
才能正常运行,因为它需要这些环境变量来确定 docker 守护进程的运行位置。由于该环境变量不存在,因此docker
命令行界面会默认尝试使用 Unix 套接字,但在 Mac 上,没有 Unix 套接字可以与守护进程通信 -- 守护进程运行在虚拟机中,只能通过 TCP 套接字进行访问。环境变量将设置该 TCP 套接字的位置。 - Andy